NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/60679: Root on ZFS currently requires hardcoded filesystem name



>Number:         60679
>Category:       misc
>Synopsis:       Root on ZFS currently requires hardcoded filesystem name
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 03 13:55:00 +0000 2026
>Originator:     Jørn Åne de Jong
>Release:        NetBSD 11.0 (GENERIC)
>Organization:
>Environment:
NetBSD  11.0 NetBSD 11.0 (GENERIC) #0: Thu Jul 30 15:23:12 UTC 2026  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When setting up Root on ZFS as described in [1], the ramdisk-zfsroot.fs is made in such a way that it requires the root filesystem to be named rpool/ROOT.  On FreeBSD, the root filesystem can be set using the bootfs-property on the pool.  This is used for supporting boot environments; a technique where the operator can zero-copy clone the existing root filesystem and upgrade the clone prior to rebooting.

Now, on NetBSD, we can't currently have true boot environments, because this would require the kernel to be read from ZFS as well.  The kernel still has to be read from an ffs filesystem, and is updated outside of ZFS and thus not affected by boot environments.  Regardless, boot environments are still useful for trying out new configurations and changes to userland.

[1] https://wiki.netbsd.org/root_on_zfs/
>How-To-Repeat:
Set up Root on ZFS as described in [1], but use a different name than rpool/ROOT.  Mark the bootable filesystem using the zpool bootfs property, for example:

  zfs set mountpoint=legacy pool/ROOT/NetBSD-11.0
  zpool set bootfs=pool/ROOT/NetBSD-11.0 pool
  reboot

And observe that the chosen filesystem is not used as root filesystem.

[1] https://wiki.netbsd.org/root_on_zfs/
>Fix:
I have provided an updated zfsroot.rc script [2] to the current-users mailing list.  I request that this file is used to replace the existing file at src/distrib/common/zfsroot.rc

This change will be reflected in the ramdisk at ramdisk/ramdisk-zfsroot.fs.

[2] https://mail-index.netbsd.org/current-users/2026/08/24/msg047838.html




Home | Main Index | Thread Index | Old Index