Understanding the initramfs framework
A bit of a mystery remains! What exactly is this initramfs (initial RAM filesystem) or initrd (initial RAM disk) image for? Why is it there?
Firstly, using this feature is a choice – the kernel config directive is called CONFIG_BLK_DEV_INITRD
. It’s set to y
and hence on by default. In brief, for systems that do not know in advance certain things such as the boot disk host adapter or controller type (SCSI, RAID, and so on), the exact filesystem type that the root filesystem is formatted as (is it ext2
, ext4
, btrfs
, f2fs
, or something else?), or for those systems where these functionalities are always built as kernel modules, we require the initramfs
capability. Exactly why will become clear in a moment. Also, as mentioned earlier, initrd
is now considered an older term. Nowadays, we more often use the term initramfs
in its place.
But what exactly is the difference between the older initrd
and newer initramfs
? The key difference...