You are not logged in.

#1 2016-11-25 07:56:31

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

[SOLVED] stuck at zfs hook with LUKS/dm-crypt

I hesitate to post this, as I feel I am missing something very obvious.   On an XPS 9360, I had installed arch on ZFS successfully with the root mount being a legacy mount.

I am rebuilding the system adding in LUKS/dm-crypt, but I am stuck at the zfs hook.

:: running hook [zfs]
:: mounting '/dev/mapper/cryptroot' on real root
mount: unknown filesystem type 'zfs_member'
You are now being dropped into an emergency shell
sh: can't access tty: job control turned off
[rootfs ]#

System is UEFI using systemd-boot.  The disk has 3 partitions: esp, swap, primary (zfs). swap and primary partition are both encrypted.

Hooks are:

base udev autodetect modconf block keyboard encrypt openswap resume zfs filesystems

My kernel options are:

cryptdevice=/dev/disk/by-id/<id>:cryptroot root=/dev/mapper/cryptroot resume=/dev/mapper/swapDevice

The openswap module is mkinitcpio-openswap (AUR), and I edited /etc/openswap.conf to point to the correct device and also reran mkinitcpio -p linux.

I have regenerated /etc/zfs/zpool.cache to rule it out.

I am not using any legacy mounts in the zpool and all mounts are specificed with -o mountpoint=<path>.   This is a deviation from my prior successful build, but it seems that it should work.

Other than attempting to use a legacy mount for /, does anyone have any other suggestions?

Last edited by blahhumbug (2016-11-27 00:02:18)

Offline

#2 2016-11-25 14:18:14

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [SOLVED] stuck at zfs hook with LUKS/dm-crypt

The zfs hook looks for “root=zfs” or “zfs=...”; none of which you've specified.
See:

mkinitcpio -H zfs 

Remove your current “root” option and use one of the options the zfs hook wants.

Offline

#3 2016-11-25 16:52:44

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Re: [SOLVED] stuck at zfs hook with LUKS/dm-crypt

Thank you for pointing me in the right direction!  I was also missing the rw option.  The correct and working set is:

cryptdevice=/dev/disk/by-id/<id>:cryptroot zfs=zroot/ROOT/default resume=/dev/mapper/swapDevice rw

Offline

#4 2016-11-25 19:18:45

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [SOLVED] stuck at zfs hook with LUKS/dm-crypt

Please remember to mark this thread solved (edit OP and prepend “[SOLVED]” to the title).
It helps anyone else who gets the same problem know that there is a solution here smile

Offline

Board footer

Powered by FluxBB