The Kernel Newbie Corner: "initrd" and "initramfs"--What's Up With That?
Oct 01, 2009, 17:32 (0 Talkback[s])
(Other stories by Rob Day)
WEBINAR: On-demand Event
Replace Oracle with the NoSQL Engagement Database: Why and how leading companies are making the switch REGISTER >
"So... What Are They?
"If we can be a little sloppy for a minute or two, both of those
concepts refer to a simple idea -- that of an "early userspace"
root filesystem that can be used to get at least the minimum
functionality loaded in order to let the boot process continue.
There's a lengthy explanation in the kernel source tree in the file
Documentation/filesystems/ramfs-rootfs-initramfs.txt, but I'll try
to simplify that just a bit.
"In a nutshell, when your bootloader (GRUB?) loads your Linux
kernel, it is of course the kernel's job to finish the boot
process. But to do so, it might require particular drivers to be
able to work with, say, hardware RAID controllers, or a network,
and so on. And depending on where those critically important
drivers are, the kernel might not have the ability to load them;
hence, the creation of a preliminary root file system that would
contain just enough in the way of loadable modules to give the
kernel access to the rest of the hardware.
"Quite simply, it's the bootloader's job to pass control to the
kernel, hand it the "initrd" (initial ram disk), let the kernel
mount it and get what it needs, whereupon the kernel can toss the
initrd and replace it with the real root filesystem. With me so
- Set Up A Fully Encrypted Raid1 LVM System(Dec 11, 2008)
- Hi BIOS! My Name Is "Linux", Or Is It?(Oct 24, 2008)
- BIOS Settings Demystified(Oct 06, 2008)
- Improving Boot Time on a General Linux Distribution(Sep 29, 2008)
- Super GRUB Disk--A GRUB Repair Utility(Sep 22, 2008)
- Rebooting the Magic Way(Aug 22, 2008)
- Ten Tricks to Make Linux Boot Faster(Jul 30, 2008)
- The Linux Saga: Boot Loader, initrd & Sys V(Jul 28, 2008)
- Kernel Space: Using the Firmware Loader for Static Data(Jun 05, 2008)
- A Preview Of Kernel-Based Mode-Setting(Apr 22, 2008)