From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Several udev questions
Date: Sat, 13 May 2006 17:14:10 +0000 [thread overview]
Message-ID: <20060513171410.GA14775@vrfy.org> (raw)
In-Reply-To: <20060512200007.GA9141@localhost.localdomain>
On Fri, May 12, 2006 at 10:00:07PM +0200, Ondrej Zajicek wrote:
> 1) When i start system, i mount /dev, started udevd and udevtrigger. I
> don't explicitly copy (from /lib/udev/devices) or create any device
> nodes. It looks like all needed nodes are created in this way, although
> documentation (README) suggests copying some nodes before udevd start.
> What is the correct way - is the documentation obsolete, or am i miss
> something important?
/dev/null is needed by udevd itself, it will not fail but should be
around. Depending on the init scripts and what stuff you call from udev
rules, you may want more nodes directories and symlinks.
> 2) What is recommended time of start of udevd? I think it should be
> started early during boot process (i run it just after remounting root
> to rw) to create all needed devices. But if i want to do logging, i have
> to start syslogd before ulogd. But it is usually expected to run syslogd
> more late, especially after mounting of other filesystems from fstab (in
> case of /var on separate partition).
As you want device nodes for all other stuff, you need to start it as early
as possible. For now, it just logs to the console, if syslog is not available.
> Maybe there should be something like kernel's dmesg buffer to store ulogd
> messages generated before start of syslog.
You could change udev to write to /dev/kmsg and see it in dmesg. I think
the klibc build is doing this.
> 3) When i insert CF (and other) media with partition table, there is no
> hotplug event (for new partitions). I found some hacks like adding all
> possible partitions for that devices. Is the correct solution for this
> problem that kernel should send hotplug events in that case?
You need to open() the device something like every 2 seconds, to let the
kernel read the device state and discover media changes, then it will send
you the events. It's up to userspace to poll, like we do with HAL, at least
on all recent Desktop systems.
> 3) example configuration in /etc/udev/slackware has KERNEL= instead of
> KERNEL=
>
> 4) MODEd4 for event devices (in /etc/udev/frugalware/udev.rules)
> is pretty crazy.
It's up to the distro guys to send updated example rules, I don't have
these distros around and therefore can't update it.
> 5) What is a good place to load useful, subsytem specific but not
> dependent modules like sd_mod for SCSI disks, lp for parport devices,
> snd_pcm_oss for soundcards?
>
> - in /etc/modules or something similar?
> disadvantage - not very hot-plug.
I think it's fine, to load all module that are needed but don't autoload,
there are only very few left these days.
> - In module-init-tools (modprobe) configuration as install rule?
> disadvantage - as there is no concept of subsystem membership so there
> have to be one rule for one specific hardware driver, not one for class
> of drivers.
Hmm, you probably don't want to list all modules that create a device
that can also be used with a second module.
> - in udev.rules file?
We already do something like this:
SUBSYSTEM="scsi_device", ACTION="add", SYSFS{type}="0|7|14", RUN+="/sbin/modprobe sd_mod"
You could also try to add MODALIAS strings to the kernel scsi device
and match strings to the modules, than they would get autoloaded the
usual way.
Kay
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2006-05-13 17:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-12 20:00 Several udev questions Ondrej Zajicek
2006-05-13 17:14 ` Kay Sievers [this message]
2006-05-16 16:07 ` Andrey Borzenkov
2006-05-16 20:34 ` Darren Salt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060513171410.GA14775@vrfy.org \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).