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

Re:



> I was also wondering about the possibility of using an "initrd-less" 
> kernel.  Somewhere in the Xconfig/Kconfig option sequence, I remember 
> reading in one of the help screens about initrd support that it's not 
> really necessary in many cases.  I guess this is a little beyond this 
> message, but why does Linux need an initrd at all? Does it speed up the 
> boot process? 
This should help you for clarification on initrd.

[bholzric@bholzric ~]$ apropos initrd
initrd               (4)  - boot loader initialized RAM disk
mkinitrd             (8)  - creates initial ramdisk images for
preloading modules
[bholzric@bholzric ~]$ man initrd

"DESCRIPTION
       The  special  file  /dev/initrd is a read-only block device.
Device /dev/initrd is a RAM disk that is initialized (e.g. loaded) by
the boot loader
       before the kernel is started.  The kernel then can use the the
block device /dev/initrd’s contents for a two phased system boot-up.

       In the first boot-up phase, the kernel starts up and mounts an
initial root file-system from the contents of /dev/initrd (e.g. RAM disk
initialized
       by  the  boot loader).  In the second phase, additional drivers
or other modules are loaded from the initial root device’s contents.
After loading
       the additional modules, a new root file system (i.e. the normal
root file system) is mounted from a different device."

> Or does it have something to do with compressing the kernel 
> to fit onto a floppy (in which case, one would only need an initrd on a 
> boot floppy, not the HD)?  Or maybe it's got to do with having all the 
> modules needed to boot in one handy place, in which case if one were to 
> compile everything monolithically for a specific machine it shouldn't be 
> needed?
> 

A bit of a chicken-egg issue.  If your disk drivers are compiled as
Modules, you need an initrd to boot the system.  If they are compiled
into the kernel, you won't need the initrd.  

However, if you try and enable a lot of stuff, and compile it all in,
you may get a zImage that is too big to load on boot, so keep that in
mind.

Bruce



Reply to: