“The Linux initial RAM disk is a temporary root file system that is mounted during system boot to support the two-state boot process. The initrd contains various executables and drivers that permit the real root file system to be mounted, after which the initrd RAM disk is unmounted and its memory freed. In many embedded Linux systems, the initrd is the final root file system. This article explores the initial RAM disk for Linux 2.6, including its creation and use in the Linux kernel.”
Read up on the initial ram file system that’s been in the kernel since 2.5 instead, initrd will probably be deprecated at some point.
If by “deprecated at some point” you mean deprecated after 10 years, then you are right. But for everyone else who is interested in getting into Linux between now and 2015, I would suggest that they read up and discover more about initrd. The simple fact is that all major distributions and most minor distributions use initrd to boot up. If you are going to be doing anything with Linux, you should know at least a little bit about it. Most of those millions of installations out there will not be replaced anytime soon and I doubt anyone will bother with “fixing” something that in essence runs once at bootup and then gets completely out of the way. How many people actually botheed to replace LILO with Grub on a perfectly working machine?
Don T. Bothers
I would suggest that they read up and discover more about initrd. The simple fact is that all major distributions and most minor distributions use initrd to boot up.
(Almost) Everyone has already moved on! Dapper’s initrd is actually an initramfs (gzipped cpio archive.) Apparently FC5 did the samething. The embedded guys on 2.6 already switched to in-kernel-initramfs. The article should have been written 3 years ago.
Don T. Bothers:
How many people actually botheed to replace LILO with Grub on a perfectly working machine?
Well, AFAIK, lilo loads initramfs just fine. It doesn’t care that the blob is a file-system image (initrd) or a gzipped cpio archive (initramfs). It’s a binary blob.
Edited 2006-08-03 20:05
> (Almost) Everyone has already moved on! Dapper’s initrd is actually an initramfs (gzipped cpio archive.)
initramfs is initrd !!!
> Apparently FC5 did the samething.
Fedora switch to gzipped cpio archive file system around FC2.
Red Hat use initrd (but with ext2 file system and not the “new” gzipped cpio image) since RH7.2 !!!
> The article should have been written 3 years ago.
This article is good for you now.
> a file-system image (initrd) or a gzipped cpio archive (initramfs).
initrd and “gzipped cpio archive (initramfs)” is the same thing. initrd is in userlang, initramfs is the inkernel facility to support initrd.
Common usage has “an initrd” being a filesystem blob and “an initramfs” being the cpio archive.
(Hence the creation utilies named mkinitrd, mkinitramfs.)
The “Manually building a custom initial RAM disk” obviously shows how to make an initrd, while the first section demonstrates unarchiving an initramfs file.
> Common usage has “an initrd” being a filesystem blob and “an initramfs” being the cpio archive.
Same thing (ROM fs image) but different format… So differente tools for creating et reading.
> (Hence the creation utilies named mkinitrd, mkinitramfs.)
Only mkinitrd here and .cpio.gz initrd image.
From Linux 2.6.17 (Kconfig file) :
——————————————
config BLK_DEV_INITRD
bool “Initial RAM filesystem and RAM disk (initramfs/initrd) support”
help
The initial RAM filesystem is a ramfs which is loaded by the
boot loader (loadlin or lilo) and that is mounted as root
before the normal boot procedure. It is typically used to
load modules needed to mount the “real” root file system,
etc. See file:Documentation/initrd.txt for details.
If RAM disk support (BLK_DEV_RAM) is also included, this
also enables initial RAM disk (initrd) support.
——————————————
It’s not initramfs OR initrd, it’s only initramfs/initrd. If you want an initial RAM disk (initrd), than you need initramfs/initrd (option name : CONFIG_BLK_DEV_INITRD and also check BLK_DEV_RAM)
superman:
It’s not initramfs OR initrd, it’s only initramfs/initrd. If you want an initial RAM disk (initrd), than you need initramfs/initrd (option name : CONFIG_BLK_DEV_INITRD and also check BLK_DEV_RAM)
Go read the source code then you will understand.
I use near exclusively GNU/Linux since the beginnig of 1997.
I am a developer since 1995 (Unix and mostly Linux).
You are a poor guy.
from superman
initramfs is initrd !!!
You’re so clueless, aren’t you. initramfs was designed to be included in the vmlinux image. the piece of code which detects that the initrd is actually an gzipped cpio archive and not a filesystem is just convennient hack so that it can be loaded by the bootloader. It’s an entire different piece of code in the kernel. look in the usr subdir in the kernel tree. that’s where the standard initramfs is built.
from superman
initrd and “gzipped cpio archive (initramfs)” is the same thing.
Yeah the same thing!!! except that you can have initramfs without initrd. Or you can have initrd without initramfs. Yeah, they’re the same thing!!!
Edited 2006-08-04 04:04
Actually, most distributions now use initramfs instead of initrd.
ready for anything mainstream. Just ask anyone with a new fangled motherboard that cant ‘inject’ drivers into the install. Sorry the init ram disk disaster from redhat much like modules is a mistake. Honestly having a computer with gigabytes of ram, a 5mb kernel won’t kill anyone. And if you are crying about wasting ram, dont let me catch you running X11!
http://www.linuxdevices.com/articles/AT4017834659.html
Initrd is a block device in RAM. That block device usually contains a filesystem. Fixed size. You need filesystem drivers that might not be used later.
Initramfs is a filesystem in RAM. No block device. Size adjusts as needed.