[plug] initrd confusion!
Tony Breeds
magni at plug.linux.org.au
Sat Apr 17 08:22:42 WST 2004
On Fri, Apr 16, 2004 at 11:28:12AM +0800, Denis Brown wrote:
> Dear PLUG list members,
>
> I have a situation where I need to have a modularised kernel, specifically
> with the RAID device as a module. The reason for this, is to allow the
> low level drive monitoring software to work. I have been reading up on
> initrd but find that I am confused, as follows...
>
> 0. There are no IDE or ATA devices in this box, only SCSI in hardware RAID.
> 1. The RAID driver will be compiled into the kernel as a module. So the
> kernel will not be able to see any file systems until the module is loaded.
> 2. The module will be inaccessible to the kernel because, well, it cannot
> be loaded!
> 3. Initrd would seem to offer help. Initrd basically, if I understand it
> correctly, will load a kernel into ramdisk, load the required RAID driver
> module and then switch over to the "real" file system.
>
> BUT... if initrd can see the file system in order to load the RAID driver
> module, how is initrd's "kernel" different from the normal kernel? I will
> be compiling the kernel with both initrd+ramdisk and modularised RAID
> driver support. It seems to me that the kernel will somehow be
> schizophrenic - sees the RAID via a module but at boot time can see the
> RAID anyway. Huh???
The short answer is: mkinitrd copies the modules themselves (for the
supplied kernel), along with a shell (/bin/ash.static) and
insmod.static). It then creates a linuxrc file which loads the modules.
mounts root and passes control over to init.
--
Yours Tony
Linux.Conf.AU http://lca2005.linux.org.au/
Apr 18-23 2005 The Australian Linux Technical Conference!
More information about the plug
mailing list