What is the difference between Initrd and initramfs?
Both initrd and ramfs are zipped at compile time, but the difference is, initrd is a block device unpacked to be mounted by the kernel at booting, while ramfs is unpacked via cpio into memory.
Do I need initramfs?
For many users, an initramfs system is of no concern. Their system uses a simple partitioning schema with no exotic drivers or setups (like encrypted file systems), so the Linux kernel is entirely capable of handing over control to the init binary on their system. But for many systems, an initramfs is mandatory.
What is initramfs and vmlinuz?
vmlinuz files contain the Linux kernel proper. initrd files are CPIO images, filesystem images. The boot loader is responsible for loading both the kernel image and the initrd image into memory. They both will be in memory, before the boot loader hands control over to the kernel.
Why use initramfs linux?
The only purpose of an initramfs is to mount the root filesystem. The initramfs is a complete set of directories that you would find on a normal root filesystem. It is bundled into a single cpio archive and compressed with one of several compression algorithms. In this situation, an initramfs is rarely needed.
How is initramfs different from the old initrd?
All this differs from the old initrd in several ways: The old initrd was always a separate file, while the initramfs archive is linked into the linux kernel image. (The directory linux-*/usr is devoted to generating this archive during the build.)
Which is better ramfs or initramfs in Linux?
This has the memory efficiency advantages of initramfs (no ramdisk block device) but the separate packaging of initrd (which is nice if you have non-GPL code you’d like to run from initramfs, without conflating it with the GPL licensed Linux kernel binary). It can also be used to supplement the kernel’s built-in initramfs image.
Where to find initramfs file in Linux kernel?
(Note that those two example “file” entries expect to find files named “init.sh” and “busybox” in a directory called “initramfs”, under the linux-2.6.* directory. See Early userspace support for more details.) The kernel does not depend on external cpio tools.
How big is the initramfs archive in Linux 2.6?
The 2.6 kernel build process always creates a gzipped cpio format initramfs archive and links it into the resulting kernel binary. By default, this archive is empty (consuming 134 bytes on x86).