The system hang if the boot environment is switched with the boot menu (both UEFI and the old menu). It only works to switch boot environment with beadm. See https://forums.freebsd.org/threads/55755/
This happens if 'canmount' is set to 'yes' instead of the intended 'noauto' on any of the boot environments. A fix to beadm has been submitted upstream.
Hi Allan Was your patch to beadm accepted? Could this fix make it in time for 11 and could you provide link to the patch please? Thanks
Ping? I just got hit by this one :)
beadm is in ports, so its update is out-of-band from the 11.0-RELEASE cycle. Upstream does not seem very responsive, the last direct commit by the author was a year ago, and the most recent activity was merging kmoore's pull request in February. The fix everyone is waiting on has been an open pull request since May 4th. I think we should either change the upstream git repo to someone more responsive (most active development seems to come from pcbsd/trueos), or apply the patch via the ports tree until it is accepted upstream. What are your thoughts Bryan (you are the maintainer of the port)
The fix has been merged upstream, and should be available in ports shortly
*** Bug 211835 has been marked as a duplicate of this bug. ***
In the meanwhile, is there a way to fix the existing boot environments manually to make them bootable via the loader menu? Now that I look at them, all the BEs created with beadm have CANMOUNT=off except the current one which has CANMOUNT=on.
Set all of the BEs to canmount=noauto and it should 'just work'
(In reply to Allan Jude from comment #8) I tried, but when I manipulate with them with beadm, one of them (the current one?) becomes "on" inevitably.
(In reply to Allan Jude from comment #5) Which one will be fixed, beadm or beadm-devel?
(In reply to vas from comment #9) Yes, that is the bug that was fixed upstream this morning If you use only the loader menu it will work. You can change the default manually by doing: zpool set bootfs=poolname/ROOT/bename poolname
(In reply to Allan Jude from comment #5) Which one will be fixed, beadm or beadm-devel?(In reply to Allan Jude from comment #8) Anyway, I can always use beadm from git master until the port is updated, right?
(In reply to vas from comment #12) yes
(In reply to Allan Jude from comment #13) Even the latest version from git is buggy: it leaves the original, first default BE with CANMOUNT=on, which prevents other BEs from booting properly. In the example below, the "kaban" BE was created with the newest beadm from git, and it would not boot from loader menu: root@zfs2:~ # zfs list -o name,canmount,mountpoint NAME CANMOUNT MOUNTPOINT zroot on /zroot zroot/ROOT on none zroot/ROOT/default on / zroot/ROOT/kaban off / zroot/tmp on /tmp zroot/usr off /usr zroot/usr/home on /usr/home zroot/usr/ports on /usr/ports zroot/usr/src on /usr/src zroot/var off /var zroot/var/audit on /var/audit zroot/var/crash on /var/crash zroot/var/log on /var/log zroot/var/mail on /var/mail zroot/var/tmp on /var/tmp root@zfs2:~ #
(In reply to vas from comment #14) If you want to reproduce, do the following: 1. Install a fresh 10.3 system on zfs. 2. fetch beadm 3. beadm create foo 4. zfs list -o name,canmount,mountpoint | grep default
(In reply to vas from comment #15) And when a BE is imported ("beadm import"), it also becomes CANMOUNT=on instead of noauto. Something is terribly underdone.
root@vas:~ # ~sudakov/bin/beadm create September Created successfully root@vas:~ # ~sudakov/bin/beadm list BE Active Mountpoint Space Created Nickname default NR / 6.8G 2016-08-13 22:50 default install - - 3.6M 2016-08-13 23:01 install nox11 - - 1.3M 2016-08-14 00:58 nox11 September - - 156.0K 2016-09-11 14:52 September root@vas:~ # zfs list -o name,canmount,mountpoint | grep ROO zroot/ROOT on none zroot/ROOT/September off / zroot/ROOT/default on / zroot/ROOT/install off / zroot/ROOT/nox11 off / root@vas:~ # Shouldn't 'September' have been created with canmount=noauto? MD5 (/home/sudakov/bin/beadm) = 3f0be545978bae0202d2d6952516664a
Ping!
There are still issues, Bryan Drewery is working on it. It looks like an rc script will need to be brought into the package to manage boot environments with children. Bryan is also looking at porting the IllumOS beadm, rather than the hodgepodge shell script we have now. It is not clear when this will be completely resolved.
Is https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214430 a duplicate? > sysutils/beadm: please update to latest to support loader menu (via 'noauto')
(In reply to Graham Perrin from comment #20) I think it is.
Is there any update on this? Allan said B.Drewery is working on fixing this but his beadm GH repo doesn't seem to have been updated since 2015: https://github.com/bdrewery/beadm Is that not the one you're referring to Allan?
(In reply to Dan MacDonald from comment #22) > Is there any update on this? > > Allan said B.Drewery is working on fixing this but his beadm GH repo doesn't > seem to have been updated since 2015: > > https://github.com/bdrewery/beadm > > Is that not the one you're referring to Allan? The fix requires an rc script that may go into the base system or the port. I have not pushed it out to git.
With rc.d/zfsbe in 11.1, can something be done to make this work out of the box? I patch my beadm installs to only set canmount=noauto, and am a zery happy camper.
(In reply to eborisch+FreeBSD from comment #24) > With rc.d/zfsbe in 11.1, can something be done to make this work out of the > box? I patch my beadm installs to only set canmount=noauto, and am a zery > happy camper. Yeah, beadm could check if that script exists and change the canmount behavior it applies.
*** Bug 214430 has been marked as a duplicate of this bug. ***
(In reply to Bryan Drewery from comment #25) > (In reply to eborisch+FreeBSD from comment #24) > > With rc.d/zfsbe in 11.1, can something be done to make this work out of the > > box? I patch my beadm installs to only set canmount=noauto, and am a zery > > happy camper. > > Yeah, beadm could check if that script exists and change the canmount > behavior > it applies. Similar handling will be needed for `beadm mount` to properly mount the child datasets as well.
(In reply to Bryan Drewery from comment #27) It appears beadm mount handles mounting the child datasets fine. (At least for me; perhaps I don't have quite the same setup?) And (as mentioned above) rc.d/zfsbe in 11.1 handles it on boot. system/ROOT/11.1-p5 2.67M 13.2G 7.20G / system/ROOT/11.1-p5/usr 764K 13.2G 132K none system/ROOT/11.1-p5/usr/local 764K 13.2G 4.79G /usr/local # beadm mount 11.1-p5 /tmp/newbe Mounted successfully on '/tmp/newbe' system/ROOT/11.1-p5 on /tmp/newbe (zfs, local, noatime, nfsv4acls) system/ROOT/11.1-p5/usr/local on /tmp/newbe/usr/local (zfs, local, noatime, nfsv4acls) Not to mention that 'noauto' will also help avoid users doing backups (send/recv w/o -u) getting a nasty surprise.
A commit references this bug: Author: bdrewery Date: Thu Jan 18 21:12:30 UTC 2018 New revision: 459380 URL: https://svnweb.freebsd.org/changeset/ports/459380 Log: - Properly support selecting BE from boot menu. This is only supported for releases that have /etc/rc.d/zfsbe, which is 10.4, 11.1, and newer. PR: 208601 Reported by: many Reviewed by: allanjude Changes: head/sysutils/beadm/Makefile head/sysutils/beadm/files/patch-beadm head/sysutils/beadm/files/patch-beadm.1
Sorry for the long delay on this! Having /etc/rc.d/zfsbe in a majority of supported releases made this simpler.
(In reply to commit-hook from comment #29) Will sysutils/beadm-devel be fixed too?
(In reply to vas from comment #31) > (In reply to commit-hook from comment #29) > Will sysutils/beadm-devel be fixed too? Thanks for the reminder, done.
A commit references this bug: Author: bdrewery Date: Mon Jan 22 21:11:59 UTC 2018 New revision: 459701 URL: https://svnweb.freebsd.org/changeset/ports/459701 Log: Update to latest e55f535b589fb2df4e65e51482e29337b564b756 which fixes BE boot-time selection. PR: 208601 Changes: head/sysutils/beadm-devel/Makefile head/sysutils/beadm-devel/distinfo