Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 430811 - Upgrade from F8 - anaconda doesn't find /boot, traceback trying to write new bootloader config
Upgrade from F8 - anaconda doesn't find /boot, traceback trying to write new ...
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
Depends On:
Blocks: F9Blocker
  Show dependency treegraph
Reported: 2008-01-29 16:48 EST by Will Woods
Modified: 2008-03-12 16:16 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-12 16:16:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
anacdump.txt (499.67 KB, text/plain)
2008-01-29 16:48 EST, Will Woods
no flags Details

  None (edit)
Description Will Woods 2008-01-29 16:48:04 EST
Attempted an upgrade from F8 to F9Alpha. Packages installed fine but the
installer traced back at post-install configuration.

It appears that bootDevs is an empty list - perhaps I forgot to choose a device?
I also had a USB key inserted when I did the installation, so this might also
have affected things.

anaconda exception report
Traceback (most recent call first):
  File "/usr/lib/booty/bootloaderInfo.py", line 759, in writeGrub
    f.write('#          root %s\n' % self.grubbyPartitionName(bootDevs[0]))
  File "/usr/lib/booty/bootloaderInfo.py", line 1187, in write
    justConfig | (not self.useGrubVal))
  File "/usr/lib/anaconda/bootloader.py", line 209, in writeBootloader
    justConfigFile, anaconda.intf)
  File "/usr/lib/anaconda/dispatch.py", line 209, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 132, in gotoNext
  File "/usr/lib/anaconda/gui.py", line 1201, in nextClicked
  File "/usr/lib/anaconda/iw/progress_gui.py", line 80, in renderCallback
  File "/usr/lib/anaconda/gui.py", line 1222, in handleRenderCallback
IndexError: list index out of range
Comment 1 Will Woods 2008-01-29 16:48:04 EST
Created attachment 293348 [details]
Comment 2 Will Woods 2008-01-29 18:06:35 EST
retested without the USB key inserted; no change.
Comment 3 Will Woods 2008-01-29 18:56:14 EST
Retested with regular F8 instad of LiveCD install - no change.

It's worth noting that in all these cases I get the "installer is unable to
detect the boot loader currently in use on your system" screen. I choose "Create
new" and the install proceeds, then bombs at bootloader configuration time.

I'll try skipping the bootloader configuration update, but given that the
existing system is just a normal F8 install, shouldn't we be able to detect it?
Comment 4 Will Woods 2008-01-29 19:51:51 EST
Further note: it looks like /boot was not mounted during the upgrade, and
there's no fstab entry for it in the upgraded system. Details below:

After skipping the bootloader config (and thus completing an install) GRUB shows
that there are no F9 boot images in the /boot partition (/dev/sda1).

Booting the F8 images (which are still there) gets the system up and running.
There's no fstab entry for /boot, so sda1 is auto-mounted as /media/_boot once
you log into X.

/boot on the root partition contains the F9 kernel, but no grub.conf. So:

  1) cp /boot/*fc9* /media/_boot
  2) rm -rf /boot/*
  3) echo '/dev/sda1 /boot ext3 defaults 1 1' >> /etc/fstab
  4) umount /media/_boot; mount /boot
  5) vi /etc/grub.conf, add boot entry for fc9 kernel
  6) reboot

and now the system is OK.
Comment 5 Will Woods 2008-01-30 12:21:07 EST
clumens guided me through some debugging - we found that, basically, anaconda
does not see /boot in its list of disks. It's not mounted anywhere. 

During the findrootparts step, anaconda finds the drive itself ok:
DEBUG   : self.driveList(): [u'sda']

It then finds the LVs, and does this:

DEBUG   : isys.py:mount()- going to mount /dev/VolGroup00/LogVol00 on /mnt/sysimage
DEBUG   : isys.py:mount()- going to mount /dev/VolGroup00/LogVol01 on /mnt/sysimage
DEBUG   : isys.py:mount()- going to mount sda1 on /mnt/sysimage
WARNING : step complete does not exist

This is the last time it mentions sda1 or /boot. 

Checking the debugger we find that sda1's 'active' flag is apparently set to 0.
Later partitioning code filters out inactive partitions, so that's why it's
ignored from there on out. We're not yet sure why it's not marked as active.
Comment 6 Jeremy Katz 2008-01-30 12:37:40 EST
(In reply to comment #5)
> Later partitioning code filters out inactive partitions, so that's why it's
> ignored from there on out. We're not yet sure why it's not marked as active.

This doesn't make much sense... there can only be one active partition per disk
(active is the partition with the 'boot' flag; MBR code uses this to determine
which partition to run code from at boot time)
Comment 7 Will Woods 2008-01-30 12:42:28 EST
fdisk -l /dev/sda shows that sda1 has the boot flag set. So sda1 should be
considered active.. but:

  part = diskset.disks["sda"].next_partition()
  print part.is_active()

gives a result of 0. So something's wrong there.
Comment 8 Jeremy Katz 2008-01-30 12:53:08 EST
You're not comparing the same things.  is_active() is just whether or not the
partition is a real partition (as opposed to freespace or metadata).  You need
to use get_flags() and & the result with parted.PARTITION_BOOT.

Also, that part isn't going to be sda1 -- instead, it's the metadata partition
at the start of the disk.  Hence, why it doesn't count as active.
Comment 9 Will Woods 2008-01-30 13:48:03 EST
Ah, okay. Something was definitely wrong.. my understanding of the code. Heh.
Starting again: the root of the problem is that /boot is not showing up in
diskset.getLabels(). getLabels() does this:

for part in parts:
    node = get_partition_name(part) # returns 'sda1'
    label = isys.readFSLabel(node)  # returns None (!)

isys.readFSLabel('/dev/sda1'), on the other hand, returns '/boot'. Huzzah!

clumens has prepared an updates.img with a modified isys that prepends '/dev/'
if it's not there. Testing that now.
Comment 10 Chris Lumens 2008-01-30 16:41:49 EST
This should be fixed in the next build of anaconda.  Now to fix the updates.img

Note You need to log in before you can comment on or make changes to this bug.