Friday, August 7, 2009

What is initrd ?

The initial ramdisk, or initrd is a temporary file system commonly used in the boot process of the Linux kernel. It is typically used for making preparations before the real root file system can be mounted.
------------------
INITRD is initial ramdisk. Basically it is a chicken before the egg solution.

When you boot your computer and the bios starts to load the disk, it has to uncompress the kernel from disk and start to load drivers. Problem was, what if you needed drivers to access the disk? How would one read what is on disk, if you couldn't access the disk without the drivers. A good example is RAID. In certain raid setups, data is striped across multiple disks. Part of the data on one, part on the other. If you don't have the driver to tell the system how raid works, then it will try to access the disk like normal. When it does, it finds the disk is missing half of the striped data. So now with an initrd, we carve out a chunk of ram and make it into a filesystem, and INITRD puts what drivers we need to access the disks there. Using that info we can now access the drives and load the kernel....
------------------

No comments:

Post a Comment

tag ur valuable ideas below