Comment 3 for bug 1889107

Revision history for this message
Jonathan Watt (jwatt) wrote :

The following shows that the contents of /efi/ubuntu/grub.cfg are broken, and shows my attempt to rerun the contents of that file with corrected values to try to boot. This gets me to a boot menu where I can choose Ubuntu, get the spinning throbber indicating that Ubuntu is loading, but then I get dumped into an '(initramfs)' prompt.

grub> ls
(crypto0) (proc) (lvm/vg-root) (hd0) (hd0,gpt2) (hd0,gpt1)

# Examine first partitions contents:
grub> ls (hd0,gpt1)
        Partition hd0,gpt1: Filesystem type fat, <...>
grub> ls (hd0,gpt1)/
efi/
grub> ls (hd0,gpt1)/efi/
ubuntu/ boot/
grub> ls (hd0,gpt1)/efi/boot/
bootx64.efi fbx64.efi mmx64.efi
grub> ls (hd0,gpt1)/efi/ubuntu/
grubx64.efi shimx64.efi mmx64.efi bootx64.csv grub.cfg

# Examine /efi/ubuntu/grub.cfg
grub> cat (hd0,gpt1)/efi/ubuntu/grub.cfg
cryptomount -u <a-UUID>
search.fs_uuid <another-UUID> root lvmid/<long-identifier>/<another-identifier>
set prefix=($root)'/@/boot/grub'
configfile $prefix/grub.cfg

# Examine second partition's contents:
grub> ls (lvm/vg-root)
Device lvm/vg-root: Filesystem type btrfs, UUID <a-UUID> - ...
grub> ls (lvm/vg-root)/
@/ @home/
grub> ls (lvm/vg-root)/@
dev/ run/ lib32 boot/ lib sbin cdrom/ srv/ media/ usr/ opt/ lib64 swapfile bin home/ etc/ swap/ var/ tmp/ libx32 sys/ mnt/ proc/ root/

# Fix $root
# Note: I include parenthesis and append '/@' (since it's BTRFS) - is that okay?
grub> echo $root
hd0,gpt1
grub> set root=(lvm/vg-root)/@

# Fix $prefix
# Note: Given the changes to $root, I don't include parenthesis or "/@" here.
grub> echo $prefix
(hd0,gpt1)/@/boot/grub
grub> ls $prefix
error: file '/@/boot/grub' not found.
set prefix=$root'/boot/grub'

# Now try to boot:
configfile $prefix/grub.cfg