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

Re: [DSA-403-1] Kernel update?



Bill Moseley <moseley@hank.org> writes:

> On Wed, Dec 03, 2003 at 10:43:43AM -0500, David Z Maze wrote:
>> 
>> Yes, that's right.  The important thing is that you need to make sure
>> the drivers for your root disk and filesystem (probably "IDE disk" and
>> "ext2", but these could both be other things) are built into the
>> kernel, not built as modules.  Just make sure you have a LILO entry
>> around to boot your old kernel if you get stuck.
>
> So is the purpose of initrd to have a small kernel but be able to load
> whatever modules might be needed for the currently running hardware?

Almost.  You also get to have a kernel that's completely generic; if
your machine has a SCSI hard disk with reiserfs, and mine is IDE with
ext3, the an initrd/kernel pair could boot both, without having any of
the drivers compiled in.

> If so I often wonder why that's needed -- that is, why not just build a
> kernel with everything compiled in?  If, say, installing from CD then
> size of the kernel isn't critical (not to mention that the modules take
> up space, too), and most machines have quite a bit of RAM these days, so
> I would not think that an issue either.

My fuzzy memory is that there are a couple of factors.  One is that
memory for kernel drivers absolutely can't be used for anything else,
so if you're trying to get the last megabyte out of your system, an
unused module is cheaper than an unused in-kernel driver.  Another is
that there are a couple of limits on the size of the kernel, and so
building everything in blows you over that limit pretty quickly.  For
a distribution kernel you also might want to install it on floppies,
which gives you a hard limit on the size of the kernel.  (But yes, all
of these are becoming less of an issue with more modern hardware.)

> Which brings me back to the point that maybe I don't really
> understand the need for initrd...

It makes sense for a distribution kernel ("Debian's default kernel");
IMHO it's more of a pain than it's worth for home-built kernels, so
kernel-image-2.4.23-$HOSTNAME for me is never an initrd kernel.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: