[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling a kernel



depmod should be called by the makefile upon make modules_install after
a successful build. Its really as easy as make, make modules_install ,
make install and a mkinitrd (if you need one). 

If using GRUB, remember by default the selection menu is hidden. You'll
need to comment out the "hiddenmenu" line, and of course turn on pretty
colors.

/etc/modules is a newline delimited list of modules that are loaded at
boot time.

You can further tweak how modules are loaded by modifying your initrd
directly. You'll need to do this if you use things like AoE/iSCSI to
access the root file system you pass to your kernel (i.e.
root=/dev/etherd/e3.0) or any service that loads and unloads its own
modules to start / stop but must be on in order to boot. You shouldn't
need to unless you have a custom / unique setup, but here's how anyway -

Just mount it :

mkdir /tmp/initrd-mnt

modprobe loop
mount -o loop -t cramfs /boot/my.initrd-img.x.x.x /tmp/initrd-mnt

Then simply pico the file named "linuxrc", or edit the file containing
the list of modules. You'll see the modprobe lines loading modules, feel
free to add or detract :) This is really handy to get things like
AoE/iSCSI or cluster file systems going prior to mounting the root fs or
any other odd boot needs.

Just remember, linuxrc isn't smart, its mission is only to load modules
and pivot over to the root fs you specify... so make sure you add some
logic to deal with mod load failures if they happen (if you tinker, that
is).

Kernel hacking is quite a bit easier on GNU distributions (like Debian)
once you get used to the differences from whitebox / gentoo. Not saying
its not fun on those flavors, I just happen to really prefer GNU.

Many more comprehensive step by step kernel building tutorials are
easily found via Google .. this should be enough to get you going with a
degree of confidence however :)

HTH

Best,
-Tim

On Sun, 2006-10-22 at 09:43 -0500, cothrige wrote:
> * Tim Post (tim.post@netkinetics.net) wrote:
> 
> Hello Tim,
> 
> [snip] 
> > Then make your initrd if needed and tweak as needed, verify /etc/modules
> > is what you want it to be and you should be good to go. Cross your
> > fingers and reboot.
> 
> This makes me think.  Recently I have gotten in the habit, after
> installing the kernel and all the associated parts, of running
> generate-modprobe.conf to get all the modules covered.  But, it seems
> that there is no modprobe.conf in Debian, and so I wonder if there is
> a similar tool or method to generate the information covering the
> modules?  Before I ran this I would have to really hunt around to
> cover the alsa stuff and so on, and so it was a nice shortcut.
> 
> Thanks a lot,
> 
> Patrick
> 
> 



Reply to: