esp: install grub in ubuntu bootloader id path, instead of removable.

Do not use removable uefi bootloader path in the cloud-images by
default, as that prevents upgrades of the bootloader.

LP: #1912830
(cherry picked from commit 7c760864fd)
ubuntu/xenial
Dimitri John Ledkov 4 years ago
parent e1fd5415df
commit 8e99257295
No known key found for this signature in database
GPG Key ID: 9B8EC849D5EF70ED

@ -110,20 +110,10 @@ 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

Loading…
Cancel
Save