LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-16-2006, 08:15 PM   #1
SlackwareInAZ
Member
 
Registered: Apr 2005
Posts: 55

Rep: Reputation: 15
Udev, rc.S & rc.hotplug interactions


Lately, since the udev and sysvinit updates have been coming fast and furious, I notice that during bootup I have an error where /etc/rc.d/rc.S is trying to mount usbfs when it is already loaded in /etc/mtab presumably by udev.

Patrick first talked about during the 7/26 current changelog, and again on 08/01.

The error first started when I followed Patrick's advice listed in the 08/12 current changelog regarding not needing rc.hotplug when running a kernel 2.6.15 or newer (am using 2.17.8).

With rc.hotplug enabled, no error, With it disabled, my workaround was to comment out the references to mounting usbfs about 2/3 the way down rc.S. No more error. This is with the newest udev 97-2 and sysvinit -64 with rc.hotplug disabled.

P.S. Everything works fine with my rc.S modification and I haven't updated to the 08/16 changes, but I am curious what the correct solution is and is anybody else having this problem using rc.S "out of the box"?

Thanks for any suggestions and assistance,
Gary
 
Old 08-16-2006, 08:23 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,754

Rep: Reputation: 169Reputation: 169
I haven't seen this exact problem, but I did have problems with Pat's rc.optical-symlinks script. This problem has now been fixed, after having emailed Pat with the details on Sunday.

Perhaps you should drop Pat a line, because I'm sure he'd like to have this fixed before release time.

Apply the latest changes first, and see if the problem is still occurring.
 
Old 08-17-2006, 05:55 PM   #3
SlackwareInAZ
Member
 
Registered: Apr 2005
Posts: 55

Original Poster
Rep: Reputation: 15
rkelsen,

Just upgraded to the newest upgrades listed in the 08/16 current changelog. Sysvinit is -65. Udev is 97-i486-3. Newest rc.hotplug, too.

Problem still exists with the "out of the box" rc.S configuration.

I am not a coder, but I think I see the issue.

In rc.udev, line #66:

# Mount usbfs:
if ! grep -wq usbfs /proc/mounts ; then
if [ -d /proc/bus/usb ]; then
mount usbfs -t usbfs /proc/bus/usb -o devgid=10,devmode=0666
fi
fi
fi

And voila, usbfs is mounted and added to /etc/mtab as follows:

none /proc/bus/usb usbfs rw,devmode=0666,devgid=10 0 0

In rc.S at line 290:

# Mount usbfs if we're not using hotplug:
if grep -wq usbfs /proc/filesystems; then
if /bin/grep -wq nohotplug /proc/cmdline || /bin/test ! -x /etc/rc.d/rc.hotplug ; then
/sbin/mount -v usbfs /proc/bus/usb -t usbfs
fi
fi

I think if this code was modified to check to see if either/or rc.udev/rc.hotplug is running, rc.S would not try to mount usbfs again.

So how does this code need to be massaged to check for udev running?

Or how do I throw this back at Patrick, as I agree that a fix is probably very simple and would love for it to be fixed before Slackware 11 is finalized.

Thanks, Gary
 
Old 08-17-2006, 06:30 PM   #4
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,754

Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by SlackwareInAZ
In rc.udev, line #66:

# Mount usbfs:
if ! grep -wq usbfs /proc/mounts ; then
if [ -d /proc/bus/usb ]; then
mount usbfs -t usbfs /proc/bus/usb -o devgid=10,devmode=0666
fi
fi
fi

And voila, usbfs is mounted and added to /etc/mtab as follows:

none /proc/bus/usb usbfs rw,devmode=0666,devgid=10 0 0

In rc.S at line 290:

# Mount usbfs if we're not using hotplug:
if grep -wq usbfs /proc/filesystems; then
if /bin/grep -wq nohotplug /proc/cmdline || /bin/test ! -x /etc/rc.d/rc.hotplug ; then
/sbin/mount -v usbfs /proc/bus/usb -t usbfs
fi
fi

I think if this code was modified to check to see if either/or rc.udev/rc.hotplug is running, rc.S would not try to mount usbfs again.
I'm not a programmer either, but it appears to me that rc.S runs first.

Also, it seems that the code in rc.udev checks to see if there's a usbfs mounted before it does the same.
Quote:
Originally Posted by SlackwareInAZ
Or how do I throw this back at Patrick, as I agree that a fix is probably very simple and would love for it to be fixed before Slackware 11 is finalized.
Maybe there needs to be another test in rc.S to look for an executable /etc/rc.udev before running that code?

Anyhow, send Pat a short email describing the symptoms and the conditions which cause them (i.e. non-executable rc.hotplug).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
udev / usb / hotplug rigelan Slackware 4 07-28-2006 03:56 PM
hotplug, udev, and module loading shievelet Linux - General 1 06-06-2006 05:19 AM
udev, hotplug and kernel hussam Linux - General 2 02-18-2006 11:01 PM
installing hotplug removes hal & udev. How to get rid? dimarcoe Linux - Software 5 01-07-2006 08:16 PM
udev+hotplug+2.6.6=questions shilo Slackware 4 05-31-2004 08:43 PM


All times are GMT -5. The time now is 03:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration