AllTechWiki



A Place for All Technical Stuff Linux Cloud etc

What is initramfs or initrd in Linux and purpose - RHEL/CentOS/SuSE/Ubuntu Linux

What is initramfs or initrd and benefits 

Initramfs stands for Initial RAM File System. 

Initrd stands for Initial RAM Disk

It is a temporary root file system loaded into memory during the boot process of a Linux system.

Purpose of initramfs/initrd

  1. Early Boot Stage: initramfs/initrd  is used early in the boot process before the actual root file system is mounted.
  2. Hardware Detection: It contains necessary drivers and tools to detect hardware and mount the real root file system and scripts to handle tasks during the early boot process.
  3. Kernel Initialization: Helps the kernel initialize and prepare the system for full operation.

How it works:

  1. Loaded into Memory: Initramfs/Initrd is loaded into memory by the bootloader (e.g., GRUB).
  2. Kernel Execution: The kernel executes the init script within Initramfs/Initrd .
  3. Mount Root File System: The init script loads necessary modules and mounts the real root file system.
  4. Switch to Root: Control is handed over to the real root file system, and the normal boot process continues.

initramfs - Initial RAM File System Basically initramfs will be available in RHEL and CentOS Linux Flavor's 

CentOS 7.x OS Initramfs



RHEL 8.x OS Initramfs



initrd - Initial RAM Disk -Basically initrd will be available in SUSE and Ubuntu Linux Flavor's 

SUSE 15.x OS


Ubuntu 24.x OS



The installation/re-generation will be different for each Flavor's of linux. 

Post a Comment

Previous Post Next Post

Basic Useful Links