Wednesday, June 29, 2011

Upgrade to Fedora 15

After moving /boot to LVM I can run preupgrade.

At the end of preupgrade, it came up with an error because my /boot was in LVM

Traceback (most recent call last):
File "/usr/share/preupgrade/preupgrade-gtk.py", line 259, in on_assistant_apply
self._do_main()
File "/usr/share/preupgrade/preupgrade-gtk.py", line 278, in _do_main
self.main_preupgrade()
File "/usr/share/preupgrade/preupgrade-gtk.py", line 497, in main_preupgrade
extra_args += " ks=%s" % self.pu.generate_kickstart()
File "/usr/lib/python2.7/site-packages/preupgrade/__init__.py", line 601, in generate_kickstart
return dev.bootpath_to_anacondapath(targetfile, UUID=True)
File "/usr/lib/python2.7/site-packages/preupgrade/dev.py", line 91, in bootpath_to_anacondapath
raise PUError, "/boot is on RAID device %s" % bootdev
preupgrade.error.PUError: /boot is on RAID device dm-15

To fix this, I had to add a /etc/grub.d/35_preupgrade file to the grub2 config scripts (and chmod 755 to the file)


#!/bin/sh
exec tail -n +3 $0
#############
# Custom script for F14->F15 preupgrade
#############
menuentry "Fedora 15 Preupgrade" {
insmod lvm
insmod ext2
set root='(vg_rootvg-boot_lv)'
echo Loading Fedora 15 Preupgrade
linux /boot/upgrade/vmlinuz
initrd /boot/upgrade/initrd.img
boot
}

Added that file, ran grub2-mkconfig / grub2-install on my /dev/sdc again. Now grub2-mkconfig adds an entry for the new "Fedora 15 Preupgrade" item in the Grub2 menu.

Reboot and saw the new entry. Selected it and the Fedora 15 preupgrade ran successfully.

New entries were added to the Grub2 menu after the F15 installation. On first boot, it generated a kernel panic "Kernel Panic not syncing vfs" because the boot procedure couldn't find root.

Had to re-run grub2-mkconfig to have it automaticallly add a missing initrd line in the boot procedure

menuentry "GNU/Linux, with Linux 2.6.38.8-32.fc15.i686.PAE" --class gnu-linux --class gnu --class os {
set gfxpayload=keep
insmod lvm
insmod ext2
set root='(vg_rootvg-boot_lv)'
search --no-floppy --fs-uuid --set 856a58e8-4d98-4ef3-a062-7b6982f6d8f9
echo Loading Linux 2.6.38.8-32.fc15.i686.PAE ...
linux /vmlinuz-2.6.38.8-32.fc15.i686.PAE root=UUID=f25ba21c-194e-49cd-a347-fd0540a96c1b ro rdblacklist=nouveau nouveau.modeset=0 quiet rhgb
echo Loading initial ramdisk ...
initrd /initramfs-2.6.38.8-32.fc15.i686.PAE.img
}

No comments: