Upgrading to Ubuntu 9.10 - Gave up waiting for root device

No Comments

I upgraded my trusty Ubuntu box the other week. Sadly all was not smooth. After the packages had been downloaded and upgraded I rebooted the box. Tried connecting to the box via SSH…no response…dug out a VGA cable and was greeted by the following.

Gave up waiting for root device Common problems: - Boot args (cat /proc/cmdline)     Check rootdelay= (did the system wait long enough?)     Check root= (did the system wait for the right device?) - missing modules (cat /proc/modules; ls /dev) $drive_uuid Alert! /dev/disk/by-uuid/$drive_uuid does not exist. Dropping to shell! setup=0x3400, size =0x3a9480] initrd /boot/initrd.img-2.6.31-14-386 [linux-initrd @0x38b500, 0x837dc0 bytes] BusyBox v1:1.13.3 (Ubuntu 1:1.13.3-1ubuntu7) built in shell (ash) Enter help for a list of builtin commands. (initramfs)


Unfortunately the suggested steps in the error message did not turn up anything useful. For those who can't read geek it suggests running the following commands.

cat /proc/cmdline
This will spit out some info, in this case I was interested in the UUID.

Check rootdelay= (did the system wait long enough?)
It is not mentioned in the error message but rootdelay is a GRUB option. It tells the computer how long to wait in seconds before looking for boot devices. Try adding or increasing the number given in /boot/grub/menu.lst by editing the kernel lines of the file. This did not help in my case.

kernel /boot/vmlinuz-2.6.31-14-386 root=UUID=1c64e5c6-750c-4687-fcec-89906c8a46b3 ro quiet splash rootdelay=30
The next thing it says to check is the root values in GRUB. From my /boot/grub/menu.lst I got.
root (hd0,0)
In my case this is still an IDE hard drive so I know the device is on the primary channel and is the master so this checks out. I then checked the UUID listed for the hard drive in the error message, GRUB ( cat /boot/grub/menu.lst), and cat /proc/cmdline. Alas all these matched.

Poking around the GRUB menu.lst file I noticed that the lines to boot the 9.04 kernel (linux-image-2.6.28-16) were still present. Testing these I found that the recovery mode option worked and gave me access to my hard drive. Small step forward. Something was wrong with GRUB and I set about to find how to reinstall it. My Google-fu was strong and shortly I found grub-install --recheck /dev/sda. Running the grub-install resulted in a message that the filesystem was read only. This is easily solvable by mount -o remount, rw /. Rebooted once more and was greeted by the 9.10 boot splash screen…finally.

Summary

I was able to fix the problem by running the following commands in the 9.04 recovery shell. Using a Ubuntu bootable CD should also work.
mount -o remount, rw / grub-install --recheck /dev/sda

Be the first to write a comment!