From 2a52421b24f6be7507074d3f548c2edc4ba66b3e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 14 Sep 2018 10:27:12 +0200 Subject: [PATCH] update.sh: Change the EFI boot order DELL BIOS' don't do real fallback, if the efi binary does not exist. Gah! --- update.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/update.sh b/update.sh index 77fc11f..f80beb4 100755 --- a/update.sh +++ b/update.sh @@ -176,3 +176,13 @@ cp bootx64.efi /efi/EFI/${NAME}/${NEW_ROOT_NUM}.efi mv /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi || : rm -f /efi/EFI/${NAME}/_${NEW_ROOT_NUM}.efi + +BOOT_ORDER=$(efibootmgr | grep BootOrder: | { read _ a; echo "$a"; }) +BOOT_ORDER=${BOOT_ORDER//FED?,} +BOOT_ORDER=${BOOT_ORDER//FED?} +BOOT_ORDER=${BOOT_ORDER%,} +BOOT_ORDER=${BOOT_ORDER#,} + +efibootmgr -o "FED${NEW_ROOT_NUM},FED$((${OLD_ROOT_NUM}+2)),$BOOT_ORDER" + +echo "Update successful. Reboot your machine to use it." \ No newline at end of file