Unix Technical Forum

How to handle multiple kernels in rc.modules

This is a discussion on How to handle multiple kernels in rc.modules within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi everyone, is there a 'standard' way to handle different behaviour of rc.modules when using 2.4.x or 2.6.x kernels? ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 09:42 AM
Lupino
 
Posts: n/a
Default How to handle multiple kernels in rc.modules

Hi everyone,
is there a 'standard' way to handle different behaviour of rc.modules when
using 2.4.x or 2.6.x kernels?

I did it by probing the kernel version via uname and then loading specific
modules for my kernel version. Is this the correct way to do this?

And.. Another question: everytime I boot I get an annoying message
complaining about modprobe being unable to load scsi-hostadapter, but:

[root@iridiumII:/etc/rc.d]$ grep -nri hostadapter .
[root@iridiumII:/etc/rc.d]$

This message pops up before INIT starts.. What's up?

TIA,

--
[ Andrea Spadaccini - a.k.a. Lupino/Lupin85 - Catania - ICQ#: 91528290 ]
[ GPG ID: 5D41ABF0 - key @ pgp.mit.edu - Slackware 10.1 w/Linux 2.4.22 ]
[ Linux User # 313388 - MAIL: a.spadaccini(at)catania(dot)linux(dot)it ]
[ Silence, please. I'm listening to: Ligabue - Tu Che Conosci Il Cielo ]

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 09:42 AM
+Alan Hicks+
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In alt.os.linux.slackware, Lupino dared to utter,
> is there a 'standard' way to handle different behaviour of rc.modules when
> using 2.4.x or 2.6.x kernels?


No there really isn't.

> I did it by probing the kernel version via uname and then loading specific
> modules for my kernel version. Is this the correct way to do this?


If it worked I'd say so! In fact, this is exactly what I'd've done or
pretty close. One think you could do is have an rc.modules-2.4 and an
rc.modules-2.6 and have rc.modules do a uname check and run whichever
of those files matches.

> And.. Another question: everytime I boot I get an annoying message
> complaining about modprobe being unable to load scsi-hostadapter, but:
>
> [root@iridiumII:/etc/rc.d]$ grep -nri hostadapter .
> [root@iridiumII:/etc/rc.d]$
>
> This message pops up before INIT starts.. What's up?


man 8 hotplug

The short answer is to edit /etc/hotplug/blacklist.

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFC0DYmzLTO1iU1uO4RAqXSAKCL/39YhfTqh7nEu2g4XpATSPm54gCggYAv
rOnlR3J20euGN0QnZteOXPk=
=bDj0
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 09:42 AM
Grant Coady
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

On Sat, 09 Jul 2005 19:46:54 GMT, Lupino <ask.me@if.youwant> wrote:
> is there a 'standard' way to handle different behaviour of rc.modules when
> using 2.4.x or 2.6.x kernels?

No ... 'chmod -x /etc/rc.d/rc.modules' is probably the best option

Slackware has rc.modules, not the kernel. The linux kernel uses
/etc/modules.conf for 2.4, and /etc/modprobe.conf for 2.6 but the
new udev + hotplug stuff makes things vastly more flexible, and
confusing.
>
> I did it by probing the kernel version via uname and then loading specific
> modules for my kernel version. Is this the correct way to do this?


If it works for you, it is correct. There are many correct methods.
The idea is to settle on a method that is maintainable by _you_.

> And.. Another question: everytime I boot I get an annoying message
> complaining about modprobe being unable to load scsi-hostadapter, but:


kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 ??

Harmless, you have SCSI compiled in with modules, and nothing using
them.

--Grant.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 09:42 AM
Lupino
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

On Sun, 10 Jul 2005 07:40:47 +1000, Grant Coady wrote:

[snip]

>> And.. Another question: everytime I boot I get an annoying message
>> complaining about modprobe being unable to load scsi-hostadapter, but:

>
> kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 ??
>
> Harmless, you have SCSI compiled in with modules, and nothing using them.


Well, is there a way to skip this failure? It's quite annoying..
I tried the suggestion from the other poster (putting the module in
hotplug/blacklist), but it didn't do it!

Thanks for the answers!

--
[ Andrea Spadaccini - a.k.a. Lupino/Lupin85 - Catania - ICQ#: 91528290 ]
[ GPG ID: 5D41ABF0 - key @ pgp.mit.edu - Slackware 10.1 w/Linux 2.4.22 ]
[ Linux User # 313388 - MAIL: a.spadaccini(at)catania(dot)linux(dot)it ]

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 09:42 AM
Eef Hartman
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

Lupino <ask.me@if.youwant> wrote:
> Well, is there a way to skip this failure? It's quite annoying..
> I tried the suggestion from the other poster (putting the module in
> hotplug/blacklist), but it didn't do it!


For 2.4 kernels, put into /etc/modules.conf:
alias scsi_hostadapter off

2.6 is a bit more complicated, but you need to edit the file
/etc/modprobe.conf
for it (forgot the exact syntax, but it didn't use "off" anymore).
Have to look it up at home, where I've got a reasonable complete
modprobe.conf.
It was something like
install "aliasname" /bin/true (or /bin/false?)

Essentially you install a dummy for the alias.
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 09:43 AM
Grant Coady
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

On Sun, 10 Jul 2005 08:51:27 GMT, Lupino <ask.me@if.youwant> wrote:
> > kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 ??
> >
> > Harmless, you have SCSI compiled in with modules, and nothing using them.

>
> Well, is there a way to skip this failure? It's quite annoying..


Yes, if you not using SCSI, don't compile it into kernel )

To Eef: I tried a quick dummy hack and it didn't work, I'm happy
ignoring the message so didn't try very hard

--Grant.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 09:43 AM
Lupino
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

On Sun, 10 Jul 2005 15:22:43 +0200, Eef Hartman wrote:

> Lupino <ask.me@if.youwant> wrote:
>> Well, is there a way to skip this failure? It's quite annoying.. I tried
>> the suggestion from the other poster (putting the module in
>> hotplug/blacklist), but it didn't do it!

>
> For 2.4 kernels, put into /etc/modules.conf: alias scsi_hostadapter off


Thanks for the answer, but it didn't work.. Here's my /etc/modules.conf

alias snd-card-0 snd-sbawe
alias eth0 8139too
alias sound-slot-0 snd-sbawe
options sb-sbawe port=0x240 mpu_port=0x330 irq=5 dma8=1 dma16=5
alias /dev/ttySHSF* hsfserial
alias char-major-240 hsfserial
alias /dev/ttyCUA* hsfserial
alias char-major-241 hsfserial
alias /dev/modem hsfserial
options hsfserial serialmajor=240 calloutmajor=241
alias scsi_hostadapter off

But it still displays that message! Any other ideas?
TIA,

--
[ Andrea Spadaccini - a.k.a. Lupino/Lupin85 - Catania - ICQ#: 91528290 ]
[ GPG ID: 5D41ABF0 - key @ pgp.mit.edu - Slackware 10.1 w/Linux 2.4.22 ]
[ Linux User # 313388 - MAIL: a.spadaccini(at)catania(dot)linux(dot)it ]

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 09:43 AM
Eef Hartman
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

Lupino <ask.me@if.youwant> wrote:
> alias scsi_hostadapter off
>
> But it still displays that message! Any other ideas?


No, not really. I never tried THIS one, but the "off" alias was
in previous kernels the only way to eliminate some other kernel msgs
(like for AppleTalk), current slackware does do that by default.
This is my current modules.conf:
alias net-pf-4 off # we won't use PF IPX
alias net-pf-5 off # we won't use PF AppleTalk
alias lpt parport_pc io=0x378 irq=7
below ppa lpt # ZIP through printer port (with IRQ!)
below st aic7xxx # SCSI tape through aic7xxx

With all the kernel msgs that DO appear, I essentially always ignored
those for scsi_hostadapter (which come out of the sd_mod support,
I believe). Ok, if you got a _real_ scsi adaptor (and aren't just
loading SCSI disk support for USB cq Serial-ATA support) I _think_
building INTO the kernel of the SCSI controller support will eliminate
them too, because now there IS a real scsi hostadaptor.
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 09:43 AM
Eef Hartman
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

Grant Coady <grant_lkml@dodo.com.au> wrote:
> Yes, if you not using SCSI, don't compile it into kernel )


The problem is, both serial ATA as well as USB storage devices need
the scsi disk support. Ok, you can try loading it after those modules
have already been pulled in.
But the standard kernel nowadays does have it built-in, not as a
module.
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 09:43 AM
Mikhail Zotov
 
Posts: n/a
Default Re: How to handle multiple kernels in rc.modules

Lupino wrote:
> On Sun, 10 Jul 2005 07:40:47 +1000, Grant Coady wrote:
>
> [snip]
>
> >> And.. Another question: everytime I boot I get an annoying message
> >> complaining about modprobe being unable to load scsi-hostadapter, but:

> >
> > kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 ??
> >
> > Harmless, you have SCSI compiled in with modules, and nothing using them.

>
> Well, is there a way to skip this failure? It's quite annoying..
> I tried the suggestion from the other poster (putting the module in
> hotplug/blacklist), but it didn't do it!


It seems you haven't get Grant's idea. Recompile the kernel
_excluding_ SCSI being compiled _in_. In other words, in the SCSI
section, don't use "Y" but "m". It works!

Mikhail

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com