Skip to content

Commit

Permalink
ubuntu: Align grub-install with Debian
Browse files Browse the repository at this point in the history
This should fix image creation for Ubuntu 24.04 and later.

Thanks a lot to Kienan Stewart for going down the grub rabbit hole and
figuring this one out!

Closes #813

Reported-by: @kienanstewart
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Feb 14, 2024
1 parent aed93a7 commit 9431a80
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions images/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,14 @@ actions:
TARGET="x86_64"
[ "$(uname -m)" = "aarch64" ] && TARGET="arm64"
update-grub
# This will create EFI/BOOT
grub-install --uefi-secure-boot --target="${TARGET}-efi" --no-nvram --removable
update-grub
sed -i "s#root=[^ ]*#root=/dev/sda2#g" /boot/grub/grub.cfg
# This will create EFI/ubuntu
grub-install --uefi-secure-boot --target="${TARGET}-efi" --no-nvram
types:
- vm

Expand Down

0 comments on commit 9431a80

Please sign in to comment.