Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


More on LinuxToday


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)

"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 far?"

Complete Story

Related Stories: