Originally Posted by foo_bar_foo
something else to think about is
if you compile support for your basic hardware like hard drive into the kernel not as modules then no need for pesky initrd
Yeah, perhaps that should be expounded-upon just a little bit...
For your computer to be able to talk to a particular device, and how to interpret a particular hard-disk format, Linux must have a driver
for it. As you can guess, this is a layer of code that accepts generic requests from other parts of the kernel and converts them to the hardware-specific commands and control signals that this
The trick, for any "distro" writer, is that you simply can't anticipate just what kinds of hardware might be installed! But the user expects to be able to drop in a CD-ROM, reboot, and "it just runs." So they have to provide a way to figure out what drivers are needed, on the fly,
and to load those drivers so that the system can boot.
The method that Linux uses to do this is what's called an initial ram-disk
("initrd" or "initramfs"). This is a little bootable-filesystem that is loaded into memory by the boot-loader along with the Linux kernel. Linux attaches to this ram-disk image (notice that Linux
didn't have to load anything -- the boot loader did it for us), mounts the image, and runs the programs that are thereupon. Voilá!
A perfect place to put a splash-screen (so the user doesn't see confusing text flashing by), and to do hardware-detection.
The initial-ramdisk image comes with a variety of device-driver modules
and it is able to install those into the Linux kernel. Once loaded, the driver becomes a part of the kernel in every way. Filesystem
drivers are also included, and if your root-drive is formatted using a filesystem that is not built-in to the kernel image, the initial-ramdisk must
load it at this time.
So far, so good?
Well, when you have your system installed and everything's up-and-running. You know
what hardware you have .. no, you don't
have a DecSystem Model BR-549 Token Ring Controller and you never will
.. and maybe you just want it to boot faster. It is possible to determine what modules are actually loaded, and instead of loading them to put them directly into the kernel. The initial-ramdisk step can, if you play your cards right, be omitted altogether.
On my system, I still use kernel-modules for some things, but all of the software needed to control the permanent hardware devices, and to recognize the filesystems that I use, is built directly into the kernel. An initial-ramdisk is not used.
Hope this helps.