Yesterday, I decided to update my Gentoo Linux computer I use at work by doing a nice:
emerge -avuDN world
I then switched off the
computer monitor (thanks Ajay :-)) and went home. Imagine my surprise when I switched it on this morning to see this very frightening error message:
* Configuring system to use udev ...
/sbin/rc: line 93: 1076 Segmentation fault /sbin/udevstart
followed by something which looked like:
fsck.ext3 No such file or directory while trying to openb /dev/hda2
/dev/hda2 : The superblock could not be read or does ot describe a correct ext3 filesystem. Filesystem could not be fixed. Give root password for maintenance or Ctrl-D to continue
What happened is that, during the upgrade process, udev-068 was replaced by a flawed udev-70 which basically segfaults when used. As a result, no devices (i.e. no disks partitions) were created in /dev hence the kernel panic.
The solution is, obviously, to downgrade to udev-68.
I did it using a Fedora Core 4 bootable CD-ROM in Linux rescue mode (as I did not have a Gentoo Linux CD-ROM handy) :
# Display the list of partitions
# Mount the partitions
mount -t ext3 /dev/hdaX /mnt/gentoo
mount -t ext3 /dev/hdaY /mnt/gentoo/boot
# and proc
mount -t proc none /mnt/gentoo/proc
# get in Gentoo
# downgrade udev
echo "=sys-fs/udev-070" >> /etc/portage/package.mask
emerge -av udev
and rebooted my PC :-)
Important : udev-070-r1 has since been released which corrects the bug.
An update : It is possible to boot without using udev by passing “gentoo=noudev” to the kernel (via grub). You just have to downgrade to 068 or upgrade to 070-r1 for everything to work. It’s much easier than using a bootable CD-ROM.