Compiling the 2.6 kernel

Fraser Campbell fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org
Fri Dec 26 16:51:14 UTC 2003


On December 26, 2003 12:30 am, pking123-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org wrote:

> doesn't ash (or any shell) require a kernel underneath? So why don't I just
> toss initrd and boot straight into the kernel I was going to use anyway?

Debian kernels are modular.  Almost everything is a module (even basic IDE 
support).  I'm far from an expert on initrd but, I believe, the initrd is 
required in these circumstances (where you need a module to mount your root 
filesystem).  If your root filesystem is on IDE then you need the ide_disk 
module loaded before you can mount the root filesystem, once that's mounted 
then additional modules that you need can simply be modprobed /lib/modules on 
your root filesystem.

Another case of needing an initrd would be if you have your root filesystem on 
a software raid device (well some hardware raids as well probably).  LVM is 
likely another case where you'd require initrd, although having / on lvm is 
not recommended.

> This is what I am accustomed to doing in just about every other compilation
> I have done.Why the extra layer of bureaucracy?

By using modules you can support a maximum range of hardware without having 
every single driver compiled into the kernel.

> As for the modules, how do I know which modules to put in there? I
> recognise the "benefit" of initrd is to selectively install modules in a
> way that does not cause conflicts with other modules. So, I guess that
> means I can't include all of them. :-)

There are a series of files and directories under /etc/mkinitrd/ that let you 
specify additional modules to load, programs to add to the initrd, filesystem 
to use, scripts to run, etc.

mkinitrd is just a (very configurable) shell script so you can read through it 
to figure out how the  Debian folk decide what goes in, I've never looked at 
it in detail.

> Nevertheless, I have created the beginnings of my own initrd, but am at a
> loss as to the modules, and how to write modules.conf.

You probably should not manually modify modules.conf (man update-modules), if 
you're talking about modules.conf in the initrd then I'm not too sure ... 
hopefully covered in the various manpages.

-- 
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list