From bf6e4d35a32ee28169c0e784f736547145e0c424 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 10 Feb 2021 12:59:36 +0000 Subject: [PATCH] Revert "esp: install grub in ubuntu bootloader id path, instead of removable." This reverts commit 8e9925729534fffa7b8fb1a30a2f4527b00e850e. --- .../ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index cef0d8f4..110377b4 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -110,10 +110,20 @@ EOF --boot-directory=/boot \ --efi-directory=/boot/efi \ --target=${efi_target} \ + --removable \ --uefi-secure-boot \ --no-nvram \ --modules="${grub_modules}" + if [ -f mountpoint/boot/efi/EFI/BOOT/grub.cfg ]; then + sed -i "s| root| root hd0,gpt1|" mountpoint/boot/efi/EFI/BOOT/grub.cfg + sed -i "1i${IMAGE_STR}" mountpoint/boot/efi/EFI/BOOT/grub.cfg + # For some reason the grub disk is looking for /boot/grub/grub.cfg on + # part 15.... + chroot mountpoint mkdir -p /boot/efi/boot/grub + chroot mountpoint cp /boot/efi/EFI/BOOT/grub.cfg /boot/efi/boot/grub + fi + if [ "$ARCH" = "amd64" ]; then # Install the BIOS/GPT bits. Since GPT boots from the ESP partition, # it means that we just run this simple command and we're done