Thursday, November 18, 2010

How to fix broken grub when you have /boot on different partition.

I recently upgraded my Ubuntu Desktop (64 bit) to 10.10. This upgrade broke my bootup and started throwing me to initramfs prompt.
After googling a bit and trying unsuccessfully instructions from here I found a simple solution.

I have a slightly differnt setup than what Grub assumes (boot and root on same partition).
I have my boot partition on (hd0,msdos3) and root partition on (hd0,msdos5). Grub assumed that both are on (hd0,msdos3) so added the root entry pointing to the same and tried to use kernel and initrd images from root.

To fix the issue all I had to do was use live USB key to boot into linux and mount partition (hd0,msdos3) and edit grub/grub.cfg to set root=(hd0,msdos5) and load kernel from (hd0,msdos3)/ and same for initrd.

This simple fix worked after lot of unsuccessful attempts to install grub and let it configure the boot configuration.

I am pretty sure this is going to break once the new kernel version is updated in future by update-manager. However, now atleast I know what to expect and how to fix with this post.

I would be happy to try suggestion on how to fix it in better way than what I did.

No comments: