Forrest logo
tool overview
On this page you find all important commands for the CLI tool mkinitcpio. If the command you are looking for is missing please ask our AI.

mkinitcpio

Mkinitcpio is a command line tool commonly used in Linux distributions for creating initial ramdisk images. It is primarily designed for booting the system and loading necessary modules and files to initialize the Linux kernel during the boot process. The name "mkinitcpio" stands for "make initial ramdisk using cpio," where cpio refers to the file format used to package the initial ramdisk.

This tool is highly customizable and allows users to specify various settings and configurations through its configuration file. With mkinitcpio, one can include specific kernel modules, firmware, and binaries required at boot time, ensuring a smooth system startup. Additionally, it supports multiple compression methods to reduce the size of the generated ramdisk image, optimizing boot performance.

Mkinitcpio supports different hooks that enable users to define actions and scripts to run at various stages of the initramfs creation process. These hooks can be used to load additional modules, mount encrypted filesystems, or perform any other necessary operations before handing control over to the kernel.

Once the initial ramdisk image is created using mkinitcpio, it needs to be placed in the correct location on the system. This location can vary depending on the Linux distribution, but it is usually specified in the bootloader configuration file.

Overall, mkinitcpio is a vital tool for Linux users to ensure a smooth and efficient boot process by creating an optimized initial ramdisk image tailored to their specific system requirements.

List of commands for mkinitcpio:

  • mkinitcpio:tldr:1acba mkinitcpio: Generate an initramfs image using an alternative configuration file.
    $ mkinitcpio --config ${path-to-mkinitcpio-conf} --generate ${path-to-initramfs-img}
    try on your machine
    explain this command
  • mkinitcpio:tldr:3f653 mkinitcpio: Display help for a specific hook.
    $ mkinitcpio --hookhelp ${hook_name}
    try on your machine
    explain this command
  • mkinitcpio:tldr:4304c mkinitcpio: List all available hooks.
    $ mkinitcpio --listhooks
    try on your machine
    explain this command
  • mkinitcpio:tldr:67ce4 mkinitcpio: Perform a dry run (print what would be done without actually doing it).
    $ mkinitcpio
    try on your machine
    explain this command
  • mkinitcpio:tldr:82e9b mkinitcpio: Generate an initramfs image for a kernel other than the one currently running (the installed kernel releases can be found in `/usr/lib/modules/`).
    $ mkinitcpio --kernel ${kernel_version} --generate ${path-to-initramfs-img}
    try on your machine
    explain this command
  • mkinitcpio:tldr:e3b1f mkinitcpio: Generate a ramdisk environment based on the `linux` preset.
    $ mkinitcpio --preset ${linux}
    try on your machine
    explain this command
  • mkinitcpio:tldr:f72e6 mkinitcpio: Generate ramdisk environments based on all existing presets (used to regenerate all the initramfs images after a change in `/etc/mkinitcpio.conf`).
    $ mkinitcpio --allpresets
    try on your machine
    explain this command
tool overview