Page MenuHomeFreeBSD

zfsbootcfg(8): Rewrite to use libbe
AbandonedPublic

Authored by kevans on Jan 28 2019, 10:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 3 2024, 10:43 AM
Unknown Object (File)
Dec 22 2023, 9:33 PM
Unknown Object (File)
Dec 21 2023, 4:59 PM
Unknown Object (File)
Dec 13 2023, 6:17 PM
Unknown Object (File)
Jul 14 2023, 7:09 PM
Unknown Object (File)
Jul 11 2023, 11:18 PM
Unknown Object (File)
Jun 11 2023, 8:29 PM
Unknown Object (File)
May 18 2023, 3:30 AM
Subscribers

Details

Reviewers
avg
allanjude
bcr
Group Reviewers
manpages
Summary

(This will get committed as two separate parts, but both are included in this review for easier review)

Instead of relying on the boot path to setup the kenv, use libbe which should divine the same information from the dataset booted at / and scurrying through ZPOOL_CONFIG_VDEV_TREE.

This is completely untested, but in theory it should work.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 22233

Event Timeline

This needs a little bit more consideration -- it would fail miserably if operating on a system that doesn't have a traditional BE setup or the dataset mounted at / isn't at least two levels deep.

Or if a "boot pool" setup is used (kernel is loaded from one pool, root is mounted from another). Or if reboot -r has been run prior to zfsbootcfg.

bcr added a subscriber: bcr.

Ok for the man page part of the change.

This revision is now accepted and ready to land.Jan 29 2019, 8:19 AM
In D19008#406325, @avg wrote:

Or if a "boot pool" setup is used (kernel is loaded from one pool, root is mounted

And /boot isn't guaranteed to be remounted after reroot, is it, given that it's not really required if everything could be preloaded prior?

Abandoning in favor of D19019 to start setting up zfsbootcfg vars in loaders properly; I think zfsbootcfg should likely bail out if machdep.bootmethod is unset or != "BIOS" until we teach other loaders pad2 bits, though.