Stuck at initramfs because grub is looking for non-existant UUID and getting a text editor to fix it

This is mostly for my own reference as it is quite probable that I will forget to manually fix Grub’s menu.lst file next time I update my kernel… Yay – I will never get that hour of my life back.

Basically, if you are stuck at “initramfs” and you need a text editor such as nano or vi, these are the steps you need to take to be able to use the executables that are so tantalisingly close:

  1. mount the disk
  2. move “/dev” to within the new filesystem
  3. “chroot” yourself so you are working as if everything had booted correctly
  4. edit your file and then reboot

In slightly more technical nature (which obviously only applies to post title’s specific circumstances):

mount /dev/xvda1 /root

/scripts/init-bottom/udev

chroot /root /bin/sh

cd /boot/grub/

nano menu.lst

Then delete the “UUID=” bits on basically all the lines, save and reboot.

This entry was posted in Lessons Learnt. Bookmark the permalink.

Leave a Reply

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