No, they probably do it in the initrd, or initramfs.
Let me explain...
When Linux is first brought into memory by the boot-loader, it is possible for a second block of data to be brought in by the boot-loader as well. This second block consists of a compressed filesystem-image, an "initial ram-disk." Before the kernel has done almost anything else, it expands that ram-disk image into a directory structure that serves as the initial root "/" directory. It then executes a script, using a tiny shell ("nash") build expressly for the purpose.
The main purpose of this step is to load any sort of initial kernel-drivers needed to interpret or to connect-to the "real" root. But startup-messages and so forth can be displayed now, as well.
The last step of the initial-ramdisk shell is to "pivot_root," replacing the initial-ramdisk with the real root-drive. The initial-ramdisk image is then discarded from memory and forgotten.
You can find the initial-ramdisk image in /boot. It's gzip'ped but does not have a ".gz" extension: a command called cpio is actually used to build it.
You do not have to have an initial-ramdisk. It's better if you can compile the drivers you need (for booting) right into the kernel, but if the kernel is "stock" (i.e. you didn't build it yourself), that's not an option. Hence the ramdisk.
Last edited by sundialsvcs; 09-16-2005 at 09:37 AM.
|