Bug 130574 - /etc/rc.d/rc.sysinit starts udev even when it is not really available
/etc/rc.d/rc.sysinit starts udev even when it is not really available
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
Blocks: FC3Target
  Show dependency treegraph
Reported: 2004-08-21 21:04 EDT by Michal Jaegermann
Modified: 2014-03-16 22:47 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-14 00:44:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2004-08-21 21:04:59 EDT
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 16:52:15 EDT
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 14:12:35 EDT
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 00:44:15 EDT
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.