MKINITCPIO.CONF(5)

πŸ“¦ version 42.2, in arch rolling

πŸ’– MKINITCPIO.CONF πŸ’–

okay bestie, so this is the manual page for mkinitcpio.conf β€” the configuration file for mkinitcpio, which is the little icon that builds your initramfs. she's a text file. she's important. let's get into it πŸŽ€


✨ NAME ✨

mkinitcpio.conf β€” the mkinitcpio configuration file, aka the vibe-setting doc for your boot image 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

/etc/mkinitcpio.conf

πŸ’… DESCRIPTION πŸ’…

so like. every single time mkinitcpio gets invoked, she goes looking for a configuration file, and by default that's /etc/mkinitcpio.conf. no cap. this file holds a bunch of variables that describe what's gonna be inside the image she's about to generate πŸ‘‘

and here's the tea β€” on top of the "main" config file, there are also drop-in configuration snippets that get read from /etc/mkinitcpio.conf.d/*.conf. these drop-ins have higher precedence, which means they override the main configuration file. main character energy goes to the drop-ins, lowkey. periodt πŸ’…


🌈 VARIABLES 🌈

πŸ“ MODULES

this one is an array of extra modules that should get added to the image. dependencies come along for the ride too β€” that means other modules and whatever firmware is necessary. then at runtime, the modules in this array that actually made it into the image successfully will be explicitly loaded ✨

πŸŽ€ FILES

an array of extra files to add to the image. they get added as is, and parent directories will be added if needed. also β€” files you list here will override previously added files of the same path. she said my path now πŸ’…

🧚 BINARIES

an array of extra binaries to add to the image. these are assumed to be dynamic ELF binaries, and all the necessary shared library dependencies get automatically added for you 🫢

but heads up: it is not considered an error to specify a non-ELF binary in this variable. no drama, she just won't complain. parent directories will be added if needed, and files specified here will override previously added files of the same path.

πŸ‘‘ HOOKS

an array of hooks that get run during the build process. order matters, bestie, because it defines the order the hooks run in during bootup πŸ”₯

use mkinitcpio's -L flag to list all available hooks, and the -H flag to display the help text for a specific hook. iykyk.

⭐ COMPRESSION

defines a program to filter the generated image through. the kernel understands the compression formats yielded by these legends:

if you leave it unspecified, this setting defaults to zstd compression for Linux β‰₯ 5.9 and gzip compression for Linux < 5.9. and if you want an uncompressed image, just define this variable as cat 😌

now listen. it is not hard to realize that a filter such as tac or rev will cause mkinitcpio to report success but generate a useless image. πŸ’€ similarly, using a compression program not listed above may generate an equally useless image, despite being "valid". she will gaslight you with a green checkmark. be careful.

🌸 COMPRESSION_OPTIONS

an array of additional options to be passed to the compression program. this option is generally not used.

it can be potentially dangerous and may cause invalid images to be generated without any sign of an error. 😭 like, no warning, no nothing. just vibes and a broken boot.

πŸ¦‹ MODULES_DECOMPRESS

a switch (yes/no) deciding whether loadable kernel modules and their firmware should remain compressed or be uncompressed during initramfs creation.

it's disabled by default β€” this avoids recompressing the files using a lower compression and reduces RAM usage during early boot. enable it to allow further decreasing image size when using high compression (e.g. xz -9e or zstd --long --ultra -22), at the expense of increased RAM usage at early boot.

note that any compressed files will be placed in the uncompressed early CPIO to avoid double compression ✨


πŸ’œ SEE ALSO πŸ’œ


🌟 AUTHORS 🌟

mkinitcpio is maintained by the Arch Linux community 🫢 refer to the AUTHORS file for a full list of contributors.


Copyright πŸ„― mkinitcpio contributors. GPL-2.0-only.


and that's the whole page, bestie!! πŸ’– this one's from mkinitcpio 42.2, dated 2026-10-01 β€” go forth and build your initramfs, you've got this πŸ‘‘βœ¨

πŸ“¦ where this page comes from