zfsbootmenu: extend zbm.prefer to set bootfs
Other bootloaders, such as rEFInd, can now be used to drive the boot process by specifying a dataset from which to boot. zbm.prefer now accepts a full dataset path, with the previous ! and !! modifiers still applying to the pool portion of the dataset.
This closes https://github.com/zbm-dev/zfsbootmenu/discussions/738
I wonder if it makes sense to extend the
zbm.prefersyntax to accommodate this capability without an additional option. The argument tozbm.prefercould be the desired filesystem, with the pool and bootfs extracted directly. The only drawback is ambiguity when the user might wish to specify abootfspointing to the top-level filesystem. I think this would be an unlikely edge case; most sources don't recommend putting any content on the root-level filesystem. A trailing slash on a top-level filesystem could be used to disambiguate in this corner case (e.g.,zbm.prefer=pool/.
Extending zbm.prefer to also accept a dataset is an interesting idea.
-
zbm.prefer=zroot- look to this pool for thebootfsvalue -
zbm.prefer=zroot/ROOT/void- explicitly use that as thebootfsvalue -
zbm.prefer=zroot!- make sure this pool is imported before proceeding, use thebootfsvalue set on the pool -
zbm.prefer=zroot/ROOT/void!- make sure this pool is imported before proceeding, explicitly use that as thebootfsvalue -
zbm.prefer=zroot!!- import only that pool, use thebootfsvalue set on the pool -
zbm.prefer=zroot/ROOT/void!!- import only that pool, explicitly use that value as thebootfsvalue
That seems like it could work, and wouldn't change any existing behavior of the zbm.prefer KCL option.