DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th August 2009
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default Change for rc.lkm

An lkm is a loadable kernel module. These usually reside in /usr/lkm. For exmaple, the lkm pf.o must be loaded to use packet filter with the GENERIC kernel (without recompiling).

Generally, lkm's are loaded with modload(8). If you want modules automatically loaded at boot-time, they should be listed in /etc/lkm.conf. In lkm.conf(5) you specify for each module various parameters, such as modload options -d and -v, any postinstall script, and when in the boot process it should load.

Finally, the boot-time script /etc/rc.lkm checks lkm.conf and loads the modules requested there. Now to the point of all this . modload has an important flag -A kernel, which is used to resolve module references. The default kernel is "/netbsd", but if you're running a different kernel image and don't use the -A flag this could lead to a crash.

The problem is, I don't see a way to pass the "-A kernel" into the existing structure described above. In fact, ISTM it ought to be built-in by changing rc.lkm in a small way: replace

Code:
modload $flags $path
with something like

Code:
modload -A /$(/sbin/sysctl -n machdep.booted_kernel) $flags $path
This would put the running kernel filename into the modload command for each lkm to be loaded by rc.lkm.

Does this seem ok, or did I miss something?
Reply With Quote
  #2   (View Single Post)  
Old 24th August 2009
s0xxx's Avatar
s0xxx s0xxx is offline
Package Pilot
 
Join Date: May 2008
Posts: 192
Default

It seems the '-A' option (and other) has been removed from >5.0. Check the man page for modload(8) in current. I believe this came as a result of a new modules framework, see the following:

http://mail-index.netbsd.org/tech-ke...msg000104.html
__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD
Reply With Quote
  #3   (View Single Post)  
Old 24th August 2009
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by s0xxx View Post
It seems the '-A' option (and other) has been removed from >5.0. Check the man page for modload(8) in current. I believe this came as a result of a new modules framework, see the following:

http://mail-index.netbsd.org/tech-ke...msg000104.html
Thank you! As you point out, it seems gone from current, although it was still in 5.0.1 that I am running. Things change quickly I suppose this may still be of interest (if correct) for those still not caught up.
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Username Change ninjatux Off-Topic 3 24th March 2009 06:45 PM
Change CRT to LCD mfaridi FreeBSD General 19 9th September 2008 12:51 PM
change ttl value ecnalbya OpenBSD Security 18 23rd August 2008 12:46 PM
rpc.nfsd threads, how do i change them? NathanL FreeBSD General 2 11th July 2008 11:28 AM
Change the Size of a Slice kienjakenobi FreeBSD General 9 27th June 2008 03:01 PM


All times are GMT. The time now is 10:53 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick