Friday, March 19, 2010

Ubuntu Wubi install fails to boot after kernel update

On the laptop I use at work, like in most big corporates, there's a Windows environment installed. Messing around with creating and deleting partitions is not a good idea when carrying ongoing projects around. So the best option for me to safely install a Linux system on that laptop was to use Wubi.

Installation went without a glitch, the setup ran fine for months. I installed Ubuntu 9.10 running on a 12GB image file on my NTFS partition. Sure I loose a little disc speed compared to an install on a dedicated partition, but not so much that it becomes annoying.

But then there was that kernel update, and the reboot, and within seconds I was looking at the GRUB prompt. Hrmmm, not good. Now what?

Fixing this problem was not so hard to do (I found a solution on the Ubuntu forums). At the GRUB prompt start typing the following (the lines starting with # are comments obviously):

# load the ntfs module
insmod ntfs
#set root depending on where you have wubi installed typically its (hd0,1) for the Windows c-drive
set root(hd0,3)
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
#set the kernel, you can complete the "..." by pressing the "tab" key and pick your kernel
# /dev/sda3 is where my root is installed, also here typically use sda1 for the c-drive
linux /boot/vmlinuz... root=/dev/sda3 loop=/ubuntu/disks/root.disk ro
#set the initrd image, you can complete the "..." by pressing the "tab" key
initrd /boot/initrd/initrd.img...
#now boot the environment you just setup
boot

After entering the "boot" command, hopefully, you'll see your system waking up again from it's GRUB hibernation. After login redo the grup setup/configuration by executing the following command, so next time you see your old trusty Grub boot menu again:

sudo update-grub

It took me about half an hour to get my system running again.

Now, after reading up on it, it seems that the above solution might not be a permanent one. It could happen again on the next kernel update. Check out this wiki post: Wubi 9.10 boot problems

1 comment:

Unknown said...

set root(hd0,3)
actually should be
set root=(hd0,3)
took me a while to figure that out

Then I updated grub
sudo update-grub2