Red Hat Bugzilla – Bug 430811
Upgrade from F8 - anaconda doesn't find /boot, traceback trying to write new bootloader config
Last modified: 2008-03-12 16:16:30 EDT
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 126.96.36.199 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))
File "/usr/lib/booty/bootloaderInfo.py", line 1187, in write
justConfig | (not self.useGrubVal))
File "/usr/lib/anaconda/bootloader.py", line 209, in writeBootloader
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
Created attachment 293348 [details]
retested without the USB key inserted; no change.
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?
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
and now the system is OK.
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.
(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)
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()
gives a result of 0. So something's wrong there.
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.
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.
This should be fixed in the next build of anaconda. Now to fix the updates.img