Weblog entry #2 for bacula
This is really good one and this will help more people
Comments on this Entry
[ Parent | Reply to this comment ]
There's a problem with udev on Debian that can bite you on a kernel upgrade or even on a fresh install. Basically, hard drive partition device names aren't persistent enough across kernel+initrd changes. I have seen a PATA system where the installer generated an /etc/fstab file with "/dev/hda" names, but the installed kernel booted and told udev to generate "/dev/sda" device nodes. This also happened to me when I upgraded a fresh Etch install to Lenny. Ubuntu Feisty also has the problem.
The symptom is the system hangs during boot, "waiting for root file system." But the root file system device node passed in from /boot/grub/menu.lst never gets created because udev created a different name instead. After a while, the boot script gives up and falls back to the busybox shell in initrd. You get a prompt, "(initramfs)", that doesn't mean anything to a newcomer.
IF you know what's happening, you can change $ROOT to the right name and exit busybox (how does that work?) and your system will boot, sort of. But your other partitions will have wrong names too. Correcting $ROOT is not enough.
You could boot from a rescue disk and run update-initramfs. But that would copy the newly erroneous /etc/fstab into your initrd and you wouldn't be any better off.
The best workaround I've found is to label all file system and swap volumes, and replace all the /dev/[hs]d* filenames in /etc/fstab and /boot/grub/menu.lst with labels. Then you can still boot when kernel+hotplug+udev gets the names wrong.
for i in hda1 hda3 hda5 hda6 # or whatever partitions you use
do
e2label /dev/$i ide-$i
perl -pi -e "s,/dev/$i,LABEL=ide-$i," \
/etc/fstab /boot/grub/menu.lst
done
swap=hda2 # substitute yours
swapoff /dev/$swap
mkswap -L ide-$swap /dev/$swap
perl -pi -e "s,/dev/$swap,LABEL=ide-$i," \
/etc/uswsusp.conf
update-initramfs -u -k all
It's hard to believe this one evaded testing. Debian QA is pretty good. And it's not really a Debian-specific problem, it's a tricky spot in udev. But if you don't believe it, google for "waiting for root file system" and look at all the people asking WTF, in Linux forums all over the place, and not getting good answers.
[ Parent | Reply to this comment ]