mkinitcpio hook
also: mkinitcpio plugin, initramfs hook
A script or plugin that runs during the mkinitcpio build process to customize or extend the initial ramdisk (initramfs) with additional modules, binaries, or configuration.
A mkinitcpio hook is a shell script executed by the mkinitcpio tool (used primarily in Arch Linux and derivatives) to add functionality to the initial ramdisk image. Hooks run at build time and can install kernel modules, copy binaries, add configuration files, or perform other setup tasks needed to boot the system.
Hooks are organized into two main phases: the build phase (which prepares what goes into the initramfs) and the runtime phase (which executes during early boot). Common hooks include udev for device management, encrypt for LUKS support, and filesystems for filesystem drivers.
Example: To add LUKS encryption support to your initramfs, you would add the encrypt hook to the HOOKS array in /etc/mkinitcpio.conf, then rebuild with mkinitcpio -p linux.