From: Rahul on
pk <pk(a)pk.invalid> wrote in news:11158554.tv2OnDr8pf(a)xkzjympik:

> The purpose of those "aliases" is exactly to autoload the modules the
> first time they are needed.
>

Is it? I didn't know that. I'm still confused how to use aliases to
autoload. I thought aliases only made a longer name shorter and easier to
use.

"alias my-mod really_long_modulename" as in the manpage.

Maybe I am misunderstanding the use of aliases.

--
Rahul
From: Robert Heller on
At Wed, 9 Dec 2009 01:28:36 +0000 (UTC) Rahul <nospam(a)nospam.invalid> wrote:

>
> pk <pk(a)pk.invalid> wrote in news:11158554.tv2OnDr8pf(a)xkzjympik:
>
> > The purpose of those "aliases" is exactly to autoload the modules the
> > first time they are needed.
> >
>
> Is it? I didn't know that. I'm still confused how to use aliases to
> autoload. I thought aliases only made a longer name shorter and easier to
> use.
>
> "alias my-mod really_long_modulename" as in the manpage.
>
> Maybe I am misunderstanding the use of aliases.
>

Look closely at /etc/modprobe.conf -- what you will see is *device*
names aliased to modules:

alias usb-controller uhci-hcd
alias scsi_hostadapter ata_piix
alias eth1 ipw2100
alias snd-card-0 snd-intel8x0
alias usb-controller1 ehci-hcd
alias ieee1394-controller ohci1394
alias eth0 e1000

Thus if I start eth0, the e1000 module gets loaded, if I start using a
SCSI disk, the ata_piix module gets loaded, if I start using the sound
card, the snd-intel8x0 module gets loaded, etc.


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

From: marrgol on
On 2009-12-09 02:26, Rahul wrote:
> I don't seem to have this service. Maybe I have the wrong ipmi package
> installed? THere are several matching "ipmi" under yum and I wasn't
> really sure which ones I needed. I just know that ipmitool comes under
> "OpenIPMI-tools" so I installed that one.

# rpm -qf /etc/init.d/ipmi
OpenIPMI-2.0.16-5.el5_4.1


--
mrg
From: pk on
Rahul wrote:

> pk <pk(a)pk.invalid> wrote in news:11158554.tv2OnDr8pf(a)xkzjympik:
>
>> The purpose of those "aliases" is exactly to autoload the modules the
>> first time they are needed.
>>
>
> Is it? I didn't know that. I'm still confused how to use aliases to
> autoload. I thought aliases only made a longer name shorter and easier to
> use.
>
> "alias my-mod really_long_modulename" as in the manpage.
>
> Maybe I am misunderstanding the use of aliases.

Strictly speaking, module autoloading these days is done by udev, so *the
mere autoloading* of modules only needs a kernel that supports automatic
module loading (ie, 99.99% of the major distros' kernels). You don't even
need modprobe.conf for that.

However, modprobe.conf is read every time modprobe is invoked, because it
might contain aliases or options to pass to the module.
If you call modprobe manually, you can specify options to the module on the
command line as well, so again modprobe.conf wouldn't be needed there
(though it is useful because it shortens the commands you have to type).

However, udev does autoloading by calling out on /sbin/modprobe, and that,
again, reads modprobe.conf. In this case you cannot pass parameters on the
command line, so the modprobe.conf needs to be in place if that particular
module needs to be given options.

Bottom line: in certain specific cases, you could even do away completely
with modprobe.conf. However, having it in place as created by the distro it
doesn't hurt (and in most cases is actually needed). In all cases, if your
kernel supports module autoloading (and it likely does), you don't have to
worry about "preloading", so to speak, them.
From: Darren Salt on
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.