I am manually (i.e. via custom scripts) installing an Ubuntu 21.04 system.
My GPT disk has two partitions. An EFI System Partition, and a LUKS (version 1) encrypted BTRFS partition.
grub flashes the following error messages, and then drops to a
error: file `/boot' not found. error: no such device: /.disk/info. error: no such device: /.disk/mini-info. error: can't find command `cryptomount'.
My question is: how do I provide/activate the
cryptomount command inside Grub?
(If I type
help at the
grub prompt, the command
cryptomount is not listed.)
Interestingly, if I add a type
ef02 BIOS boot partition, and install the BIOS version of Grub, and boot the system in BIOS mode, the boot will succeed. However, I want the disk to boot on a UEFI system.
I have looked at the instructions at the below link, and I don't see anything else I need to do to enable the
cryptomount command. I tried adding
insmod cryptomount to
/boot/efi/EFI/BOOT/grub.cfg, but that did not work.
Previously, I have manually installed Ubuntu with a plaintext
/boot partition and an encrypted
/ partition, and everything worked. So the new element is that I am trying to put the
/boot directory on the encrypted
/ partition. I have also installed Void Linux with
/boot on an encrypted partition, and that worked as expected.
cryptomount -u e5f6f8f5dc3944cbb6d8d99b1f17b343 search.fs_uuid 5e42bb87-3342-48b6-aff5-f2519063f9b9 root cryptouuid/e5f6f8f5dc3944cbb6d8d99b1f17b343 set prefix=($root)'/@_2107_hirsute/boot/grub' configfile $prefix/grub.cfg
grub by running the following:
opts='' opts="$opts --force" opts="$opts --no-floppy" opts="$opts --recheck" opts="$opts --removable" opts="$opts --target=x86_64-efi" opts="$opts --efi-directory=/boot/efi" opts="$opts --bootloader-id=Ubuntu" chroot /mnt grub-install $opts