Bug 132862

Summary: udev-030-26 broken (removes dev, gives "unable to open an initial console" warning on reboot)
Product: [Fedora] Fedora Reporter: Pete Gale <pete>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 2CC: byte, davidf, dm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-20 13:18:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pete Gale 2004-09-18 03:20:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

Description of problem:
I just upgraded to udev-030-26. Sound was immediately broken, and
rebooting gave me an "unable to open an initial console" warning
before freezing.

Looking at the results of `rpm -Uvh --test udev-030-26.i386.rpm`
reveals that this version removes previous versions of udev AND dev.
Previous versions of udev (030-24) only updated udev. Removing dev is
what got me.

To recover from this, I had to do the following:

1) Reboot with a rescue cd, have it detect my FC2 install.
2) `chroot /mnt/sysimage` to use my install.
3) Locate my previous versions of dev and udev (in /var/spool/up2date/
for me).
4) `rpm -Uvh --oldpackage dev-3.12-1.i386.rpm udev-030-24.i386.rpm` to
revert to the previous version of udev and reinstall dev.
5) `exit` and reboot.

Hope this helps.

Version-Release number of selected component (if applicable):
udev-030-26

How reproducible:
Always

Steps to Reproduce:
1. Update to udev-030-26.
2. Sound should immediately die, because dev is gone.
3. Compare `rpm -Uvh --test udev-030-26.i386.rpm` to `rpm -Uvh --test
udev-030-24.i386.rpm` to see the reason.
    

Actual Results:  On reboot:

Warning: unable to open an initial console

(Then the system hangs.)

Additional info:

Comment 1 Colin Charles 2004-09-19 13:50:06 UTC
Do a fresh install of the latest tree, with this udev (and no dev) on
powerpc, and then you need to run yabootconfig. Try running parted
too, and that fails as well.

parted complains about not having a device (retry/cancel). This is on
a fully 100% rawhide latest install (as opposed to it being on FC2).
Lots of complaints on fedora-test-list as well

Comment 2 Daniel Malmgren 2004-09-20 09:36:38 UTC
Confirming this behaviour. I thought I was missing something in my
kernel (I'm running a custom one), but you are running Fedora
kernel's, right?

Comment 3 Daniel Malmgren 2004-09-20 12:42:40 UTC
I fixed this one by changing the configuration parameter UDEV_INITRD
from "yes" to "no". Seems that the problem for me was that I don't use
any initrd.

Comment 4 Pete Gale 2004-09-23 01:37:49 UTC
Replace `rpm -Uvh --test *.rpm` with `rpm -Uvvh --test *.rpm` and
you'll see what I was talking about.

I'm confused why this issue was closed, given that there was no
explanation nor any reference to what else could have possibly been
responsible. (If the kernel version matters, I'm using the FC2
2.6.8-1.521 kernel.) If this was already discussed on a mailing list,
please provide a link to that thread before summarily closing this issue.

I just checked the latest udev (version 032-1) and it removes dev as
well. I'm not inclined to upgrade udev, given what happened last time.

Comment 5 Harald Hoyer 2004-09-23 08:24:40 UTC
The steps to upgrade without anaconda or a rescue CD are (NOT
recommended):
- start from a kernel-2.6
- make sure /sys is mounted
- install the new initscripts
- install the new udev
- execute /sbin/start_udev
- install the new mkinitrd
- install a new kernel 
- or mkinitrd for your existing kernel(s)

Comment 6 Thomas Zehetbauer 2004-09-27 13:25:49 UTC
I have been struck by this bug as well, had to recover from backup,
udev %postinstall should really call start_udev after killing /dev

Comment 7 David Fraser 2004-10-02 06:52:01 UTC
This affected me yesterday when doing an apt-get upgrade to fc3t3
devel rpms.

Why has this been marked as not a bug? It totally hosed my system
without any warning ... surely comment #6 should apply, so that
/dev/console is not removed...

Comment 8 Harald Hoyer 2004-10-04 08:21:06 UTC
David, do you use an initrd?

Comment 9 David Fraser 2004-10-04 08:40:30 UTC
Harald, yes I do (at least I have an initrd in /boot for every
available kernel) - should this handle this problem?
I'm fairly hopeful now that I fixed it that if I reboot it will work,
but I don't want other people to upgrade and have the same problem.
I did an apt-get dist-upgrade, and was already using a 2.6 kernel, so
that should all have been handled correctly.

Looking at it now, I think the problem was that my rc.sysinit was
modified so rpm saved the new rc.sysinit as rc.sysinit.rpmnew and I
hadn't merged it. The new one has a call to restorecon - would that
have made it work? If thats the case then I guess this bug is fine and
it was my fault, but a bit scary!

Comment 10 Harald Hoyer 2004-10-04 08:56:39 UTC
well, I am sure a diff of rc.sysinit and rc.sysinit.rpmnew will show
more differences... and I am sure this is the cause of your failure..

Comment 11 Pete Gale 2004-10-05 03:32:53 UTC
I have not modified rc.sysinit, so I only have the default rc.sysinit.
That is not the cause of the failure I saw.

I am currently using initscripts-7.82-1, udev-030-24, and the FC2
kernel-2.6.8-1.521. All of the kernels are Fedora versions (no
recompiling, or special options added) and have been installed using
`rpm -ivh <kernel>`, so I have the appropriate initrd for every kernel
version installed. Once I upgraded udev, none of them worked.

I have a FC2 install, but am using the rawhide updates. The only
change worth mentioning is setting SELINUX=permissive, but I don't
know why that would affect udev.

rc.sysinit uses this code to run restorecon:

if [ -x /sbin/restorecon ] && fgrep -q " /dev " /proc/mounts ; then
        /sbin/restorecon  /dev /dev/null
        /sbin/restorecon  /dev/* 2> /dev/null
fi

For me, a cat of /proc/mounts yields:

rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
none /selinux selinuxfs rw 0 0
/proc /proc proc rw,nodiratime 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
/sys /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0

Since nothing matches the fgrep " /dev " expression, restorecon is not
run here. Is this a problem with the script, or is something else
wacky on my system?