Recovering Linux with ZBM ZFS Boot Menu

I am transitioning my Linux systems to ZFS and ZBM ZFS BootMenu bootloader on an external USB stick or drive. ZFS stores its configuration on all disks so moving disks around is almost as easy as plug and play. A bootloader on an external USB stick is extremely portable, easily repairable and upgradeable without touching the OS install. And ZBM can find and boot system roots stored on ZFS, including ZFS mirrors.

As with any setup, when using ZFS for root system, you will need to repair something sooner or later. The following steps give you read/write access to the ZFS dataset holding the OS to make changes.

If not already done so, create a ZBM USB stick with the recovery version of ZBM image (Recovery Image) following the steps under “Portable ZFSBootMenu.” In short: Download using curl -LJO https://get.zfsbootmenu.org/efi/recovery. Create a USB drive with a GPT partition table, a fat (fat32) formatted partition, with the boot and/or esp efi system partition flag set. Mount and place the image on the drive. In some cases you will need to place a rename the image to get this full path to the image on the USB drive: /EFI/BOOT/BOOTX64.EFIFinally unmount.

Next, boot from this USB drive, perhaps using the BIOS boot menu, or replacing another ZBM drive, with the new one, and perform the following steps:

[ ] Boot the system using the ZBM recovery USB drive
[ ] Escape into ZBM when prompted using [Esc]
[ ] Jump into chroot using [Ctrl]+[J]
[ ] Immediately press [Esc] to switch to read/write mode (unless you just want to view things)
[ ] Make any changes to your system
[ ] Exit the commandline typing "exit" and [Enter]
[ ] Boot

Additional Tips for ZBM systems

Utilize the ZBM support for snapshots. Take a snapshot of a working system from within ZBM, or create one using ZFS, so that you can return to a working configuration in case something brakes your system.

Second, always remember to not upgrade your zpool capabilities to the latest without ensuring that ZBM supports those new ZFS capabilities. If you upgrade your zpool to capabilities of the newest ZFS version that is not yet included in ZBM your pool may not mount and you won’t be able to boot. After confirming your system works with ZBM and after taking a backup, then and only then do any upgrades. Perhaps it is best not to upgrade the zpool from a running system but to do it from ZBM command line instead to be sure.

updated: 20250112

Leave a Reply

Your email address will not be published. Required fields are marked *