Yesterday, I decided to update my Gentoo Linux computer I use at work by doing a nice:
emerge --sync
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
fdisk -l
# Mount the partitions
mkdir /mnt/gentoo
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
chroot /mnt/gentoo
source /etc/profile
# downgrade udev
echo "=sys-fs/udev-070" >> /etc/portage/package.mask
emerge -av udev
and rebooted my PC :-)
This procedure is also explained/described here, here,
here and also here.
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.
Ajay Ramjatan says
“I then switched off the computer and went home”
Switching off the computer in the middle of an emerge, especially deep world is bound to yield problems. I suggest turning off the monitor only instead.
Hehehe.
Anyway, how are you doing? I see you are quite busy with real life, as I am. Looking forward to having a beer together soon. Its been a while.
Ajay Ramjatan
avinash says
Thanks for spotting this, Ajay!
Life is pretty hectic with a new job and two small kids. But I must say that I’m having a lot of fun learning to become a good parent and also a good lecturer/researcher.
We HAVE to have a beer. Especially that it is now getting hotter and hotter… Call me whenever you are in the vicinity of Quatre-Bornes!
Avinash
aadil says
Anyone said free as in free beer?
selven says
dans vieu caray ena bon lasos, heureusement ena sa related posts widget la, :p learnt something new. nice post.
avinash says
This is something that I’ve told you many times: young people (like you) always have something to learn from old people (like me) :-)
selven says
:p never even doubted it :D
that’s why younger people (like me) are not yet bald (like you).
hahahahahahaha.