LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   initrd not building correctly (https://www.linuxquestions.org/questions/ubuntu-63/initrd-not-building-correctly-4175633293/)

upnort 07-04-2018 06:35 PM

initrd not building correctly
 
I am trying to install Ubuntu MATE 16.04 into a LUKS partition.

I am not using the defaults from the installer. I manually created two partitions, an ext2 /boot and a LUKS/ext4 system partition. With the installer I select the Something else option.

I manually select the partitions and I am not using LVM.

I am able to install with no problems. I do not reboot but instead, run some mount --bind commands and chroot into the new system. I verify the fstab. Tweak /etc/default/grub with GRUB_ENABLE_CRYPTODISK=y. I then run update-grub and update-initramfs -u -v.

All seems to go well.

Upon rebooting, the system shows a Press any key to continue message and then fails to prompt for a LUKS passphrase. The boot process drops to an initramfs shell. The ALERT error message is the UUID of the LUKS partition does not exist. Of course, the partition does exist and I can boot into a Live ISO and mount the partition.

I am unable to manually run cryptsetup at the (initramfs) prompt. Exploding the initrd shows no cryptsetup command in sbin.

Seems the initrd is not building correctly. Any ideas how to resolve?

Thanks again. :)

P.S. I performed the steps on one other system and was successful. I have compared config files, grub.cfg, etc. I have been testing this with both bare metal and VMs. I have browsed hundreds of tutorials and threads looking for a clue.

Edit: Possibly I have narrowed this to two issues. One, CRYPTSETUP=y needs to be set in /etc/environment and two, /etc/initramfs-tools/conf.d/cryptroot must be manually created. The Press any key to continue message is caused by a broken cryptomount -u entry in grub.cfg that should not exist. Looks like grub-mkconfig and update-initramfs are broken.

Edit: Looks like /etc/initramfs-tools/hooks/cryptsetup might be needed, chmod +x, containing:

Code:

CRYPTSETUP=y
export CRYPTSETUP=y



All times are GMT -5. The time now is 01:18 AM.