Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

loading modules automatically: automating modprobes

8 views
Skip to first unread message

Rahul

unread,
Dec 6, 2009, 7:24:56 PM12/6/09
to
I know how to load modules using modprobe. But these are lost on a
reboot. How does one make this permanant?

e.g. for IPMI I usually load:

modprobe ipmi_devintf
modprobe ipmi_si
modprobe ipmi_msghandler

How do I make this happen automatically on each reboot? Of course, I can
just put it in some shell init file but that seems like a hack.

Googling seems to point to "modprobe.conf" but that seems more by way of
setting aliases it seems. What's the best way out?

--
Rahul

Robert Heller

unread,
Dec 6, 2009, 7:57:48 PM12/6/09
to
At Mon, 7 Dec 2009 00:24:56 +0000 (UTC) Rahul <nos...@nospam.invalid> wrote:

>
> I know how to load modules using modprobe. But these are lost on a
> reboot. How does one make this permanant?
>
> e.g. for IPMI I usually load:
>
> modprobe ipmi_devintf
> modprobe ipmi_si
> modprobe ipmi_msghandler
>
> How do I make this happen automatically on each reboot? Of course, I can
> just put it in some shell init file but that seems like a hack.

If IPMI is something you always use, then it is perfectly normal to
create an script in /etc/init.d (or /etc/rc.d/init.d/) and set it up
like any other boot script or if you are lazy, put the modprobe's in
/etc/rc.d/rc.local -- which ever works for you.

Is there a deamon associated with IPMI? If so, the init script for the
deamon should be doing the modprobe's and if it isn't, there is
something wrong with the daemon's init script.

>
> Googling seems to point to "modprobe.conf" but that seems more by way of
> setting aliases it seems. What's the best way out?

"modprobe.conf" can also do things like bind special block and character
devices to kernel modules and to define special things that need to be
done when installing or removing modules. I guess it depends on how the
modules are used.

>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
hel...@deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Darren Salt

unread,
Dec 9, 2009, 4:32:01 PM12/9/09
to
I demand that Robert Heller may or may not have written...

[snip]
> alias scsi_hostadapter ata_piix
> alias snd-card-0 snd-intel8x0
[snip]
> Thus if I start using a SCSI disk, the ata_piix module gets loaded

That wouldn't be an *SCSI* disk. (It also wouldn't be an SCSI *disk*; the
kernel won't see it at that level.)

And the module would have to be loaded before you could start using the SATA
or PATA drive, else how would the system know how to talk to the device? Yes,
it would be presented as "SCSI", but there's nothing to say how sda is
connected: SATA controller? USB? Something else?

> if I start using the sound card, the snd-intel8x0 module gets loaded, etc.

Probably. You'd need appropriate options to ensure that it appears as ALSA
card 0 and others don't, though, if there's another sound device or any
chance of the attachment of one.

install snd-intel8x0 modprobe -i snd-intel8x0 index=0 $CMDLINE_OPTS &&
{ /lib/alsa/modprobe-post-install snd-intel8x0; }

(wrapped for width reasons)

--
| Darren Salt | linux at youmustbejoking | nr. Ashington, | Doon
| using Debian GNU/Linux | or ds ,demon,co,uk | Northumberland | Army
| + http://www.youmustbejoking.demon.co.uk/ & http://tlasd.wordpress.com/

"What's a network?" - Bill Gates being shown around Acorn in the early 80s.

Robert Heller

unread,
Dec 9, 2009, 7:10:54 PM12/9/09
to
At Wed, 09 Dec 2009 21:32:01 +0000 Darren Salt <ne...@youmustbejoking.demon.cu.invalid> wrote:

>
> I demand that Robert Heller may or may not have written...
>
> [snip]
> > alias scsi_hostadapter ata_piix
> > alias snd-card-0 snd-intel8x0
> [snip]
> > Thus if I start using a SCSI disk, the ata_piix module gets loaded
>
> That wouldn't be an *SCSI* disk. (It also wouldn't be an SCSI *disk*; the
> kernel won't see it at that level.)
>
> And the module would have to be loaded before you could start using the SATA
> or PATA drive, else how would the system know how to talk to the device? Yes,
> it would be presented as "SCSI", but there's nothing to say how sda is
> connected: SATA controller? USB? Something else?

I know. udev does most of the work. The OP just was confused about
what the aliases in modprobe.conf were for and I gave some examples.

>
> > if I start using the sound card, the snd-intel8x0 module gets loaded, etc.
>
> Probably. You'd need appropriate options to ensure that it appears as ALSA
> card 0 and others don't, though, if there's another sound device or any
> chance of the attachment of one.
>
> install snd-intel8x0 modprobe -i snd-intel8x0 index=0 $CMDLINE_OPTS &&
> { /lib/alsa/modprobe-post-install snd-intel8x0; }
>

Yes, there is more stuff in modprob.conf, mostly dealing with the sound
card module loading/unloading.

> (wrapped for width reasons)
>

--

0 new messages