You are not logged in.

#1 2013-12-08 20:43:33

Emil
Member
Registered: 2013-12-08
Posts: 10

LUKS encrypted root on ZFS [solved]

Hi,

I'm trying to install Arch Linux on ZFS while having my root filesystem encrypted with LUKS. I followed the wiki aritcles about installing Arch Linux on ZFS and LUKS. When I try to boot I get this message:
http://tinypic.com/view.php?pic=30ico5i&s=5

The ZFS filesystem is mounted, but it's mounted on /new_root.

my grub.cfg entry looks like this:

linux   /vmlinuz-linux root=/dev/mapper/cryptroot quiet zfs=zroot cryptdevice=/dev/disk/by-uuid/547372cd-a372-4f7e-823d-dec4df7a39e8:cryptroot zfs_force=1

and I added these lines to mkinitcpio.conf:

MODULES="dm_mod zfs"
HOOKS="base udev autodetect modconf block keyboard keymap encrypt zfs filesystems shutdown"

I use one disk with an unencrypted ext2 /boot partition and a luks encrypted zfs partition.

Last edited by Emil (2013-12-12 20:50:57)

Offline

#2 2013-12-08 20:56:37

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: LUKS encrypted root on ZFS [solved]

Emil wrote:

The ZFS filesystem is mounted, but it's mounted on /new_root.

This means that it is just not making it out of the initramfs.  From the point of the bootloader, the kernel is loaded and the initramfs is decompressed as well, making up the initial filesystem.  Then the necessary hardware is initialized to mount the rootfs, which is mounted to new_root.  Then '/usr/bin/switch_root /new_root $init $@' is run to make /new_root the /, after which /sbin/init is run.

So I have no idea about zfs or the hook in play here, but it would seem as though it is stalling somewhere within the initramfs instead of running the switch_root.  So you should investigate the contents of that particular hook maybe.  From the initramfs, you should also be able to access logs to see what has been done and where it has errored out.

Offline

#3 2013-12-12 20:50:27

Emil
Member
Registered: 2013-12-08
Posts: 10

Re: LUKS encrypted root on ZFS [solved]

Thanks, when searching for the log files I found the problem:
I thought ZFS would take care of mounting /usr, /var and /etc but apparently it doesn't (not sure whether /var or /etc gave a problem or both). Putting /usr /var ans /etc on the root filesystem solved the problem.
System boots and works fine now, but I still do get the weird message:

cannot open 'zroot' : no such pool
ZFS: importing pool zroot.

Is this normal?

Offline

#4 2014-08-29 03:12:24

timemaster
Member
Registered: 2012-09-26
Posts: 26

Re: LUKS encrypted root on ZFS [solved]

Emil, I am having the same issue as you on a system with zfs as root. However unlike you, I do not encrypt my disks with lunks. Did you find something ?

Offline

#5 2014-08-29 12:27:17

Emil
Member
Registered: 2013-12-08
Posts: 10

Re: LUKS encrypted root on ZFS [solved]

Everything works fine, but I still do get the message:

cannot open 'zroot' : no such pool
ZFS: importing pool zroot.

Offline

Board footer

Powered by FluxBB