All of lore.kernel.org
 help / color / mirror / Atom feed
* Loading modules on demand with /sbin/hotplug
@ 2007-02-27 17:23 DervishD
  2007-02-27 17:45 ` DervishD
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: DervishD @ 2007-02-27 17:23 UTC (permalink / raw)
  To: linux-hotplug

    Hi all :))

    First of all, if this is not the proper forum, please ignore my
message and point me to the proper place/information source, please ;)

    Well, I'm setting up hotplugging by hand on a do-it-yourself Linux
box, and until now everything has worked ok: udev is up and running, and
succesfully creates/removes dev entries, the dynamic /dev is usable too
with a 2.4 kernel by some booting tricks and udevd runs fast.

    My next step is to automatically create mount points and load needed
modules as soon as some devices are plugged into the system. Here is
where I need some advice, because none of my approaches have worked
100%.

    Since I would like to avoid things like HAL and the like, my first
try was to use the "RUN" key, containing a script that creates mount
points and loads modules. The script, run by hand, works like a charm.
Unfortunately, I was having problems getting the remove events, since I
was filtering by "ATTRS{serial}" and at removing time, the parent device
(which contained that information) was removed before the "final" device
(that is, the one that caused the /dev entry using "NAME").

    Trying to find a correct combination of keys to filter seemed
difficult and so I tried a different approach. This time I put my script
as /sbin/hotplug instead of having it in a "RUN" key. Here my problem is
that I cannot get the information properly in my script.

    Well, long story short: assuming that I have udev up and running,
and a script capable of creating mount points and load modules (right
now, using a config file, in the future I may use MODALIAS or something
like that, if I'm able to get a grip on it), how the heck should I write
rules/set up things so my script is called and able to perform its duty?

    Thanks a lot, and sorry if this question has been answered before,
I've took a look at the FAQ and I didn't find anything useful, and a
couple of search of the mailing list archives didn't give any info,
either.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
@ 2007-02-27 17:45 ` DervishD
  2007-02-27 19:16 ` Kay Sievers
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2007-02-27 17:45 UTC (permalink / raw)
  To: linux-hotplug

    Hi all :)

    Sorry for self replying, but I forgot to add one thing:

 * DervishD <udev@dervishd.net> dixit:
>     Trying to find a correct combination of keys to filter seemed
> difficult and so I tried a different approach. This time I put my script
> as /sbin/hotplug instead of having it in a "RUN" key. Here my problem is
> that I cannot get the information properly in my script.

    Right now I'm using "udevinfo -q name -p $ENV{DEVPATH}", which
correctly tells me the /dev entry I need to handle, and this works (I
mean, I'm able to create/remove mountpoints and load/unload modules) for
an USB pendrive I have at hand to make tests, but I'm not sure if this
is a good general method, given that I will have USB removable hard
discs, a camera (PTP protocol, not usb-storage), a Palm PDA, etc...
Also, I want to do this too for audio (the system has two cards and they
will be used by name), etc. If my method is enough, just tell and I'll
shut up ;)

    Again, thanks a lot :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
  2007-02-27 17:45 ` DervishD
@ 2007-02-27 19:16 ` Kay Sievers
  2007-02-27 20:17 ` DervishD
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2007-02-27 19:16 UTC (permalink / raw)
  To: linux-hotplug

On 2/27/07, DervishD <udev@dervishd.net> wrote:
>     Hi all :)
>
>     Sorry for self replying, but I forgot to add one thing:
>
>  * DervishD <udev@dervishd.net> dixit:
> >     Trying to find a correct combination of keys to filter seemed
> > difficult and so I tried a different approach. This time I put my script
> > as /sbin/hotplug instead of having it in a "RUN" key. Here my problem is
> > that I cannot get the information properly in my script.
>
>     Right now I'm using "udevinfo -q name -p $ENV{DEVPATH}", which
> correctly tells me the /dev entry I need to handle, and this works (I
> mean, I'm able to create/remove mountpoints and load/unload modules) for
> an USB pendrive I have at hand to make tests, but I'm not sure if this
> is a good general method, given that I will have USB removable hard
> discs, a camera (PTP protocol, not usb-storage), a Palm PDA, etc...
> Also, I want to do this too for audio (the system has two cards and they
> will be used by name), etc. If my method is enough, just tell and I'll
> shut up ;)

All events that created a device-node, contain DEVNAME in the environment.

If you find MODALIAS in the environment, just run /sbin/modprobe with
a RUN rule and almost all needed modules should get auto-loaded. There
are only a few exceptions for exotic subsystems.

That's all what you need usually.

Kay

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
  2007-02-27 17:45 ` DervishD
  2007-02-27 19:16 ` Kay Sievers
@ 2007-02-27 20:17 ` DervishD
  2007-02-28 12:45 ` DervishD
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2007-02-27 20:17 UTC (permalink / raw)
  To: linux-hotplug

    Hi Kay :)

    Thanks for your fast answer :)

 * Kay Sievers <kay.sievers@vrfy.org> dixit:
> On 2/27/07, DervishD <udev@dervishd.net> wrote:
> >    Right now I'm using "udevinfo -q name -p $ENV{DEVPATH}", which
> >correctly tells me the /dev entry I need to handle, and this works (I
> >mean, I'm able to create/remove mountpoints and load/unload modules) for
> >an USB pendrive I have at hand to make tests, but I'm not sure if this
> >is a good general method, given that I will have USB removable hard
> >discs, a camera (PTP protocol, not usb-storage), a Palm PDA, etc...
> >Also, I want to do this too for audio (the system has two cards and they
> >will be used by name), etc. If my method is enough, just tell and I'll
> >shut up ;)
> 
> All events that created a device-node, contain DEVNAME in the environment.

    OK, that's a GOOD starting point :)) I thought that DEVNAME was
dependent on some obscure driver internal, that some drivers exported a
DEVNAME and other didn't.

> If you find MODALIAS in the environment, just run /sbin/modprobe with
> a RUN rule and almost all needed modules should get auto-loaded. There
> are only a few exceptions for exotic subsystems.

    You're reading my mind ;)) My next question was going to be if
instead of using my program for that, I could use just a RUN rule. Right
now my script does exactly that: if a MODALIAS is present, it loads the
module. Otherwise, it looks into its config file to see if any action
must be performed for the device node (creating mount points, load
modules, whatever). My rules file to do that is:

RUN+="/usr/sbin/hal"

    My "hal" script does all the work, but thanks to your kind advice,
I'll add this rule:

$ENV{MODALIAS}="?*" RUN+="modprobe $env{MODALIAS}"

    Anything wrong with this rule?

    Thanks a lot, Kay :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
                   ` (2 preceding siblings ...)
  2007-02-27 20:17 ` DervishD
@ 2007-02-28 12:45 ` DervishD
  2007-02-28 15:36 ` Kay Sievers
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2007-02-28 12:45 UTC (permalink / raw)
  To: linux-hotplug

    Hi Kay :)

 * Kay Sievers <kay.sievers@vrfy.org> dixit:
> If you find MODALIAS in the environment, just run /sbin/modprobe with
> a RUN rule and almost all needed modules should get auto-loaded. There
> are only a few exceptions for exotic subsystems.

    I've done this and now the systems hangs up at bootup. I can't find
any information in any log, so I don't know the cause (probably modprobe
caused some driver to load, which caused an udev event, which caused
modprobe to run again, causing an infinite loop).

    At boot time I mount sysfs, load udevd, launch udevtrigger and
udevsettle and after that, the rest of services of my system (I use my
own init, so the boot scheme is a bit different, but not that much). The
services are launched OK.

    In my rules file I have this:

KERNEL="pty*",      OPTIONS+="ignore_device"
KERNEL="tty[a-z]*", OPTIONS+="ignore_device"

KERNEL="tty",  GROUP="tty"
KERNEL="vcs",  GROUP="tty"
KERNEL="vcsa", GROUP="tty"

KERNEL="hda1", GROUP="disk", MODE="660", SYMLINK+="root"
KERNEL="hdb1", GROUP="disk", MODE="660", SYMLINK+="ubuntu"
KERNEL="hdb2", GROUP="disk", MODE="660", SYMLINK+="swap"

KERNEL="full", MODE="222" 
KERNEL="null", MODE="666"
KERNEL="zero", MODE="444"

KERNEL="random", MODE="444"
KERNEL="urandom", MODE="444"

SUBSYSTEM="usb_endpoint", OPTIONS+="ignore_device"

SUBSYSTEM="mem", GROUP="kmem"

SUBSYSTEM="usb_device", ATTRS{serial}="5B6B0990DFC6", NAME="pendrive"

#ACTION="add", ENV{MODALIAS}="?*", RUN="/sbin/modprobe $env{MODALIAS}"
#ACTION="remove", ENV{MODALIAS}="?*", RUN="/sbin/modprobe -r $env{MODALIAS}"

RUN+="/usr/sbin/hal &>> /tmp/hal.log"

-----------------------------

    The two commented lines are the ones that caused the problem. Any
idea about the possible causes? If I move the modprobe command to my
"hal" script (IT IS NOT freedesktop HAL, but my own script), the problem
is the same: the system hangs as soon as the booting process finishes,
and I don't have any evidence of modprobe being hung or whatever.

    I think I'm missing something VERY simple here, but I can't see
what: have you any idea about which the problem may be? Should I delete
the second commented line and don't unload modules on demand? May any of
the commented lines be causing an infinite loop?

    Thanks a lot in advance and sorry for bothering you with this kind
of questions. If I'm crossing the line, please tell O:)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
                   ` (3 preceding siblings ...)
  2007-02-28 12:45 ` DervishD
@ 2007-02-28 15:36 ` Kay Sievers
  2007-02-28 19:26 ` Dan Nicholson
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2007-02-28 15:36 UTC (permalink / raw)
  To: linux-hotplug

On Wed, 2007-02-28 at 13:45 +0100, DervishD wrote:
>  * Kay Sievers <kay.sievers@vrfy.org> dixit:
> > If you find MODALIAS in the environment, just run /sbin/modprobe with
> > a RUN rule and almost all needed modules should get auto-loaded. There
> > are only a few exceptions for exotic subsystems.
> 
>     I've done this and now the systems hangs up at bootup. I can't find
> any information in any log, so I don't know the cause (probably modprobe
> caused some driver to load, which caused an udev event, which caused
> modprobe to run again, causing an infinite loop).

Start:
  udevd -n
and run:
  udevtrigger
and watch where it fails. Good luck! :)

>     At boot time I mount sysfs, load udevd, launch udevtrigger and
> udevsettle and after that, the rest of services of my system (I use my
> own init, so the boot scheme is a bit different, but not that much). The
> services are launched OK.
> 
>     In my rules file I have this:
> 
> KERNEL="pty*",      OPTIONS+="ignore_device"
> KERNEL="tty[a-z]*", OPTIONS+="ignore_device"
> 
> KERNEL="tty",  GROUP="tty"
> KERNEL="vcs",  GROUP="tty"
> KERNEL="vcsa", GROUP="tty"
> 
> KERNEL="hda1", GROUP="disk", MODE="660", SYMLINK+="root"
> KERNEL="hdb1", GROUP="disk", MODE="660", SYMLINK+="ubuntu"
> KERNEL="hdb2", GROUP="disk", MODE="660", SYMLINK+="swap"
> 
> KERNEL="full", MODE="222" 
> KERNEL="null", MODE="666"
> KERNEL="zero", MODE="444"
> 
> KERNEL="random", MODE="444"
> KERNEL="urandom", MODE="444"
> 
> SUBSYSTEM="usb_endpoint", OPTIONS+="ignore_device"
> 
> SUBSYSTEM="mem", GROUP="kmem"
> 
> SUBSYSTEM="usb_device", ATTRS{serial}="5B6B0990DFC6", NAME="pendrive"
> 
> #ACTION="add", ENV{MODALIAS}="?*", RUN="/sbin/modprobe $env{MODALIAS}"
> #ACTION="remove", ENV{MODALIAS}="?*", RUN="/sbin/modprobe -r $env{MODALIAS}"

Unloading modules may be possible - I don't know, and have no plans to
try this, because I don't think it makes a lot of sense.

> RUN+="/usr/sbin/hal &>> /tmp/hal.log"
> 
> -----------------------------
> 
>     The two commented lines are the ones that caused the problem. Any
> idea about the possible causes? If I move the modprobe command to my
> "hal" script (IT IS NOT freedesktop HAL, but my own script), the problem
> is the same: the system hangs as soon as the booting process finishes,
> and I don't have any evidence of modprobe being hung or whatever.
> 
>     I think I'm missing something VERY simple here, but I can't see
> what: have you any idea about which the problem may be? Should I delete
> the second commented line and don't unload modules on demand? May any of
> the commented lines be causing an infinite loop?

Maybe it's just a module that gets loaded and crashes the box, or a
failing module-init, that is causing a loop (like some platform modules
are known to do sometimes, because of misuse of MODALIAS).

Kay


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
                   ` (4 preceding siblings ...)
  2007-02-28 15:36 ` Kay Sievers
@ 2007-02-28 19:26 ` Dan Nicholson
  2007-02-28 22:02 ` DervishD
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dan Nicholson @ 2007-02-28 19:26 UTC (permalink / raw)
  To: linux-hotplug

On 2/28/07, DervishD <udev@dervishd.net> wrote:
>
>     In my rules file I have this:
>
> KERNEL="pty*",      OPTIONS+="ignore_device"
> KERNEL="tty[a-z]*", OPTIONS+="ignore_device"
>
> KERNEL="tty",  GROUP="tty"
> KERNEL="vcs",  GROUP="tty"
> KERNEL="vcsa", GROUP="tty"
>
> KERNEL="hda1", GROUP="disk", MODE="660", SYMLINK+="root"
> KERNEL="hdb1", GROUP="disk", MODE="660", SYMLINK+="ubuntu"
> KERNEL="hdb2", GROUP="disk", MODE="660", SYMLINK+="swap"
>
> KERNEL="full", MODE="222"
> KERNEL="null", MODE="666"
> KERNEL="zero", MODE="444"
>
> KERNEL="random", MODE="444"
> KERNEL="urandom", MODE="444"
>
> SUBSYSTEM="usb_endpoint", OPTIONS+="ignore_device"
>
> SUBSYSTEM="mem", GROUP="kmem"
>
> SUBSYSTEM="usb_device", ATTRS{serial}="5B6B0990DFC6", NAME="pendrive"
>
> #ACTION="add", ENV{MODALIAS}="?*", RUN="/sbin/modprobe $env{MODALIAS}"
> #ACTION="remove", ENV{MODALIAS}="?*", RUN="/sbin/modprobe -r $env{MODALIAS}"
>
> RUN+="/usr/sbin/hal &>> /tmp/hal.log"
>
> -----------------------------

Some other rules that may be needed to work around issues with SCSI
(this is from Linuxfromscratch):

SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="0|7|14",
RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="1",
RUN+="/sbin/modprobe st"
SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="[45]",
RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM="scsi_device", ACTION="add", RUN+="/sbin/modprobe sg"

And to load any firmware you have:

ACTION="add", SUBSYSTEM="firmware", RUN+="firmware.sh"

--
Dan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
                   ` (5 preceding siblings ...)
  2007-02-28 19:26 ` Dan Nicholson
@ 2007-02-28 22:02 ` DervishD
  2007-02-28 22:05 ` DervishD
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2007-02-28 22:02 UTC (permalink / raw)
  To: linux-hotplug

    Hi Kay :)

 * Kay Sievers <kay.sievers@vrfy.org> dixit:
> > I've done this and now the systems hangs up at bootup. I can't find
> > any information in any log, so I don't know the cause (probably
> > modprobe caused some driver to load, which caused an udev event,
> > which caused modprobe to run again, causing an
> > infinite loop).
> 
> Start: udevd -n and run: udevtrigger and watch where it fails. Good
> luck! :)

    -n? My udevd (v105) doesn't have that option. Do you mean '-t'? I've
thought about using -t and -v to see which can be the problem.

> > #ACTION="add", ENV{MODALIAS}="?*", RUN="/sbin/modprobe
> > $env{MODALIAS}" #ACTION="remove", ENV{MODALIAS}="?*",
> > RUN="/sbin/modprobe -r $env{MODALIAS}"
> 
> Unloading modules may be possible - I don't know, and have no plans to
> try this, because I don't think it makes a lot of sense.

    I must confess that it doesn't make much sense in 2.6. Back in 2.4 I
needed to unload usb-storage when I wasn't using it, otherwise my
ide-scsi got weird scsi numbers and cdrecord... well, you know. Now, I
don't feel the need of unloading modules on demand.

    I've deleted that line and the system works OK now. Well, it hung
with my USB card reader but I've been unable to reproduce this. No
matter what I do, everything works seamlessly now.

> > The two commented lines are the ones that caused the problem. Any
> > idea about the possible causes? If I move the modprobe command to my
> > "hal" script (IT IS NOT freedesktop HAL, but my own script), the
> > problem is the same: the system hangs as soon as the booting process
> > finishes, and I don't have any evidence of modprobe being hung or
> > whatever.
> >
> > I think I'm missing something VERY simple here, but I can't see
> > what: have you any idea about which the problem may be? Should I
> > delete the second commented line and don't unload modules on demand?
> > May any of the commented lines be causing an infinite loop?
> 
> Maybe it's just a module that gets loaded and crashes the box, or a
> failing module-init, that is causing a loop (like some platform
> modules are known to do sometimes, because of misuse of MODALIAS).

    It's not really a crash: the system just stops. No sysrq, no
nothing, the system is dead. I'll try to isolate the problem if I can,
and will use the on-demand loading by now. I'm not going to use my "hal"
right now because I don't need it, even to create mount points.

    Thanks a lot for all your help, Kay :)))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
                   ` (6 preceding siblings ...)
  2007-02-28 22:02 ` DervishD
@ 2007-02-28 22:05 ` DervishD
  2007-02-28 22:20 ` Kay Sievers
  2007-03-01  8:42 ` DervishD
  9 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2007-02-28 22:05 UTC (permalink / raw)
  To: linux-hotplug

    Hi Dan :)

 * Dan Nicholson <dbn.lists@gmail.com> dixit:
> On 2/28/07, DervishD <udev@dervishd.net> wrote:
> >    In my rules file I have this:
[...]
> Some other rules that may be needed to work around issues with SCSI
> (this is from Linuxfromscratch):
> 
> SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="0|7|14",
> RUN+="/sbin/modprobe sd_mod"

    I don't have sd as a module, by now, although this may be useful for
my card reader.

> SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="1",
> RUN+="/sbin/modprobe st"
> SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="[45]",
> RUN+="/sbin/modprobe sr_mod"

    No SCSI tapes nor cd drives ;))

    Thanks for your suggestions: I've used LFS as an inspiration to set
up my udev, since I don't use a distro and had to do it by hand.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
                   ` (7 preceding siblings ...)
  2007-02-28 22:05 ` DervishD
@ 2007-02-28 22:20 ` Kay Sievers
  2007-03-01  8:42 ` DervishD
  9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2007-02-28 22:20 UTC (permalink / raw)
  To: linux-hotplug

On Wed, 2007-02-28 at 23:02 +0100, DervishD wrote:
>     Hi Kay :)
> 
>  * Kay Sievers <kay.sievers@vrfy.org> dixit:
> > > I've done this and now the systems hangs up at bootup. I can't find
> > > any information in any log, so I don't know the cause (probably
> > > modprobe caused some driver to load, which caused an udev event,
> > > which caused modprobe to run again, causing an
> > > infinite loop).
> > 
> > Start: udevd -n and run: udevtrigger and watch where it fails. Good
> > luck! :)
> 
>     -n? My udevd (v105) doesn't have that option. Do you mean '-t'? I've
> thought about using -t and -v to see which can be the problem.

Yeah, sorry I meant -v to output messages to the console.

Kay


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

* Re: Loading modules on demand with /sbin/hotplug
  2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
                   ` (8 preceding siblings ...)
  2007-02-28 22:20 ` Kay Sievers
@ 2007-03-01  8:42 ` DervishD
  9 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2007-03-01  8:42 UTC (permalink / raw)
  To: linux-hotplug

    Hi Kay :)

 * Kay Sievers <kay.sievers@vrfy.org> dixit:
> On Wed, 2007-02-28 at 23:02 +0100, DervishD wrote:
> >  * Kay Sievers <kay.sievers@vrfy.org> dixit:
> > > > I've done this and now the systems hangs up at bootup. I can't find
> > > > any information in any log, so I don't know the cause (probably
> > > > modprobe caused some driver to load, which caused an udev event,
> > > > which caused modprobe to run again, causing an
> > > > infinite loop).
> > > 
> > > Start: udevd -n and run: udevtrigger and watch where it fails. Good
> > > luck! :)
> > 
> >     -n? My udevd (v105) doesn't have that option. Do you mean '-t'? I've
> > thought about using -t and -v to see which can be the problem.
> 
> Yeah, sorry I meant -v to output messages to the console.

    I've thought that if the problem is some race, using "-t" would be a
drawback since serializing events will avoid some races. I'll try "-v"
as soon as I can reboot.

    Thanks :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 11+ messages in thread

end of thread, other threads:[~2007-03-01  8:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 17:23 Loading modules on demand with /sbin/hotplug DervishD
2007-02-27 17:45 ` DervishD
2007-02-27 19:16 ` Kay Sievers
2007-02-27 20:17 ` DervishD
2007-02-28 12:45 ` DervishD
2007-02-28 15:36 ` Kay Sievers
2007-02-28 19:26 ` Dan Nicholson
2007-02-28 22:02 ` DervishD
2007-02-28 22:05 ` DervishD
2007-02-28 22:20 ` Kay Sievers
2007-03-01  8:42 ` DervishD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.