zfs + luks + grub issues

James jameszee13 at gmail.com
Wed Jun 15 21:52:16 UTC 2016


Hello,

Hoping to get some help with a (seemingly basic) setup I'm struggling with.

I'm using Ubuntu Xenial (16.04) and installing on ZFS on LUKS which, as far
as I have read, is supported. A reboot after going through the installation
process results in an ugly error:

error: no such cryptodisk found.
Entering rescue mode...
grub rescue>

Here are some details around my setup:

I have a server with 6 identical drives; I've encrypted all drives via LUKS
and created a zpool using the crypto devices. The disks are partitioned
identically:

# fdisk -l /dev/sda
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9BF6F9E5-863F-4A8E-A9EC-82E24670ADC3

Device        Start      End  Sectors Size Type
/dev/sda1      2048 41906175 41904128  20G Solaris /usr & Apple ZFS
/dev/sda2  41906176 41924607    18432   9M BIOS boot
/dev/sda9  41924608 41943006    18399   9M Solaris reserved 1

~# ls /dev/disk/by-id/*CRYPT*
/dev/disk/by-id/dm-uuid-CRYPT-LUKS1-2da63c7ccee346d2af57ce887eeb8411-crypto-d
/dev/disk/by-id/dm-uuid-CRYPT-LUKS1-6a338a713b224c129ea6b26ceb90b499-crypto-a
/dev/disk/by-id/dm-uuid-CRYPT-LUKS1-70c5772bf8c14f3a8480acdffee86afd-crypto-b
/dev/disk/by-id/dm-uuid-CRYPT-LUKS1-7af8ecc364304c369fb7de9d9ff9709d-crypto-e
/dev/disk/by-id/dm-uuid-CRYPT-LUKS1-a88a6d8e7d02427c94e7ebd1ade1e5ed-crypto-f
/dev/disk/by-id/dm-uuid-CRYPT-LUKS1-c5fa340070064c1ba8195618998ba58b-crypto-c

~# zpool status
  pool: rpool
 state: ONLINE
  scan: none requested
config:

NAME
STATE     READ WRITE CKSUM
rpool
ONLINE       0     0     0
 raidz2-0
ONLINE       0     0     0
   dm-uuid-CRYPT-LUKS1-2da63c7ccee346d2af57ce887eeb8411-crypto-d
ONLINE       0     0     0
   dm-uuid-CRYPT-LUKS1-6a338a713b224c129ea6b26ceb90b499-crypto-a
ONLINE       0     0     0
   dm-uuid-CRYPT-LUKS1-70c5772bf8c14f3a8480acdffee86afd-crypto-b
ONLINE       0     0     0
   dm-uuid-CRYPT-LUKS1-7af8ecc364304c369fb7de9d9ff9709d-crypto-e
ONLINE       0     0     0
   dm-uuid-CRYPT-LUKS1-c5fa340070064c1ba8195618998ba58b-crypto-c
ONLINE       0     0     0

errors: No known data errors

~# zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
rpool                   2.79G  54.3G   170K  /mnt/ubuntu
rpool/home               383K  54.3G   170K  /mnt/ubuntu/home
rpool/home/root          213K  54.3G   213K  /mnt/ubuntu/root
rpool/root               675M  54.3G   170K  /mnt/ubuntu
rpool/root/ubuntu        675M  54.3G   675M  /mnt/ubuntu
rpool/root/ubuntu/boot   170K  54.3G   170K  /mnt/ubuntu
rpool/swap              2.13G  56.4G   114K  -

# cat /etc/default/grub
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

I was successful in getting GRUB to install on all of the drives (keep in
mind that /boot is part of a ZFS pool).

As mentioned, however, a reboot results in GRUB failing to boot.

Any help would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160615/429d556a/attachment.html>


More information about the ubuntu-users mailing list