Skip to content

Commit f93687f

Browse files
committed
Annotate mkinitcpio.conf to explain ZBM specifics
1 parent 91b4b3b commit f93687f

File tree

1 file changed

+54
-22
lines changed

1 file changed

+54
-22
lines changed

etc/zfsbootmenu/mkinitcpio.conf

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# vim:set ft=sh
2+
3+
# This is the mkinitcpio.conf file that ZFSBootMenu will read by default when
4+
# creating images. The syntax is the same as an ordinary mkinitcpio.conf file,
5+
# although the `zfsbootmenu` hook will recognize a few additional variables.
6+
27
# MODULES
38
# The following modules are loaded before any boot hooks are
49
# run. Advanced users may wish to specify all system modules
@@ -26,30 +31,16 @@ FILES=()
2631
# help on a given hook.
2732
# 'base' is _required_ unless you know precisely what you are doing.
2833
# 'udev' is _required_ in order to automatically load modules
29-
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
30-
# Examples:
31-
## This setup specifies all modules in the MODULES setting above.
32-
## No raid, lvm2, or encrypted root is needed.
33-
# HOOKS=(base)
34-
#
35-
## This setup will autodetect all modules for your system and should
36-
## work as a sane default
37-
# HOOKS=(base udev autodetect block filesystems)
38-
#
39-
## This setup will generate a 'full' image which supports most systems.
40-
## No autodetection is done.
41-
# HOOKS=(base udev block filesystems)
34+
# 'block' is almost certainly _required_ to allow ZBM to find a pool
35+
# 'keyboard' is almost certainly _required_ to allow interaction with ZBM
4236
#
43-
## This setup assembles a pata mdadm array with an encrypted root FS.
44-
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
45-
# HOOKS=(base udev block mdadm encrypt filesystems)
37+
# 'zfsbootmenu' is _required_ for ZBM functionality. However, this is added
38+
# implicitly by generate-zbm(8) and does not need to be specified here unless
39+
# you intend to run mkinitcpio directly. If you include it here and use
40+
# generate-zbm, the module will marked for inclusion twice, which is generally
41+
# harmless.
4642
#
47-
## This setup loads an lvm2 volume group on a usb device.
48-
# HOOKS=(base udev block lvm2 filesystems)
49-
#
50-
## NOTE: If you have /usr on a separate partition, you MUST include the
51-
# usr, fsck and shutdown hooks.
52-
HOOKS=(base udev autodetect modconf block filesystems keyboard zfsbootmenu )
43+
HOOKS=(base udev autodetect modconf block filesystems keyboard zfsbootmenu)
5344

5445
# COMPRESSION
5546
# Use this to compress the initramfs image. By default, gzip compression
@@ -65,3 +56,44 @@ HOOKS=(base udev autodetect modconf block filesystems keyboard zfsbootmenu )
6556
# COMPRESSION_OPTIONS
6657
# Additional options for the compressor
6758
#COMPRESSION_OPTIONS=()
59+
60+
# ZFSBOOTMENU OPTIONS
61+
# The options below may be specified to control ZFSBootMenu image creation.
62+
63+
# zfsbootmenu_module_root
64+
# Set this option to override the default location to the core ZFSBootMenu
65+
# libraries and utilities that will be installed in the image.
66+
#zfsbootmenu_module_root="/usr/share/zfsbootmenu"
67+
68+
# zfsbootmenu_miser
69+
# mkinitcpio uses busybox to provide core utilities. However, by default, the
70+
# 'zfsbootmenu' hook will install system versions of the utilities on which it
71+
# depends. Most likely, your system gets these utilities from util-linux rather
72+
# than busybox. Set zfsbootmenu_miser to "yes", "1" or "on" (without regard to
73+
# case) to allow the module to exclude utilities that are already provided by
74+
# busybox. This may shrink your ZFSBootMenu image slightly, but is not as well
75+
# tested and may break some (non-essential) ZFSBootMenu features.
76+
#zfsbootmenu_miser="no"
77+
78+
# zfsbootmenu_early_setup, zfsbootmenu_setup, zfsbootmenu_teardown
79+
# ZFSBootMenu supports user-provided hooks that may be run at various points in
80+
# the boot process. Set each of these variables to an array of executable files
81+
# that should be installed as user hooks in the provided image. Files that are
82+
# not executable will be ignored. See the zfsbootmenu(7) manual page for more
83+
# details about these hooks.
84+
#
85+
# 'zfsbootmenu_early_setup' hooks are run after ZFS modules are loaded, but
86+
# before ZFSBootMenu attempts to import any pools. Hooks here, for example, can
87+
# unlock LUKS volumes or otherwise manage devices that must be made available
88+
# before a pool can be recognized.
89+
#
90+
# 'zfsbootmenu_setup' hooks are run after pools are imported and right before
91+
# the menu is presented.
92+
#
93+
# 'zfsbootmenu_teardown' hooks are run immediately before a chosen boot
94+
# environment is about to be launched. Any writable ZFS pools will have been
95+
# exported, but read-only pools will generally still be available.
96+
#
97+
#zfsbootmenu_early_setup=()
98+
#zfsbootmenu_setup=()
99+
#zfsbootmenu_teardown=()

0 commit comments

Comments
 (0)