[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: use udev (was Re: Max number of ide disk atteched)



On Wed, Mar 24, 2004 at 07:12:43PM +0000, Pigeon wrote:
| On Wed, Mar 24, 2004 at 12:48:43PM -0500, Derrick 'dman' Hudson wrote:
| > On Tue, Mar 23, 2004 at 10:18:59PM -0800, Paul Johnson wrote:
| > | "Derrick 'dman' Hudson" <dman@dman13.dyndns.org> writes:
| > | 
| > | > The thing with udev is it is all userspace, therefore it works with
| > | > any 2.6 kernel (that has SYSFS in it).  You can upgrade udev without
| > | > touching your kernel, unlike devfs.  I've been using udev for a few
| > | > weeks now (since 0.18 arrived in "experimental") and I haven't had
| > | > any major problems (only a hurdle or two).
| > | 
| > | OK.  So how does it work?  You've got my interest piqued.  Does it
| > | work kinda like devfs, or does it maintain the devices nodes on disk?
| > 
| > Have you booted with a 2.6 kernel yet?  If so, take a look in /sys.
| 
| Is this automatic with Debian kernel packages? With a DIY 2.6 I had to
| create /sys and mount it by hand (the /etc/fstab entry is as for /proc
| but s/proc/sys/g).

$ dlocate /etc/init.d/mountkernfs
libc6: /etc/init.d/mountkernfs

$ dpkg -l libc6
ii  libc6          2.3.2.ds1-11   GNU C Library: Shared libraries and Timezone

--- excerpt from /etc/init.d/mountkernfs
### sysfs mount
#
#	sysfs is introduced in the middle of kernel 2.5.
#	The current practice is that /sys is used for mounting sysfs.
#
sysfs_avail=`grep -ci '[<[:space:]]sysfs' /proc/filesystems || true`
sysfs_mounted=`grep -ci '[<[:space:]]/sys' /proc/mounts || true`

if [ "$sysfs_avail" != 0 ] && [ "$sysfs_mounted" = 0 ]
then
	mount -t sysfs sysfs /sys
fi
---


Hmm, maybe I had to create /sys first.  At any rate I had created /sys
in anticipation of udev before udev was available in a package.  I
have no entry in /etc/fstab for /sys, and I think I could remove the
/proc entry as well (another script, or an earlier part of that one,
mounts /proc automatically).

-D

-- 
Q: What is the difference between open-source and commercial software?
A: If you have a problem with commercial software you can call a phone
   number and they will tell you it might be solved in a future version.
   For open-source sofware there isn't a phone number to call, but you
   get the solution within a day.
 
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org

Attachment: signature.asc
Description: Digital signature


Reply to: