Bug 130574 - /etc/rc.d/rc.sysinit starts udev even when it is not really available
Summary: /etc/rc.d/rc.sysinit starts udev even when it is not really available
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
Blocks: FC3Target
TreeView+ depends on / blocked
Reported: 2004-08-22 01:04 UTC by Michal Jaegermann
Modified: 2014-03-17 02:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-10-14 04:44:15 UTC

Attachments (Terms of Use)

Description Michal Jaegermann 2004-08-22 01:04:59 UTC
Description of problem:

In the current version of startup there is the following code:

if [ -f /etc/udev/udev.conf ];then
        . /etc/udev/udev.conf

if [ "$USE_UDEV" = "yes" -a "$UDEV_RAMFS" = "yes" ]; then
        [ -x /sbin/start_udev ] && /sbin/start_udev

So far, so good but if 'initrd' image was done without udev
(for whatever reasons; a flag '--noudev' was used, for example,
or anything else) then this will run /sbin/start_udev when
really there is no such thing.  See bug #130573 for an example
of side-effects.

A check that something is indeed mounted on $udev_root, as
defined in /etc/udev/udev.conf, is missing here.  It will have
to peek into /proc/mounts but if /proc is not mounted yet then
/sbin/start_udev will fail too.

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

How reproducible:

Comment 1 Michal Jaegermann 2004-08-24 20:52:15 UTC
Even if the current rawhide version of udev is changing a default
configuration to UDEV_RAMFS=no then it seems to me that a check
like that should be employed:

--- /etc/rc.d/rc.sysinit~	2004-08-20 09:57:15.000000000 -0600
+++ /etc/rc.d/rc.sysinit	2004-08-24 14:30:05.563598249 -0600
@@ -34,7 +34,13 @@ if [ -f /etc/udev/udev.conf ];then
 if [ "$USE_UDEV" = "yes" -a "$UDEV_RAMFS" = "yes" ]; then
-	[ -x /sbin/start_udev ] && /sbin/start_udev
+	if [ "$UDEV_KEEP_DEV" = "yes" ] ; then
+		[ -r /proc/mounts ] && \
+		    grep -q " ${udev_root%/} " /proc/mounts && \
+		    [ -x /sbin/start_udev ] && /sbin/start_udev
+	else
+	    	[ -x /sbin/start_udev ] && /sbin/start_udev
+	fi
 # Check SELinux status

(although a logic in /sbin/start_udev seems to be somewhat
convoluted).  Alternatively something like a patch attached to
bug #130808 seems to be needed; or maybe both so initscripts
may not presume that /sbin/start_udev is always correct.

Comment 2 Chris Kloiber 2004-08-25 18:12:35 UTC
I've found it's currently impossible to use MD or LVM devices thanks
to this. It only seems to work whan there is no software raid or LVM
on the system. udev is currently being started on the real rootfs when
it's mounted ro, so no device entries are being created.

Comment 3 Bill Nottingham 2004-10-14 04:44:15 UTC
This is 'fixed' now in the way that udev is used.

Note You need to log in before you can comment on or make changes to this bug.