C. Steinkuehlers kernel pres this Sat at ILUG

cdowns cdowns at drippingdead.com
Wed Apr 30 04:57:48 CDT 2003


If im repeating things here just junk this email.

I tend to do lspci ( gather hardware info ) and make shure my modules 
are compiled via my Makfile ( /usr/src/linux/Makefile) dest directory 
such as EXTRAVERSION=-Vader1

The reason I do this is so I dont compile 9000 other items I would never 
use and make boot time rediculous. The extraversion creates a new 
modules directory for the new build.

-------- snip -----------
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 20
EXTRAVERSION =-Vader1
-------- snip ------------

so you would have /lib/modules/2.4.20-Vader1/

sample:
cdowns at Vader:~$ ls -l /lib/modules/
total 8
drwxr-xr-x    4 root     root         4096 Apr 11 23:36 2.4.18-bf2.4
drwxr-xr-x    5 root     root         4096 Apr 24 19:01 2.4.20-Vader1
cdowns at Vader:~$

All your modules defined to this kernel would be in thier own directory 
( very nice and clean ) this is a prefered method of new kernel or 
update compilation.

I tend to do alot that is modular, remeber this is not the most secure 
method for a running machine. At this point you would be pretty much 
hosed anyway if someone has local access to the box anyway. I run 
crypto-api on some of my volumes and would always want them in modular 
format, just for the plain fact you may not need to volume for a week or 
something. This of course would depend on how much encrypted data you 
store on your volume during a daily routine.

Modules are in another method very nice, you could obvioulsy:

cdowns at Vader:~$ sudo /sbin/lsmod
Module                  Size  Used by    Not tainted
i810_audio             22536   0
sr_mod                 15928   0  (unused)
ide-scsi                8816   0
sg                     28364   0
cryptoloop              1868   0  (unused)
loop                    9528   0  [cryptoloop]
cipher-twofish         45780   0  (unused)
cryptoapi               4492   5  [cryptoloop cipher-twofish]
ac97_codec             11176   0  [i810_audio]
mpu401                 20900   0  (unused)
sound                  59124   0  [mpu401]
ds                      6568   1
i82365                 23744   1
pcmcia_core            38624   0  [ds i82365]
cdowns at Vader:~$

and remove them by simply doing: rmmod <module>.

Well hope this wasnt a big ramble or anything. Just remember how key the 
EXTRAVERSION is on a new compile ;) I would make shure you are compiled 
for your target processor, that would make a dramatic peformance increase.

If you are running a solid kernel and would like to add a module(s) on 
the fly you can just compile it and /sbin/insmod <module> at your 
leasure such as:

cdowns at Vader:/usr/src/linux$ sudo make dep && make modules 
modules_install ; sudo /sbin/insmod <module>

smooth eh ? ;)

~!>D

Jonathan Hutchins wrote:

>Quoting Charles Steinkuehler <charles at steinkuehler.net>: 
> 
>  
>
>>NOTE:  Now would be a good time to speak up if there are any particular  
>>aspects of kernel building you'd like me to cover in detail! 
>>    
>>
> 
>Two things come to mind: 
> 
>1) Dealing with modules, which have to match the kernel.  Do they 
>automatically get compiled at the same time?  How does keeping the modules in 
>sync with the kernel affect disk space/compile time requriements.   
> 
>2) Compiling the kernel for system A, which is dead-dog slow, on system B, 
>which screams like a banshee.  Including modules. 
> 
> 
> 
>One other modules thing: How do I tell what modules are loaded, even 
>occasionally, so I can compile just those modules into the kernel, and strip 
>everything else out; but never ever miss that once-a-month thing that loads 
>qwerty.o. 
>
>---------------------------------------------------
>This mail sent through tarcanfel's horde/imp system
>
>
>
>
>  
>

-- 
------------------------------------------
      Network Security Engineer 
      http://www.angrypacket.com
       Christopher M Downs,RHCE
     cdowns at bigunz.angrypacket.com
	
   char ash[]="x48x61x69x6Cx20"
   "x74x6Fx20x74x68x65x20x4B"
   "x69x6Ex67";
-------------------------------------------




More information about the Kclug mailing list