Bug 237090 - bectl(8): Add an example on how to make installworld installkernel to a new BE
Summary: bectl(8): Add an example on how to make installworld installkernel to a new BE
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-08 03:00 UTC by Larry Rosenman
Modified: 2019-04-08 05:26 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenman freebsd_committer 2019-04-08 03:00:02 UTC
from #freebsd on freenode:


[21:48:49] <ler> kevans91: bectl question: What's the easiest way to make installworld installkernel to a newly created BE?  I'm doing it the hardway (zfs set mountpoint/zfs mount/make DESTDIR/zfs umount/zfs inherit mountpoint, but it seems to me that there should be <something> to make it a one liner.
[21:53:55] <kevans91> ler: bectl mount <be> /mnt; make -j4 installworld installkernel DESDIR=/mnt; bectl umount /mnt
[21:54:04] <kevans91> Er, bectl umount <be>
[21:54:18] <ler> ok.  
[21:54:31] <ler> can that be added as an example to bectl(8)?
[21:54:49] <kevans91> Sure; I've also been thinking about hacking out the small change to make beinstall bectl-compatible
[21:55:03] <ler> whichever... :) 
[21:55:23] <kevans91> That is, make a BETOOL env var or something that can be pointed at bectl, because they're compatible for its usage
[21:55:33] <kevans91> But we still have this ugly example placeholder in bectl(8)
[21:55:53] <ler> hence my just saying f it, and doing it the hard way. :) 
[21:57:14] <ler> and spell DESTDIR correctly :) 
[21:57:22] <ler> but you get my point, I think.
[21:57:23] <kevans91> whoops =-p
[21:57:28] <ler> do you want me to cut a PR?
[21:58:08] <kevans91> If you wouldn't mind; manpage changes take a little more effort that I have to conjure up
[21:58:18] <ler> k
Comment 1 Kyle Evans freebsd_committer 2019-04-08 03:16:29 UTC
Take
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-08 05:26:45 UTC
In addition to an example, and perhaps as a extension step (or separate task), it would be nice to see the standard build commands/steps include an option to use a BE. 

Perhaps as a trivial starter, make install{kernel,world} ... BOOTENV=YES or equivalently simple toggle env var, that uses one and only one named-be for that current/next build/install cycle.

This would dramatically lower barrier to entry, make it trivial for people to play/test with, and encourage feedback/bug reports to improve robustness/reliability.

Happy to create a separate task for this if it's a non-trivial extension/wrapper around the example documentation that's being proposed here.