Initrd

From OSDev.wiki
Revision as of 07:33, 31 May 2012 by Solar (talk | contribs) (Some rework, mainly to give a better idea on the why and what.)
Jump to navigation Jump to search
Filesystems
Virtual Filesystems

VFS

Disk Filesystems
CD/DVD Filesystems
Network Filesystems
Flash Filesystems
This page is a stub.
You can help the wiki by accurately adding more contents to it.

"Initrd" stands for "initial ramdisk".

A modular kernel (like a Microkernel or Modular Kernel) commonly faces a chicken-and-egg problem: In order to initialize the hardware, it needs to load driver modules; in order to load anything from disk, it needs the necessary drivers (e.g. IDE / SATA, filesystem driver etc.).

An initial ramdisk is one way to solve this problem. Elementary modules are packed into a single file, which is then loaded together with the kernel by the bootloader. The kernel can then use the in-memory Initrd to initialize elementary hardware (e.g. those required for mass storage access).

The format of the image is totally depending on the kernel and its version. It could be a compressed archive of a "real" ramdisk with filesystem semantics, which is uncompressed in memory, or it could be a flat image.

Popular bootloaders like GRUB support loading initial ramdisks. GRUB also supports loading additional kernel modules directly.

See Also

  • tar archive format
  • SFS simple filesystem implementation

External Links

  • cpio archive format
  • SquashFS filesystem designed for small disks
  • CramFS filesystem designed for compressed ram disks