bieaz is a boot environment manager.


bieaz is developed in tandem with several Root on ZFS installation guides:

bieaz itself can be installed:


bieaz depends on GRUB to support boot environment selection. In particular, GRUB must be installed to the FAT-formatted EFI system partition.

bieaz has some requirements on dataset layout:

bpool/BOOT/be-name mounted at /boot; canmount=noauto
rpool/ROOT/be-name mounted at /    ; canmount=noauto

bieaz also has some requirements on GRUB installation:

source /etc/os-release

# for EFI
grub-install --boot-directory ${ESP}/EFI/${ID} --efi-directory ${ESP}
# for legacy
grub-install --boot-directory ${ESP}/EFI/${ID} --target=i386-pc $DISK

# generate menu and copy to current BE
grub-mkconfig -o ${ESP}/EFI/${ID}/grub/grub.cfg
mkdir -p /boot/grub
cp ${ESP}/EFI/${ID}/grub/grub.cfg /boot/grub/grub.cfg

There are two grub.cfg. One inside ESP, the other inside BE, regardless of either legacy or EFI booting is used.

The one inside ESP is actually used when booting the default entry. The other one in BE is used to save some work during menu generation.


Support and Contribution

This project is hosted on Gitlab. Link. If you have encountered a problem, please file a bug report there.

BE creation


Set grub-mkconfig command name, differs between distros.

Set the grub.cfg path in BE.

Used for optimizing menu generation.


Set GRUB stage 2 directory, should be set to the same directory as --boot-directory in the installation section.

bieaz submenu will be stored under this folder as ${BIEAZ_GRUB_CFG_DIR_ESP}/bieaz-menu.cfg.

Used for saving generated submenu.

Set if enable support for ESP mirroring.
esp_mirror ()
Set the shell script for mirroring ESP.

Set the mountpoint for bieaz mount subcommand. The path will be created if not exist. BE will be mounted under $BIEAZ_MOUNT_DIR/$be-name.

Used for bieaz mount subcommand.

Confirmation for using a single-pool setup. This is dangerous and not supported by GRUB.
Limit submenu entries generated by bieaz. Too many entries might crash GRUB.
Set whether bieaz should keep origin snapshots when BE is destroyed.

GRUB rescue images

When the bootloader in EFI system partition or boot sector is nuked, one might need to boot another GRUB copy from external storage.

The following disk images are generated with grub-mkrescue command inside a freshly booted Arch Linux live image.

mtools libisoburn grub packages are installed in addition to shipped packages.


[root@archonzfs ~]# time bieaz list
NAME        MOUNTED   USED  CREATION               ORIGIN              ORG.BIEAZ:LABEL
pac-exijni  no        504K  Thu May  6 16:49 2021  default@pac-exijni  post_-U_bieaz-0.2.13-1-any.pkg.tar.zst
pac-td2kzm  no        504K  Thu May  6 16:49 2021  default@pac-td2kzm  pre__-U_bieaz-0.2.13-1-any.pkg.tar.zst
                            GNU GRUB  version 2.04

| Arch Linux                                                                 |
| Advanced options for Arch Linux                                            |
|*bieaz /sys/ROOT/default                                                    |

     Use the ^ and v keys to select which entry is highlighted.
     Press enter to boot the selected OS, `e' to edit the commands
     before booting or `c' for a command-line.
|*Boot environment menu                                                      |
| Return to default BE                                                       |
| Press Esc to return previous menu                                          |
|*pac-exijni Thu May  6 16:49 2021: post_-U_bieaz-0.2.13-1-any.pkg.tar.zst   |
| pac-td2kzm Thu May  6 16:49 2021: pre__-U_bieaz-0.2.13-1-any.pkg.tar.zst   |


unrelated information