HAMMER2 - mounting root from dm_crypt
Daniel Bilik
ddb at neosystem.org
Fri Jan 18 05:05:53 PST 2019
Hi.
After getting enough courage from responses on this mailing list [1], I've
decided to migrate my system to hammer2 on dm_target_crypt(4)ed volume.
Basically, I've been following "Manual Crypto Installation" guide [2],
just making newfs_hammer2 instead of newfs_hammer. But there was a problem
when mounting the filesystem. Instead of...
mount /dev/mapper/root /mnt
... which gave me "Invalid argument" error, I had to...
mount /dev/mapper/root at ROOT /mnt
Then I've placed the system there, modified loader.conf(5) to include...
vfs.root.realroot="crypt:hammer2:/dev/serno/<serial-of-disk>.s1d:root"
... and rebooted the machine, but initrd failed to mount rootfs. Looking at
the content of initrd, I've found out that /etc/rcmount_crypt is trying to
do the right thing (ie. to mount hammer2 rootfs) but the same wrong way
(ie. with missing "@ROOT" suffix). So I've modified the script (see
attachment) and regenerated initrd. The system is now booting fine,
properly mounting hammer2 rootfs from a crypted partition.
The question is... Does hammer2 really require "@" suffix to be mounted,
even for the root of the filesystem? Or have I created my hammer2
filesystem some wrong way? If it's by design and "@" is required,
then /etc/rcmount_crypt from initrd is probably missing that bit... Is
my modification of the script sufficiently generic to be pushed to master?
Thank you.
--
Daniel
[1] http://lists.dragonflybsd.org/pipermail/users/2018-December/358019.html
[2] http://www.dragonflybsd.org/docs/handbook/Installation/#index5h1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etc_rcmount_crypt.diff
Type: text/x-diff
Size: 526 bytes
Desc: not available
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20190118/5eb3483c/attachment-0001.bin>
More information about the Users
mailing list