* udevstart vs udevsend vs /sbin/hotplug
@ 2005-09-15 15:42 Jim McQuillan
2005-09-15 16:13 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jim McQuillan @ 2005-09-15 15:42 UTC (permalink / raw)
To: linux-hotplug
I'm still trying to wrap my brain around udev and all its friends.
i've got an LTSP thin client booting, and i've got udev-069. As part of
the startup process, I mount the /sys, /dev, /proc filesystems,
and then I run /etc/start_udev, which populates my /dev tree.
I've found the udev rules.d, and added some RUN commands, so I could
watch what is happening. I've also seed udevmonitor, and it shows
events, when I plug/unplug my USB memory stick.
But, device nodes don't get created. If I then do this:
modprobe sd_mod
modprobe usb-storage
Then, the device nodes are all created.
So, I know that udev is doing its thing.
What I can't figure out is where the hotplug scripts fit in.
I read Greg's article on LWN (http://lwn.net/Articles/123932/).
Great article btw. It helped me understand alot about the process of
hotplugging. I really could have used that article last year, when we
did our first hotplug system for LTSP.
I was understanding just fine, until I got to the 2nd-to-last paragraph.
It says to use '/sbin/udevstart' in /proc/sys/kernel/hotplug. BUT,
udevstart looks like it should only be run once, at system startup.
I'm thinking /sbin/udevsend it the correct thing to handle hotplug
events, but I can't see how (or even if) it interfaces with the hotplug
scripts. So, I can't see where the kernel modules get loaded.
I've started down the path of tracing the source code, to see what
happens, but the usual outcome is my brain explodes :)
So, someone, please give me a clue about when the kernel modules get
loaded.
I really think i'm within a few hours of understanding the whole
process. Then, I can get on with my work of pushing the events up to
the LTSP server, where the users session is running.
Thanks,
Jim McQuillan
jam@Ltsp.org
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udevstart vs udevsend vs /sbin/hotplug
2005-09-15 15:42 udevstart vs udevsend vs /sbin/hotplug Jim McQuillan
@ 2005-09-15 16:13 ` Kay Sievers
2005-09-15 16:48 ` Jim McQuillan
2005-09-15 17:52 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2005-09-15 16:13 UTC (permalink / raw)
To: linux-hotplug
On Thu, Sep 15, 2005 at 11:42:53AM -0400, Jim McQuillan wrote:
> I'm still trying to wrap my brain around udev and all its friends.
>
> i've got an LTSP thin client booting, and i've got udev-069. As part of
> the startup process, I mount the /sys, /dev, /proc filesystems,
> and then I run /etc/start_udev, which populates my /dev tree.
>
> I've found the udev rules.d, and added some RUN commands, so I could
> watch what is happening. I've also seed udevmonitor, and it shows
> events, when I plug/unplug my USB memory stick.
>
> But, device nodes don't get created. If I then do this:
>
> modprobe sd_mod
> modprobe usb-storage
>
> Then, the device nodes are all created.
>
> So, I know that udev is doing its thing.
>
> What I can't figure out is where the hotplug scripts fit in.
>
> I read Greg's article on LWN (http://lwn.net/Articles/123932/).
> Great article btw. It helped me understand alot about the process of
> hotplugging. I really could have used that article last year, when we
> did our first hotplug system for LTSP.
>
> I was understanding just fine, until I got to the 2nd-to-last paragraph.
> It says to use '/sbin/udevstart' in /proc/sys/kernel/hotplug. BUT,
> udevstart looks like it should only be run once, at system startup.
Right. it's udevsend. Greg, can you fix the article?
> I'm thinking /sbin/udevsend it the correct thing to handle hotplug
> events, but I can't see how (or even if) it interfaces with the hotplug
> scripts.
Older udev versions handled /etc/hotplug.d/ internally, with newer versions
you need to plug it in as rules. Look at the distro rules in the udev tree for
MODALIAS and RUN keys with modprobe. If you want to stick with /etc/hotplug.d/,
look at the RELEASE-NOTES for udev 059.
Kay
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udevstart vs udevsend vs /sbin/hotplug
2005-09-15 15:42 udevstart vs udevsend vs /sbin/hotplug Jim McQuillan
2005-09-15 16:13 ` Kay Sievers
@ 2005-09-15 16:48 ` Jim McQuillan
2005-09-15 17:52 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Jim McQuillan @ 2005-09-15 16:48 UTC (permalink / raw)
To: linux-hotplug
On Thu, 15 Sep 2005, Kay Sievers wrote:
>
> > I'm thinking /sbin/udevsend it the correct thing to handle hotplug
> > events, but I can't see how (or even if) it interfaces with the hotplug
> > scripts.
>
> Older udev versions handled /etc/hotplug.d/ internally, with newer versions
> you need to plug it in as rules. Look at the distro rules in the udev tree for
> MODALIAS and RUN keys with modprobe. If you want to stick with /etc/hotplug.d/,
> look at the RELEASE-NOTES for udev 059.
Awesome!! I've found the example rules, put a few of my own in there,
and now when I plug in the USB device, the modules get loaded and the
device nodes appear.
This is SO much better than the old way we were doing it.
Your help is most appreciated.
Thanks,
Jim McQuillan
jam@Ltsp.org
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udevstart vs udevsend vs /sbin/hotplug
2005-09-15 15:42 udevstart vs udevsend vs /sbin/hotplug Jim McQuillan
2005-09-15 16:13 ` Kay Sievers
2005-09-15 16:48 ` Jim McQuillan
@ 2005-09-15 17:52 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2005-09-15 17:52 UTC (permalink / raw)
To: linux-hotplug
On Thu, Sep 15, 2005 at 06:13:34PM +0200, Kay Sievers wrote:
> On Thu, Sep 15, 2005 at 11:42:53AM -0400, Jim McQuillan wrote:
> >
> > I was understanding just fine, until I got to the 2nd-to-last paragraph.
> > It says to use '/sbin/udevstart' in /proc/sys/kernel/hotplug. BUT,
> > udevstart looks like it should only be run once, at system startup.
>
> Right. it's udevsend. Greg, can you fix the article?
Ick, stupid typo, sorry about that. Hm, I don't know if I can change
the article, I'll ask the editors about that...
thanks,
greg k-h
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-09-15 17:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-15 15:42 udevstart vs udevsend vs /sbin/hotplug Jim McQuillan
2005-09-15 16:13 ` Kay Sievers
2005-09-15 16:48 ` Jim McQuillan
2005-09-15 17:52 ` Greg KH
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).