I upgraded Ubuntu from 18.04 to 18.10. I have full disk encryption enabled. When I boot up, I get this error message displayed above the password prompt for the full disk encryption:
cryptsetup: WARNING: Option 'hash' missing in crypttab for plain dm-crypt mapping cryptcherries. Please read /usr/share/doc/cryptsetup/README.initramfs and add the correct 'hash' option to your crypttab(5).
Please unlock disk cryptcherries
Once I enter the correct password, I am told it has been set up correctly, but then I am only shown a black screen with a flashing cursor
Using a live USB stick, I managed to read /etc/crypttab
in my machine, the contents look like this:
cryptcherries UUID=1ae5c201-etc-etc none luks,retry=1,lvm=vgcherries
This is what /etc/fstab
looks like on my machine:
/dev/mapper/vgcherries-vgcherriesroot / ext4 errors=remount-ro 0 1
UUID=03daa82f-etc-etc /boot ext3 defaults 0 2
/dev/mapper/vgcherries-vgcherriesswap none swap sw 0 0
I have been reading README.initramfs
. (Despite what the error message says, I actually found it at /usr/share/doc/cryptesetup-initramfs/README.initramfs.gz
.) I tried modifying cryptsetup
to include hash=sha1
In the live CD, I unencrypted the encrypted partition using Files, and then I chroot it like this:
sudo mount /dev/mapper/vgcherries-vgcherriesroot /mnt
sudo mount /dev/sda4 /mnt/boot
sudo mount --bind /dev /mnt/dev
sudo chroot /mnt
> mount -t proc proc /proc
> mount -t sysfs sys /sys
> mount -t devpts devpts /dev/pts
And then I ran update-initramfs -k all -c
, and got this output:
update-initramfs: Generating /boot/initrd.img-4.18.0-10-generic
cryptsetup: WARNING: target 'luks-1ae5c201-a8c8-458f-a364-6cda7717c24f' not
found in /etc/crypttab
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
integration and avoid this warning.
update-initramfs: Generating /boot/initrd.img-4.15.0-38-generic
cryptsetup: WARNING: target 'luks-1ae5c201-a8c8-458f-a364-6cda7717c24f' not
found in /etc/crypttab
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
integration and avoid this warning.
So I decided to modify crypttab
again, like this:
luks-1ae5c201-a8c8-458f-a364-6cda7717c24f UUID=1ae5c201-a8c8-458f-a364-6cda7717c24f none luks,retry=1,lvm=vgcherries,hash=sha1
Now when I run the command, I get this output:
update-initramfs: Generating /boot/initrd.img-4.18.0-10-generic
cryptsetup: WARNING: luks-1ae5c201-a8c8-458f-a364-6cda7717c24f: ignoring
unknown option 'retry'
cryptsetup: WARNING: luks-1ae5c201-a8c8-458f-a364-6cda7717c24f: ignoring
unknown option 'lvm'
update-initramfs: Generating /boot/initrd.img-4.15.0-38-generic
cryptsetup: WARNING: luks-1ae5c201-a8c8-458f-a364-6cda7717c24f: ignoring
unknown option 'retry'
cryptsetup: WARNING: luks-1ae5c201-a8c8-458f-a364-6cda7717c24f: ignoring
unknown option 'lvm'
I rebooted my machine, and I got the exact same behaviour described initially. I rebooted again in recovery mode, I get this output before being prompted for a password:
Volume group "vgcherries" not found
Cannot process volume group vgcherries
cryptsetup: WARNING: cryptcherries: ignoring unknown option 'lvm'
/scripts/local-top/cryptroot: line 1: fold: not found
/scripts/local-top/cryptroot: line 1: fold: not found
/scripts/local-top/cryptroot: line 1: fold: not found
Please unlock disk cryptcherries:
More information on my hard drive layout:
$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 238.5G
├─sda1 ntfs 350M Réservé au système
├─sda2 ntfs 114.3G
├─sda3 crypto_LUKS 123G
| └─luks-1ae5c201-...
| LVM2_member 123G
| ├─vgcherries-vgcherriesroot
| | ext4 115G
| └─vgcherries-vgcherriesswap
| swap 8G
└─sda4 ext3 800M
nvme0n1p3_crypt UUID=fd00ca82... none luks,discard luks-975eb3f0... UUID=975eb3f0... /etc/luks-keys/luks-975eb3f0... nofail
. Does yours look similar? – Tom Brossman Oct 29 '18 at 19:37crypttab
, have a look at my edited question. – Flimm Nov 02 '18 at 09:10sda5_crypt UUID=(blah, blah) none luks,discard
. That's still one version behind you but I note the options after my UUID are simpler. Haven't a clue how to resolve this though, sorry. – Tom Brossman Nov 02 '18 at 14:36cryptcherries UUID=1ae5c201-a8c8-458f-a364-6cda7717c24f none luks,discard
. Make sure it's the UUID for yourcrypto_LUKS
partition type, and not the (unencrypted)ext4
type of the same size. – Tom Brossman Nov 02 '18 at 14:44update-initramfs
afterwards, getting this error:WARNING: target 'luks-1ae5c...' not found in /etc/crypttab
andWARNING: The initramfs image my not contain cryptsetup binaries nor crypto modules. If that's on purpose, you may want to uninstall the 'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs integration and avoid this warning.
. Upon reboot, I get the Ubuntu splash screen forever. In recovery mode, I get this error: (next comment) – Flimm Nov 07 '18 at 17:15mdadm: No arrays found in config file or automatically. done. Gave up waiting for root file system device.
and then a busybox prompt. – Flimm Nov 07 '18 at 17:16/etc/crypttab
:cryptcherries /dev/disk/by-uuid/1ae5c201-etc-etc none luks,retry=1,lvm=vgcherries
. Note the use of the /dev name. I had to use that a long time ago to work around a systemd bug. You could try it, one never knows. The hash option is ignored for LUKS devices and is obviously not needed. So something wrong is going on here. – solsTiCe Nov 08 '18 at 01:02update-initramfs
I got theThe initramfs image may not contain cryptsetup binaries
warning again. I got the same results as in this comment: https://askubuntu.com/questions/1088355/warning-option-hash-missing-in-crypttab-after-upgrading-ubuntu?noredirect=1#comment1795286_1088355 – Flimm Nov 08 '18 at 07:18mount --bind /run/lvm /mnt/run/lvm
right after you bind /dev to /mnt/dev. You might refer to my post about doing a fresh install with manual partitioning, LVM, and LUKS to see if anything else jumps out at you. While my post is tailored for a completely new installation, it's not hard to see how it could be tailored for a reinstallation. – b_laoshi Nov 09 '18 at 00:21update-grub
inspired by your post, and now Windows has disappeared from the Grub menu. – Flimm Nov 10 '18 at 06:28