Re: ZFS on root, beadm, and the /boot symlink

From: René Ladan <rene_at_freebsd.org>
Date: Sun, 22 May 2016 22:15:11 +0200
On 05/22/16 21:11, Allan Jude wrote:
> 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_at_mako /> zfs get mountpoint bootpool
>>> NAME      PROPERTY    VALUE       SOURCE
>>> bootpool  mountpoint  /bootpool   local
>>>
>>> randy_at_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_at_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_at_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_at_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_at_mako /> zpool get cachefile zroot
>>> NAME   PROPERTY   VALUE      SOURCE
>>> zroot  cachefile  -          default
>>
>>> randy_at_mako /> zpool get cachefile bootpool
>>> NAME      PROPERTY   VALUE      SOURCE
>>> bootpool  cachefile  -          default
>>
>>> randy_at_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.
> 
Ah, I ran into this as well. I installed FreeBSD in UEFI mode from
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.0/ which
creates a separate boot pool as described above.

Although creating the new boot environment went fine, upgrading that to
a pkgbase install with the new boot environment jailed failed when
installing the FreeBSD-runtime package because that installs
/boot/loader.efi and /boot is a dangling symbolic link in that jail.

Regards,
René



Received on Sun May 22 2016 - 18:15:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC