What is initrd in boot process?

The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available. The initrd is bound to the kernel and loaded as part of the kernel boot procedure.

How do I boot without initrd?

Booting the Linux Kernel Without an initrd/initramfs

  1. Remove initrd/initramfs support from the linux kernel.
  2. Remove UUIDs from kernel command line parameters and /etc/fstab .
  3. Build all modules into the linux kernel.
  4. Tell the bootloader where root is located and what filesystem it’s using.

What is initrd LZ?

The initrd. lz file is a cpio archive of a directory that has been compressed using lzma, thus to restore it to a temporary directory: mkdir lztempdir cd lztempdir lzma -dc -S . lz ../isotemp/casper/initrd.

How do you load an initrd?

The loading of initrd is handled by the boot loader (GRUB, LILO, etc.). Boot loaders only need BIOS routines to load data from the boot medium. If the boot loader is able to load the kernel, it can also load the initial ramdisk. Special drivers are not required.

What is initrd in Ubuntu?

DESCRIPTION. The special file /dev/initrd is a read-only block device. This device is a RAM disk that is initialized (e.g., loaded) by the boot loader before the kernel is started. The kernel then can use /dev/initrd’s contents for a two-phase system boot-up.

How do I create an initrd file in Linux?

To create an initrd, begin by creating an empty file, using /dev/zero (a stream of zeroes) as input writing to the ramdisk.img file. The resulting file is 4MB in size (4000 1K blocks). Then use the mke2fs command to create an ext2 (second extended) file system using the empty file.

How do I run a script at startup in Linux?

sudo chmod +x /etc/init.d/YOUR_SCRIPT Install it to all runlevels: sudo update-rc.d YOUR_SCRIPT defaults Now restart and see your script gets run at startup.

What is initrd and how does it work?

initrd is mainly designed to allow system startup to occur in two phases, where the kernel comes up with a minimum set of compiled-in drivers, and where additional modules are loaded from initrd. This document gives a brief overview of the use of initrd. A more detailed discussion of the boot process can be found in [1].

How to inspect the contents of an initrd file?

Listing 1. Inspecting the initrd (prior to FC3) You can now inspect the /mnt/initrd subdirectory for the contents of the initrd. Note that even if your initrd image file does not end with the .gz suffix, it’s a compressed file, and you can add the .gz suffix to gunzip it.