OpenZFS 2.2 is nearly here, and ZFSBootMenu 2.2 already is
A menu-driven, snapshot-enabled bootloader for Linux with root on ZFS
The next minor version of OpenZFS is nearly ready, and ZFSBootMenu makes it easy to boot Linux from it, via a clever workaround.
The advanced OpenZFS filesystem is getting close to its next release, version 2.2, with release candidate 3 (around this time last year, OpenZFS 2.1 got to rc8, so it might be a little while yet). Version 2.2 will improve support for Linux containers, with support for overlay filesystems (sometimes also called union filesystems), support for Linux 6.3 IDmapped mounts (which are explained in this talk), and delegation of dataset namespaces to containers.
Block cloning should improve the efficiency of marking identical blocks as shared by different files, or even parts of the same file. The new BLAKE3 algorithm can be used to generate ZFS checksums, which is also used in the new CdC Veilid P2P tool we recently covered, and management of the disk cache has been improved.
Red Hat banishes Btrfs from RHELREAD MORE
This is all good stuff, and it should work with Linux kernels from 2013's version 3.10 right up to 6.4, and 2020's FreeBSD 12.2 onward. ZFS remains more or less the state of the art in open source filesystem design. Both SUSE and Oracle remain enthusiastic about Btrfs, but Red Hat isn't. Meanwhile, the new bcachefs still might not yet make it into kernel 6.5.
The big snag with ZFS, though, is that it isn't part of the Linux kernel, and it won't be any time soon. It's easy enough to add it on. There is the userspace version, ZFS-FUSE, and Ubuntu, for instance, includes the modules for kernel support as standard. Canonical seems to be backing away from integrating ZFS support, though. Ubuntu's ZSys module to integrate ZFS handling into the operating system has seen little maintenance in the last couple of years, and some users now recommend avoiding it.
All is not lost. The teams behind a handful of Linux distros are actively working on full, native ZFS support. Notably, NixOS has first-class support, and the Void Linux team are working on it, although it still requires some extra manual work at this point. The Proxmox hypervisor and container host also supports it. As with everything on Arch Linux, with some manual steps, it's also possible on Arch and its derivatives.
- Red Hat's Mexican standoff: Job cuts? Yes, but we still need someone to boot Linux
- Oracle, SUSE and others caught up in RHEL drama hit back with OpenELA
- It's a no to ZFS in the Linux kernel from me, says Torvalds, points finger of blame at Oracle licensing
- HashiCorp's new license is still open source-ish, just with less free lunch
- Linux project's first full version has all the subtlety of a Rhino in a China shop
Usefully, there's a totally separate, cross-distro way to keep the root filesystem of a Linux system on ZFS, and boot from it: ZFSBootMenu. This supports multiple distros, including Alpine, Debian, Ubuntu, Fedora, and openSUSE (although currently only Leap 15.4). There are additional scripts available to help you install the distro of your choice onto a ZFS pool, such as for Ubuntu Server. For it to work with most distros, the installation instructions require that your computer boots via UEFI, although installation on MBR using SYSLINUX to boot is possible, and it's documented for Void Linux.
The way that ZFSBootMenu works is clever. In effect, it's a tiny Linux distro, which boots other distros. From its own description:
ZFSBootMenu is a small, self-contained Linux system that knows how to find other Linux kernels and initramfs images within ZFS filesystems. When a suitable kernel and initramfs are identified (either through an automatic process or direct user selection), ZFSBootMenu launches that kernel using the
This means that, like on FreeBSD, ZFSBootMenu can see inside ZFS snapshots, and present a menu of different bootable environments. For instance, you could roll back to an earlier version of your OS, if a bad update has stopped something working.
It would be great news if Canonical adopted ZFSBootMenu and moved forward with ZFS support as the legal issues to seem to be surmountable – but in the meantime, if you're willing to do a little bit of well-documented manual work, thanks to this nifty little tool, it is possible to install most distros onto what Sun called [PDF] "the last word in filesystems." ®