Pain with grub2 when upgrading from Fedora 14 to Fedora 16

I meant to blog this when it was still fresh in my mind, but frankly, it was such a nightmare upgrading my Fedora 14 box to Fedora 16 that I just wanted to put it all behind me and get the basics working again.So I'll just have to make do with mentioning a couple of bits and bobs and hope it triggers enough of a memory and decent Google search that it'll help me in the future.

My main problem, I think stems from the fact that I am using software RAID, with 2x 2TB dives mirrored.  Fedora's preupgrade doesn't cope with /boot being RAIDed, so I had to to a DVD upgrade.  Then I came a cropper withthat because anaconda was causing a kernel crash before I got to start!

I finally found I could coax the DVD into life by booting with the kernel option selinux=0, as it appeared as if the kernel callstack was in SELinux code at the crash point.

Once I'd done that, the upgrade proceeded, but crapped out cleaning up packages.  I don't think any damage was done, and it had at least updated my boot loaded to grub2.  That was a problem I'd had with both my old PC (now a bedroom MythTV frontend) and my laptop;  on both those occasions, I'd not had the patience to figure out the various installation issues (on the old PC grub2 wouldn't install as there wasn't enough space in the gap between the MBR and the first partition - there's no fix to that bar repartitioning the drive!) so I ended up doing fresh installs.

This time around, I wanted to work through to pain (of grub2 and systemd!) so as to better understand them in case of emergency down the road.

Anyhow, the main thrust of this blog is the grub2 issues I had:  after the install, I just got something like “disk not found” out of grub 🙁

I was at least able to boot into rescue mode from the DVD and use /mnt/sysimage in investigate.  And the investigation took the best part of a whole day, from morning till dusk 🙁

grub2 is complicated.  The grub.cfg config. file it uses actually has config. files that are used to build it, and separate commands to build those.  Grief.

The issue came down to grub not understanding that I had RAID, and so its RAID module wasn't included in the installation.  I believe the final fix came down to having a broken /boot/grub2/, which I had to rebuild using grub2-mkdevicemap.

And then rebuilt the grub config. file with grub2-mkconfig.  And I'm pretty sure I had to rebuild the kernel ram disk (initrd) with dracut as well ...

Finally, I ended up with decent stuff in the grub.cfg (/etc/grub2.cfg links to it), most importantly the raid module references, and I could finally get into run-level 1 (or whatever it's called now).

It doesn't sound much but it took me hours of digging to get that far.  If I remember, and I still have my scrawls on my pad, I may be able to add some flesh to this later.


About fnx

PSN: the_phoenix
This entry was posted in Software and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *