From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 28 Feb 2007 15:36:55 +0000 Subject: Re: Loading modules on demand with /sbin/hotplug Message-Id: <1172677016.16566.20.camel@min.off.vrfy.org> List-Id: References: <20070227172320.GA10176@DervishD> In-Reply-To: <20070227172320.GA10176@DervishD> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Wed, 2007-02-28 at 13:45 +0100, DervishD wrote: > * Kay Sievers 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. >=20 > 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. >=20 > In my rules file I have this: >=20 > KERNEL=3D"pty*", OPTIONS+=3D"ignore_device" > KERNEL=3D"tty[a-z]*", OPTIONS+=3D"ignore_device" >=20 > KERNEL=3D"tty", GROUP=3D"tty" > KERNEL=3D"vcs", GROUP=3D"tty" > KERNEL=3D"vcsa", GROUP=3D"tty" >=20 > KERNEL=3D"hda1", GROUP=3D"disk", MODE=3D"660", SYMLINK+=3D"root" > KERNEL=3D"hdb1", GROUP=3D"disk", MODE=3D"660", SYMLINK+=3D"ubuntu" > KERNEL=3D"hdb2", GROUP=3D"disk", MODE=3D"660", SYMLINK+=3D"swap" >=20 > KERNEL=3D"full", MODE=3D"222"=20 > KERNEL=3D"null", MODE=3D"666" > KERNEL=3D"zero", MODE=3D"444" >=20 > KERNEL=3D"random", MODE=3D"444" > KERNEL=3D"urandom", MODE=3D"444" >=20 > SUBSYSTEM=3D"usb_endpoint", OPTIONS+=3D"ignore_device" >=20 > SUBSYSTEM=3D"mem", GROUP=3D"kmem" >=20 > SUBSYSTEM=3D"usb_device", ATTRS{serial}=3D"5B6B0990DFC6", NAME=3D"pendriv= e" >=20 > #ACTION=3D"add", ENV{MODALIAS}=3D"?*", RUN=3D"/sbin/modprobe $env{MODALIA= S}" > #ACTION=3D"remove", ENV{MODALIAS}=3D"?*", RUN=3D"/sbin/modprobe -r $env{M= ODALIAS}" 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+=3D"/usr/sbin/hal &>> /tmp/hal.log" >=20 > ----------------------------- >=20 > 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. >=20 > 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=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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