Installer failed to write grub to EFI, installing to root on logical volume inside LUKS wrapper, then later crashed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub-installer (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I tried to install 20.04, creating the following custom partition layout:
nvme0n1 259:0 0 1.9T 0 disk
├─nvme0n1p1 259:3 0 512M 0 part /target/boot/efi
└─nvme0n1p2 259:4 0 1.9T 0 part
└─cryptdata 253:0 0 1.9T 0 crypt
├─vg0-root 253:1 0 1.5T 0 lvm /target
└─vg0-vms 253:2 0 371.2G 0 lvm
Everything proceeded fine until I got a popup window with the message:
Executing 'grub-install /dev/nvme0n1' failed.
This is a fatal error.
In the details part of the main installer window was:
ubuntu grub-installer: grub-install: error: attempting to install to encrypted disk without cryptodisk enabled. Set 'GRUB_ENABLE_
The default install allows the disk to be encrypted with the default partition layout, so presumably it knows how to set up grub to work with encrypted root, and it could be made to be a bit smarter about detecting when a custom partition layout includes encryption and set up grub appropriately?
In the meantime, if anyone has any tips on how to get the install to succeed I'd be very grateful to hear them. :)
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubiquity 20.04.15
ProcVersionSign
Uname: Linux 5.4.0-26-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CasperVersion: 1.445
Date: Mon Jul 27 17:19:19 2020
InstallCmdLine: BOOT_IMAGE=
LiveMediaBuild: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200421)
SourcePackage: grub-installer
UpgradeStatus: No upgrade log present (probably fresh install)
Running the following in Terminal early on during the installation gets rid of the 'grub-install' error and subsequent Ubuntu installer crash:
sudo sh -c "echo GRUB_ENABLE_ CRYPTODISK= y>> /target/ etc/default/ grub"
On booting up the installed system the prompt to enter the password for the encrypted LUKS partition is presented, and the partition is decrypted successfully.
However, grub almost immediately fails to boot and I end up at a 'grub>' prompt.