What is Mkinitcpio in Linux?

What is Mkinitcpio in Linux?

mkinitcpio is a Bash script used to create an initial ramdisk environment. The initial ramdisk is in essence a very small environment (early userspace) which loads various kernel modules and sets up necessary things before handing over control to init .

What is mkinitcpio conf?

DESCRIPTION. mkinitcpio will attempt to read from a config file each time it is invoked, ‘/etc/mkinitcpio. conf’ by default. This file defines several variables which describe the contents of the image to be generated.

What is Mkinitrd?

mkinitrd creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem. mkinitrd automatically loads filesystem modules (such as ext3 and jbd), IDE modules, all scsi_hostadapter entries in /etc/modprobe.

How do you regenerate initrd?

To repair the initramfs image after booting into the rescue environment, you can use the dracut command. If used with no arguments, this command creates a new initramfs for the kernel currently loaded.

What’s the purpose of the bash script mkinitcpio?

mkinitcpio is a Bash script used to create an initial ramdisk environment. From the mkinitcpio (8) man page: The initial ramdisk is in essence a very small environment (early userspace) which loads various kernel modules and sets up necessary things before handing over control to init.

Where can I find the runtime hooks for mkinitcpio?

Runtime hooks are found in /usr/lib/initcpio/hooks/, custom runtime hooks can be placed in /etc/initcpio/hooks/. For any runtime hook, there should always be a build hook of the same name, which calls add_runscript to add the runtime hook to the image. These files are sourced by the busybox ash shell during early userspace.

Who is the developer of mkinitcpio Arch Linux?

mkinitcpio has been developed by the Arch Linux developers and from community contributions. See the public Git repository.

What kind of compression is used in mkinitcpio?

The kernel supports several formats for compression of the initramfs: gzip, bzip2, lzma, xz, lzo, lz4 and zstd. mkinitcpio uses zstd compressed images by default, note that the zstd compression runs in multi-threading mode (with the -T0 option which spawns as many threads as detected cores).