From 83667afe02bcf2e0f6645602b52c711665e6e11f Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 14 Jul 2023 09:31:52 -0700 Subject: [PATCH] Revert "Drop use of --removable flag to grub-install from buildd/hooks" This reverts commit e55a349683cb140e6a4437149db31bd28c42e5cb. --- live-build/buildd/hooks/02-disk-image-uefi.binary | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/live-build/buildd/hooks/02-disk-image-uefi.binary b/live-build/buildd/hooks/02-disk-image-uefi.binary index d358596a..280db0ab 100755 --- a/live-build/buildd/hooks/02-disk-image-uefi.binary +++ b/live-build/buildd/hooks/02-disk-image-uefi.binary @@ -102,9 +102,19 @@ install_grub() { --boot-directory=/boot \ --efi-directory=/boot/efi \ --target=${efi_target} \ + --removable \ --uefi-secure-boot \ --no-nvram + 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