mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-24 22:21:24 +00:00
fix migrate2rocky script for aarch64 systems by using correct suffix for grub2-efi* and shim* packages (#138)
* fix migrate2rocky script for aarch64 systems by using correct suffix for grub2-efi* and shim* packages * wrap value passed to -l option of efibootmgr command in quotes
This commit is contained in:
parent
a208a1ce0b
commit
68c77adbb3
@ -160,6 +160,14 @@ stream_repos_pkgs=(
|
|||||||
[epel-release]=epel-next-release
|
[epel-release]=epel-next-release
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Map for package name suffix for shim/grub2-efi
|
||||||
|
# on x86_64: grub2-efi-x64, shim-x64
|
||||||
|
# on aarch64: grub2-efi-aa64, shim-aa64
|
||||||
|
declare -A cpu_arch_suffix_map=(
|
||||||
|
[x86_64]=x64
|
||||||
|
[aarch64]=aa64
|
||||||
|
)
|
||||||
|
|
||||||
# Prefix to add to CentOS stream repo names when renaming them.
|
# Prefix to add to CentOS stream repo names when renaming them.
|
||||||
stream_prefix=stream-
|
stream_prefix=stream-
|
||||||
|
|
||||||
@ -502,8 +510,8 @@ collect_system_info () {
|
|||||||
# We need to make sure that these packages are always installed in an
|
# We need to make sure that these packages are always installed in an
|
||||||
# EFI system.
|
# EFI system.
|
||||||
always_install+=(
|
always_install+=(
|
||||||
shim-x64
|
"shim-${cpu_arch_suffix_map[$ARCH]}"
|
||||||
grub2-efi-x64
|
"grub2-efi-${cpu_arch_suffix_map[$ARCH]}"
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1098,7 +1106,7 @@ fix_efi () (
|
|||||||
exit_message "Error updating the grub config."
|
exit_message "Error updating the grub config."
|
||||||
for i in "${!efi_disk[@]}"; do
|
for i in "${!efi_disk[@]}"; do
|
||||||
efibootmgr -c -d "/dev/${efi_disk[$i]}" -p "${efi_partition[$i]}" \
|
efibootmgr -c -d "/dev/${efi_disk[$i]}" -p "${efi_partition[$i]}" \
|
||||||
-L "Rocky Linux" -l /EFI/rocky/shimx64.efi ||
|
-L "Rocky Linux" -l "/EFI/rocky/shim${cpu_arch_suffix_map[$ARCH]}.efi" ||
|
||||||
exit_message "Error updating uEFI firmware."
|
exit_message "Error updating uEFI firmware."
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user