From owner-freebsd-current@freebsd.org Sun May 22 19:11:59 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 690C1B45F17 for ; Sun, 22 May 2016 19:11:59 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id 4F43217FC for ; Sun, 22 May 2016 19:11:59 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id B1174D913 for ; Sun, 22 May 2016 19:11:52 +0000 (UTC) Subject: Re: ZFS on root, beadm, and the /boot symlink To: freebsd-current@freebsd.org References: <20160522184113.GU19887@gmail.com> From: Allan Jude Message-ID: <6ff9950d-2b43-4799-9812-46e081d2b72b@freebsd.org> Date: Sun, 22 May 2016 15:11:52 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160522184113.GU19887@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2016 19:11:59 -0000 On 2016-05-22 14:41, Randy Westlund wrote: > My system was installed from 10.1 or 10.2 with root on ZFS and geli, but > now it tracks current. It is not an EFI system. I'm trying to get boot > environments to work, but the /boot symlink is throwing me off. > > I have two pools from the installer's layout; a small bootpool and > zroot. The bootpool mounts at /bootpool and /boot is a symlink to it. > >> randy@mako /> zfs get mountpoint bootpool >> NAME PROPERTY VALUE SOURCE >> bootpool mountpoint /bootpool local >> >> randy@mako /> ls -al /boot >> lrwxr-xr-x 1 root wheel 13 Aug 12 2015 /boot -> bootpool/boot > > When I try to activate a boot environment, I get this error: > >> root@mako:/ # beadm activate r300358 >> cp: /tmp/BE-r300358.FS6Xo6ot/boot/zfs/zpool.cache: No such file or directory > > Because the new boot environment has a symlink to an empty directory: > >> randy@mako /> ls -al /tmp/BE-r300358.FS6Xo6ot/boot >> lrwxr-xr-x 1 root wheel 13 Aug 12 2015 /tmp/BE-r300358.FS6Xo6ot/boot -> bootpool/boot >> >> randy@mako /> ls -al /tmp/BE-r300358.FS6Xo6ot/bootpool >> total 9 >> drwxr-xr-x 2 root wheel 2 Aug 18 2015 . >> drwxr-xr-x 21 root wheel 29 May 21 16:23 .. > > Mergemaster complains about the /boot symlink as well. > > I'm not sure what the cachefile does or why it's there. It has a recent > modification time, but neither pool seems to reference it. > >> randy@mako /> zpool get cachefile zroot >> NAME PROPERTY VALUE SOURCE >> zroot cachefile - default > >> randy@mako /> zpool get cachefile bootpool >> NAME PROPERTY VALUE SOURCE >> bootpool cachefile - default > >> randy@mako /> ls -al /boot/zfs/zpool.cache >> -rw-r--r-- 1 root wheel 2512 May 21 16:23 /boot/zfs/zpool.cache > > What's the proper way to handle the /boot symlink with beadm? > > Randy > It is not possible to use boot environments when you have a separate bootpool. This is the motivation for my recent work to implement GELI in boot2 and loader, to allow you to combine GELI encryption with ZFS boot environments, which previously required a second unencrypted pool for the loader and kernel. -- Allan Jude