ADAM'S WEB PRESENCE

3 June 2008

UDEV swapped my drives!

Filed under: Nerd Notes — adam @ 4:18 pm

After doing a dist-upgrade on a Debian Etch system, it would no longer boot! It loads the kernel and then stops displaying the following message:

Waiting for root filesystem

I’ve just spent a few torturous hours trying to get it back up again. It took me a while to figure out what was happening but it seems that the updated package for UDEV changes the GRUB configuration so it tries to mount hdb1 instead of hda1 as the root file system. Of course hdb1 does not exist on this single-drive machine so it just sits there like a moron.

Turns out it is not frozen. If you wait about 3 minutes, it will eventually come up with the following prompt:

(initfs)

I found that I can kind of get the system running by typing the following commands. These are for a single-partition system on an EXT3 file system on an IDE hard drive. If your system is different, you will need to modify them a bit:

mkdir /mnt

mount /dev/hda1 -t ext3 /mnt

chroot /mnt

login

Then log in. The next thing to do is to correct the GRUB configuration:

nano -w /boot/grub/menu.lst

Change the root=/dev/sdb1 entry to root=/dev/sda1. Once again, this is for a single IDE drive, you may need to change it if you are booting from SATA or some other kind of device.

Now regenerate the initramfs image:

dpkg-reconfigure initramfs-tools

At last we can reboot. The system came up fine for me after this.

reboot

2 Comments »

  1. Comment by Ben — 4 June 2008 @ 10:58 am

    That doesn’t make sense! udev messing with /boot/grub/menu.lst ? I hope the package gets updated to undo this.

  2. Comment by adam — 4 June 2008 @ 10:42 pm

    It seems that is what happened. I got it all fixed up and just to test, I ran “dpkg-reconfigure udev” and sure enough the menu.lst entries were all changed to /dev/hdb1 again.

RSS feed for comments on this post. TrackBack URI

Leave a comment


Powered by WordPress