MKINITRAMFS.CONFIG(5) | File Formats Manual | MKINITRAMFS.CONFIG(5) |
mkinitramfs.config
—
configuration file for mkinitramfs
/etc/mkinitramfs/config |
mkinitramfs configuration file is a list of environment variables. Each variable must be written in POSIX way, bashism not allowed.
Example:
key=value
If value contains spaces it must be quoted.
key="value value2"
If value contains special symbols like
‘$
’, it must be escaped or quoted
using single quotes.
key=\\$value key='$value'
If line exceeded maximum space on your display and you want to make it more readable, you can concatenate them.
key=value key="${key}value"
If you want to temporary undefine variable without actually
deleting it, you can simply prepend
‘#
’.
#key=value
This option will be ignored if monolith was set to 1.
There is a lot of commands you can use, such as:
You can set compression level by specifying
“-[0-9]
” in
ARGS.
You must install blkid utility (available in toybox, busybox, util-linux or e2fsprogs) for ability to use UUID, LABEL, PARTUUID.
Note: PARTUUID only supported in util-linux' blkid(8).
List of shipped by default hooks:
See below how to use them.
If hook doesn't have options, then it's not yet documented or can be used "as is".
More detailed information and how to write your own hooks described in mkinitramfs.hooks(7).
The lvm hook has the following options:
This option will be ignored if lvm_name/lvm_group was specified.
lvm_group (see below) must be specified.
The luks hook has the following options:
GPG-encrypted key currently not supported.
The keymap hook has the following options:
Currently, this hook supports loading keymap only via busybox' loadkmap.
kbd's loadkeys not supported.
The resume hook has the following options:
See root (above) for argument details.
Remember, these just examples! Don't copy blindly! Your configuration may (and should) differ.
hooks=eudev root=/dev/sda1
hooks=proc monolith=1 root=/dev/nvme0n1p1
hostonly=1 hooks=mdevd compress="gzip -9" root=PARTUUID=8e05009d-a1d5-4fdb-b407-b0e79360555c
root_type=f2fs hooks="eudev keymap" root=UUID=13bcb7cc-8fe5-4f8e-a1fe-e4b5b336f3ef keymap_path=/usr/share/bkeymaps/colemak/en-latin9.bmap
hooks="mdev luks" root=LABEL=my_root luks_discard=1 luks_key=/root/key luks_header=/root/header luks_root=PARTUUID=35f923c5-083a-4950-a4da-e611d0778121
compress="lz4 -9" hooks="eudev lvm luks" root=/dev/disk/by-uuid/aa82d7bb-ab2b-4739-935f-fd8a5c9a6cb0 luks_discard=1 luks_root=/dev/sdb2 lvm_config=1 lvm_discard=1 lvm_name=lvm1 lvm_group=lvm_grp2
hostonly=1 compress="gzip --fast" hooks="eudev luks lvm resume" root=/dev/mapper/root root_type=ext4 resume=/dev/mapper/swap luks_discard=1 luks_name=crypt luks_root=/dev/sda2
mkinitramfs.cmdline(7), mkinitramfs.hooks(7), mkinitramfs(8)
May 22, 2024 | Zeppe-Lin |