ZFS Bootloader for root-on-ZFS systems with support for snapshots and native full disk encryption
ZFSBootMenu v2.3.0 introduces a few new capabilities and refactors some existing features.
The ZFSBootMenu hook system has been enhanced. In addition to "early setup", "setup" and "teardown" hooks, users can install "load-key" and "boot-selection" hooks to better control the unlocking of ZFS filesystems and the process of booting a selected environment. Hook installation and management has been simplified: the zfsbootmenu_{early_setup,setup,teardown}
variables in dracut
and mkinitcpio
configurations have been deprecated in favor of zfsbootmenu_hook_root
, which points to a directory containing subdirectories that correspond to each hook stage. ZFSBootMenu now includes "system" hooks that are automatically installed in every generated image; the USB-teardown and font-resizing hooks provided as contrib
scripts are now installed as system hooks. A new command-line argument, zbm.skip_hooks
, allows individual hooks to be skipped at runtime.
When ZFSBootMenu is unable to import any ZFS pools, it will capture and display import errors when entering an emergency shell.
The commands reboot
, poweroff
and shutdown
are provided in ZFSBootMenu images, providing a convenient means to interrupt or restart the boot process from an emergency shell.
Various UI and UX enhancements improve the user experience within ZFSBootMenu:
zreport
utility provides more information about the environmentzreport
Chimera Linux boot environments are now properly recognized and will receive the appropriate root prefix by default.
Pre-built recovery images now include sgdisk
and SSL certificates that will allow curl
to communicate with HTTPS servers. The pre-built release and recovery images both include the zbm-kcl
utility to allow convenient editing of command-line arguments for boot environments as well as ZFSBootMenu EFI bundles.
The zbm
and debug
commands, previously shell aliases, are now symlinks; this makes these commands accessible to users of images built with mkinitcpio
.
Searches for kernels and initramfs images in boot environments have been improved. Although results of searches should be the same, the searches should happen slightly faster.
The contrib/zbm-sign.pl
script now respects the EFI.ImageDir
variable in the generate-zbm
configuration file.
Support for managing syslinux
configurations with generate-zbm
, long deprecated, has been removed. Users must now manage syslinux configurations manually.
ZFSBootMenu v2.2.2 contains no runtime changes relative to v2.2.1. The creation of UEFI bundles (so-called unified kernel images, or UKIs) in generate-zbm
has been updated to properly support newer UEFI stub loaders that were known to cause boot failures in the past. These changes were inspired by similar functionality in mkinitcpio and the ukify
utility included with systemd.
ZFSBootMenu v2.2.1 offers a few minor bug fixes over the prior release. More significantly, the build-container images and release assets for this version include OpenZFS 2.2.0 to provide access to upgraded pools.
All users of the binary releases or the ZFSBootMenu build container are encouraged to update to ZFSBootMenu v2.2.1 before upgrading any ZFS pools.
Release assets were re-issued after it was discovered that Terminus fonts were missing.
Perhaps the most significant change in ZFSBootMenu v2.2.0 is an overhaul of the project documentation. We are thrilled to welcome new member @classabbyamp to the project, who oversaw this substantial effort. Disparate documentation previously stored in Markdown files, the GitHub Wiki, POD files, and another git repository have now been combined into a single tree that is published on Read The Docs. The documentation is now maintained as an integral part of this repository and is published at https://docs.zfsbootmenu.org/. This includes:
Installation guides for Void Linux, Alpine, Debian Bullseye, Ubuntu 22.04 and openSUSE Leap are available, with similiar steps shared between the guides for easier maintenance and revision.
Kernel command-line handling for ZFSBootMenu and boot environments has received a revamp with the zbm-kcl
tool. This comprehensive tool can modify the kernel command-line for both boot environments and for the embedded command-line in binary EFI releases. Refer to zbm-kcl.8 for additional usage details.
UEFI variable handling in ZFSBootMenu has now been normalized to be consistent between Dracut and mkinitcpio. When chrooting into a boot environment, efivarfs
is now mounted in the chroot. The filesystem is mounted read-only if the pool is read-only, and read-write if the pool is read-write. Additionally, if efibootmgr
is present in the ZFSBootMenu initramfs, efivarfs
is mounted read-write in the recovery shell.
To help users with high-DPI displays, ZFSBootMenu binary releases will now attempt to set the largest possible font size (up to 32 pixels) that ensures at least 100 text columns on the screen. Users who build their own custom ZFSBootMenu images can add contrib/20-console-autosize.sh as an early-setup hook to achieve the same effect. Consult zfsbootmenu.7 for instructions on configuring custom hooks.
The generate-zbm
configuration key Kernel.Version now supports globs, such as 6.1.*
or 5.*
, to select the latest among a series of matching kernel versions for building a ZFSBootMenu image. The containerized build process now includes Linux versions 6.1, 5.15 and 5.10 and pre-compiled ZFS modules for each to simplify builds of custom images with recent LTS kernels.
The zsnapshots
tool has been added to allow convenient access to the main snapshot interface for a specific dataset from the recovery shell. This can be useful if ZFSBootMenu is unable to detect any valid kernels in a boot environment - allowing you to roll back to a previous snapshot.
A mutex to prevent infinite recursion when attempting to load keys for an encryption root is now restricted to the process that created it. This fixes an edge case where the interface launched from SSH would not be able to unlock an encryption root.
Artix is now a recognized distribution: ZFSBootMenu will specify the proper root argument for Artix boot environments.
chroot
(Andrew J. Hesford)syslinux
support as a core part of generate-zbm
will be removed in the next release. contrib/syslinux-update.sh should be used to create syslinux.cfg
moving forward. Refer to the script for usage documentation./etc/hostid
was rendered moot when support for skim
was removed because fzf
is only supported on little-endian systems. All hostid writes assume little-endian byte order by default.zbm.prefer
has been extended with a !!
marker to import exactly one pool when multiple are available on a system. Refer to zfsbootmenu.7 for more details.zbm.hookroot
command line option. Using this, a partition and directory specification can be provided which allows for additional scripts to be loaded at runtime. Refer to zfsbootmenu.7 for more details.generate-zbm
will now default to dracut
but fall back to mkinitcpio
when it cannot find dracut
in the path.ghcr.io/zbm-dev/zbm-builder
has been substantially improved, making it easier to manage custom images built in a controlled, compatible environment using podman or docker.dash
where bash
should be used. Forbidding the inclusion of dash
with Dracut resolves this issue.drm
Dracut module has been blacklisted. ZFSBootMenu should never attempt to load firmware for video cards.environments/
sub-directory.ZFSBootMenu 2.0.0 introduces a major internal reorganization that allows images to be built with initramfs generators other than dracut and includes some helpful command-line utilities. This release is based on Linux 5.10.125 and ZFS 2.1.5.
zbm-efi-kcl
, provides the ability to edit the kernel command-line embedded in a ZBM EFI bundle rather than requiring regeneration of the bundlezbm-builder.sh
, provides a simple interface for creating custom, local images using the official ZBM build container; it is now possible to build local images without installing ZBM or its Perl dependenciesNOTE 2022-02-12: A configuration issue prevented keymap, font and other console initialization steps from running in the pre-generated release and recovery binaries. The configuration has been adjusted to correct this problem and the release and recover binaries, together with their signatures, have been updated for this release. The source distribution was not affected and has not been updated.
This release brings multiple changes to how ZFSBootMenu works at run-time. These changes were introduced in an effort to:
Prior to this release, the only Dracut helper functions in use were those that retrieve command-line arguments to dynamically configure ZFSBootMenu. These have all been replaced by internal functions that are both more correct and roughly an order of magnitude faster.
With the help of the flamegraph visualization tool, multiple unnecessary Dracut modules have been pruned from the binary releases. The net effect of these changes is a large decrease in the time spent booting to either the menu or directly to a boot environment. [Note: the upper "before" image represents a total run time of 8.3 seconds, while the lower "after" image represents a total run time of 4.8 seconds, a reduction of more than 40 percent.]
ZFSBootMenu v1.12 is expected to be the last release series before ZFSBootMenu v2.0. The internal changes and dramatically reduced dependence on Dracut will allow ZFSBootMenu v2.0 images to be built using either dracut or mkinitcpio.
skim
has been removed. ZFSBootMenu now requires fzf
for all menu functionality./etc/default/grub
and /etc/default/zfsbootmenu
for boot environment kernel command line parameters will be removed in the next release.kexec --kexec-syscall-auto
to try multiple different ways to load a kernelroot=
is always removed/suppressed when passing a commandline into the boot environmentzbm-kcl
userland tool to view and edit boot environment kernel command linesgenerate-zbm
can now execute user hooks before and after an initramfs or EFI bundle has been createdrecovery
builds that include networking and a few disk-related toolsMOD+J
to avoid a key conflict with the usage of CTRL+I
.zbm
zreport
is available in the recovery shell, which can provide details-at-a-glance for bug reportstesting/
infrastructure has been updated to allow the installation of multiple distributions in one commandtesting/
ZFSBootMenu 1.10.1 brings a pair of fixes to issues seen in the wild. Release artifacts are built with Linux 5.12.14 and ZFS 2.1.0 under Void/glibc.
generate-zbm
incorrectly detected a mismatch between /etc/hostid
and the run-time spl_hostid
SPL module parameter.ZFSBootMenu 1.10.0 brings some minor new features and some behavior changes that should improve the booting and configuration experience. Notably, some default behaviors have changed in this release. Read on for details about how this may impact your configuration.
Previous releases have had zbm.import_policy=strict
and zbm.set_hostid=0
set by default. Starting with this release, the default values are zbm.import_policy=hostid
and zbm.set_hostid=1
. zbm.import_policy=hostid
can help ZFSBootMenu automatically and safely import a pool when the wrong hostid is provided. zbm.set_hostid=1
passes the hostid used to import the pool to the boot environment, ensuring that it can also correctly import the pool.
Please refer to Command-Line Parameters for a compete description of both of these feature flags.
0x00bab10c
instead of 0x0
./etc/hostid
and always ensure that a valid hostid is stored in the file./etc/hostid
doesn't match spl_hostid
provided as a module parameter to SPL.console=
kernel parameters with a ,speed
suffix. This is normally used when setting a serial port as the machine console.Any reference to %{parent}
in org.zfsbootmenu:commandline
will be replaced with the value of the same property on the parent filesystem (with parent references above recursively expanded), allowing easy specification of common options at a mutual parent of two BEs and overrides or additions of individual options per-BE. The value of %{parent}
is always an empty string on a root filesystem.
This is not intended to be sophisticated, and %{parent}
appearing within other words will be replaced regardless. The assumption is that %{parent}
is unique enough and will not conflict with real KCL options, so dumb global replacement is sufficient.
The existing zbm.prefer
option has been extended to support defining a mandatory pool. Append !
to the pool name to indicate that the specific pool MUST be imported before any other pool imports will be attempted.
zbm.prefer=zroot!
will require that zroot
be imported on boot.Between pool import attempts, zbm.import_delay
(default of 5 seconds) controls how long to pause. During this delay window, the escape key can be used to access a full recovery shell.
Either one of spl_hostid
or spl.spl_hostid
can be provided on the ZFSBootMenu kernel command line, in either hex or decimal format. The parameter value is checked to ensure that it's either valid hex or decimal, and then normalized to an 8 digit hex value.
Additional steps have been taken to ensure that SPL can be loaded if an invalid spl.spl_hostid
value is provided on the kernel command line. A more strict test is now used to determine if the ZFS kernel module has been loaded and drop to a recovery shell if not.