Correct answer: B
It contains basic kernel modules and drivers required to start the system.
Explanation
Explanation:
initrd (initial ramdisk) or initramfs (initial RAM filesystem) is a temporary filesystem used by the Linux kernel during the boot process before the real root filesystem is mounted. Its primary role is to provide essential modules and drivers needed to access the actual root filesystem.
What initrd/initramfs does:
Purpose:
Loads necessary drivers for hardware that isn't built directly into the kernel
Provides modules for storage controllers (SATA, SCSI, NVMe)
Contains filesystem drivers (ext4, XFS, Btrfs) to mount the real root
Includes LVM, RAID, or encryption modules if the root is on such volumes
Performs early userspace setup before switching to the real root
Boot process with initrd:
1. BIOS/UEFI → Bootloader (GRUB)
2. Bootloader loads kernel and initrd into memory
3. Kernel decompresses and starts, mounts initrd as temporary root
4. Kernel runs /init from initrd
5. initrd loads necessary modules and drivers
6. initrd mounts the real root filesystem
7. initrd performs pivot_root to switch to real root
8. Real init system (systemd) takes over
When initrd is essential:
Root on LVM: Needs LVM modules to activate volume groups
Root on encrypted disk: Needs crypto modules to unlock the drive
Root on network: Needs network drivers for NFS root
Root on uncommon hardware: Needs drivers for specialized storage controllers
Root on RAID: Needs MD RAID modules to assemble arrays
Why other options are incorrect:
❌ It is required to connect to the system via SSH.
SSH connectivity is managed by the SSH daemon (sshd) which runs AFTER the system has fully booted
SSH requires network configuration, which happens in the main system, not during early boot
initrd is long gone by the time SSH is available
SSH has nothing to do with the initial hardware detection and root mounting phase
❌ It contains trusted certificates and secret keys of the system.
Certificates and keys are typically stored in /etc/ssl/certs or /etc/ssh/ on the root filesystem
These are security credentials for services, not boot components
initrd is temporary and not designed for persistent secret storage
Some specific setups (like disk encryption) might include keys in initrd, but this is not its primary purpose
❌ It is required to initialize a random device within a Linux system.
The random device (/dev/random, /dev/urandom) is provided by the kernel, not initrd
Random number generation is a kernel feature that initializes independently
Some early boot entropy gathering might occur, but this is not the role of initrd
Reference:
initrd = Initial RAM Disk
initramfs = Initial RAM Filesystem (modern replacement)
Required when kernel lacks built-in drivers for boot hardware
Created by tools like mkinitramfs (Debian) or dracut (RHEL/Fedora)
Without initrd, the kernel would need every possible driver compiled in, making the kernel huge