ZFS ZFS encryption - Load ZFS keys from external USB flash drive

Dear FreeBSD users,

I started to use ZFS native encryption on FreeBSD 13.0 RELEASE and wanted to load encryption keys at boot time from an external USB flash drive.
I added a line in /etc/fstab to mount the flash drive at boot time.
Code:
/dev/gpt/cryptokey      /media/cryptok  ufs             ro      0       0
I found the script /etc/rc.d/zfskeys freshly supplied in CURRENT but it seems that it can't do that without modifications.
So I changed the rcorder of that script to fill my needs:
Code:
< # REQUIRE: zpool
< # BEFORE: zfs zvol
---
> # REQUIRE: mountcritlocal
> # BEFORE: zfs
Should I request a modification of this script to support this functionality ?
 
It works with only this line modified in /etc/rc.d/zfskeys:
Code:
4c4
< # REQUIRE: zpool
---
> # REQUIRE: mountcritlocal
 
Back
Top