Boot environments utility

They are basically interchangeable, syntax is pretty much the same.
I think the biggest difference is related to destroying a boot environment; default behavior is slightly different between the two.

I agree with Zirias about bectl.
 
compared to beadm which is a shell script, potential advantage of bectl, is that there is also libbe library, on top of which bectl itself is an command line tool. I don't know if libbe has an API, so that this library can be used by some 3rdparty tool, if one create such
 
Go for what's integral to the OS: bectl. Some bug reports, nothing onerous.

Part of the history is under <https://www.freebsd.org/status/report-2018-01-2018-09.html#HardenedBSD-2018Q3-Update>; there's more, but I don't have a link handy.

Managing Boot Environments | Klara Inc. (not dated)

From zectl ZFS Boot Environment Manager for Linux | John Ramsden (2020-03-18):

… Seeing bectl’s impressive implementation I was inspired to do the rewrite in C. …

<https://old.reddit.com/r/zfs/duplicates/fkx780/zectl_zfs_boot_environment_manager_for_linux/>
 
When ZFS became a thing on FreeBSD vermaden and others ported, or rather wrote from scratch if I remember correctly, beadm from Solaris. I liked they used the same naming convention for that tool too. I started using it on FreeBSD the same way as I'm used to on Solaris.

What mer mentioned is very important - it does behave differently when it comes to destroying stuff. I once tested it in VM and was very disappointed (as I'm used to different behavior). For that reason I do stick to the beadm as I'm using it for over a decade.

For a new user I'd probably recommend using bectl as it's in the base.
 
between the two

Maybe not the most recent comparison, but <https://vermaden.files.wordpress.com/2018/11/nluug-zfs-boot-environments-reloaded-2018-11-15.pdf> page 61 reminds me of an essential difference:
  • proceeding without confirmation.



bectl

Via <https://dan.langille.org/category/open-source/freebsd/bectl/>:

there's more, but I don't have a link handy.

Found:
  1. I got into Google Summer of Code w/ @freebsd! So excited to be working w/ @allanjude & the rest of the folks in the community! (Kyle Kneitinger, 2017-05-04)
  2. FreeBSD bug 230323 – Idea/Feature Request - include beadm in the base (2018-08-03)
  3. Using Boot Environments at Scale - Allan Jude (EuroBSDcon 2018 | 20-23 Sept 2018) – GSoC Mentor for bectl(8)
(I couldn't find it earlier because I was seeking summer when I should have sought GSoC.)
 
Ah, thanks Erichans I never paid attention to the short URLs, now I see :
  1. <https://is.gd/BEADM> was ZFS Boot Environments (PBUG) in July 2018
  2. bug report 230323 began and ended
  3. <https://is.gd/BECTL> was ZFS Boot Environments Reloaded (NLUUG) in November 2018.
Yeah, that is good timeline :)

Generally the NLUUG is the most up to date presentation then PBUG one.

On the FreeBSD land nothing changed since the presentation I think ... if so then please let me know.

On the Linux side one thing changed - now the https://zfsbootmenu.org/ exists - which makes selection of ZFS Boot Environment much easier. The Ubuntu Linux also has ZFS on root install now but they do not use ZFS Boot Environments - they use only snapshots - which is far less useful then Boot Environments.

... and also while https://zfsbootmenu.org/ exists ... there is still ZERO Linux distributions that would integrate that and allow you to 'just' install Linux with root on ZFS and with https://zfsbootmenu.org/ and with working ZFS Boot Environments. You still need to setup everything yourself and have faith that it will not break in the upcoming upgrade.
 
Back
Top