Ubuntu boots to initramfs BusyBox message

10 Jan

Thinking that installing a virtual kernel for Ubuntu 11.04 would allow my VM to run as paravirtualized (PV) and allow my XenServer Tools to work, I was sadly mistaken.

Once the XenServer Ubuntu VM rebooted, I was no longer able to boot and just received a BusyBox initramfs prompt.

Grub2 is supposed to allow you to hold Shift to get to the grub menu but this did not work at all for me. Just kept seeing a blank screen and eventually the initramfs screen. I think this is a XenServer limitation, as I was trying from the VM console.

The version of grub2 is 1.99 beginning with Ubuntu 11.04 and we can boot with the LiveCD to ChRoot and remove the wrong kernel. Older versions should work too, but I am just letting you know what I was facing.

Boot the appropriate Ubuntu LiveCD (needs to be the exact same bit/version of your installed OS).

Next, mount your disk assuming your /boot partition is not on a separate partition:

sudo mount /dev/sda1 /mnt
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt

Once ChRooted runĀ apt-get remove linux-image-<your-version-to-remove> (review boot/grub/grub.cfg to see what the version is you want to remove: vmlinuz-2.6.32-13-virtual):

apt-get remove linux-image-2.6.38-13-virtual
exit chroot by pressing CTRL-D
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt
sudo reboot

For further details please review the Ubuntu Community Help on ChRoot

Leave a Reply

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