Skip to content

Commit

Permalink
GRUB_EFI: arm64 grub EFI installation support
Browse files Browse the repository at this point in the history
The "--target=x86_64-efi" option obviously does not work for arm64
installation. Skip it in case of an arm64 installation, the x86-64
default is unchanged.

NB: This work comes from the SEAPATH project:
seapath/build_debian_iso#121

Co-authored-by: Florent CARLI <florent.carli@rte-france.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
  • Loading branch information
ycongal-smile and insatomcat committed Dec 27, 2024
1 parent 3f71ea0 commit 52c12b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/GRUB_EFI/10-setup
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ if [ "${_bdev%%-*}" = "/dev/dm" ]; then
BOOT_DEVICE=$( lvs --noheadings -o devices $BOOT_DEVICE | sed -e 's/^*\([^(]*\)(.*$/\1/' )
fi

opts="--no-floppy --target=x86_64-efi --modules=part_gpt"
# ARM64 or AMD64
arch=$(uname -m)
if [ "$arch" == "aarch64" ]; then
opts="--no-floppy --modules=part_gpt"
else
opts="--no-floppy --target=x86_64-efi --modules=part_gpt"
fi

# Check if RAID is used for the boot device
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
Expand Down

0 comments on commit 52c12b1

Please sign in to comment.