use /efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi for /efi/EFI/${NAME}/bootx64.efi
This commit is contained in:
parent
93ea5e8ace
commit
2bda0b737d
|
@ -160,7 +160,7 @@ mount ${OUT}1 boot
|
||||||
mkdir -p boot/EFI/FedoraBook
|
mkdir -p boot/EFI/FedoraBook
|
||||||
cp /efi/EFI/FedoraBook/1.efi boot/EFI/FedoraBook/1.efi
|
cp /efi/EFI/FedoraBook/1.efi boot/EFI/FedoraBook/1.efi
|
||||||
[[ -e /efi/Lockdown.efi ]] && cp /efi/Lockdown.efi boot
|
[[ -e /efi/Lockdown.efi ]] && cp /efi/Lockdown.efi boot
|
||||||
[[ -e /efi/Shell.efi ]] && cp /efi/Lockdown.efi boot/EFI/Boot/bootx64.efi
|
[[ -e /efi/Shell.efi ]] && cp /efi/Shell.efi boot/EFI/Boot/bootx64.efi
|
||||||
|
|
||||||
umount boot
|
umount boot
|
||||||
rmdir boot
|
rmdir boot
|
||||||
|
|
|
@ -175,10 +175,10 @@ if [[ $USE_EFISHELL ]]; then
|
||||||
[[ -e "${SOURCE}"/efi/startup.nsh ]] && cp "${SOURCE}"/efi/startup.nsh "$MY_TMPDIR"/boot/
|
[[ -e "${SOURCE}"/efi/startup.nsh ]] && cp "${SOURCE}"/efi/startup.nsh "$MY_TMPDIR"/boot/
|
||||||
[[ -e "${SOURCE}"/efi/LockDown.efi ]] && cp "${SOURCE}"/efi/LockDown.efi "$MY_TMPDIR"/boot/
|
[[ -e "${SOURCE}"/efi/LockDown.efi ]] && cp "${SOURCE}"/efi/LockDown.efi "$MY_TMPDIR"/boot/
|
||||||
cp "${SOURCE}"/efi/Shell.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
cp "${SOURCE}"/efi/Shell.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
||||||
cp "$SOURCE"/efi/EFI/${NAME}/bootx64.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
cp "$SOURCE"/efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
||||||
else
|
else
|
||||||
cp "$SOURCE"/efi/EFI/${NAME}/bootx64.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
cp "$SOURCE"/efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
||||||
cp "$SOURCE"/efi/EFI/${NAME}/bootx64.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
cp "$SOURCE"/efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
umount "$MY_TMPDIR"/boot
|
umount "$MY_TMPDIR"/boot
|
||||||
|
|
|
@ -883,7 +883,7 @@ objcopy \
|
||||||
${LOGO:+--add-section .splash="$LOGO" --change-section-vma .splash=0x40000} \
|
${LOGO:+--add-section .splash="$LOGO" --change-section-vma .splash=0x40000} \
|
||||||
--add-section .linux="$MY_TMPDIR"/linux --change-section-vma .linux=0x2000000 \
|
--add-section .linux="$MY_TMPDIR"/linux --change-section-vma .linux=0x2000000 \
|
||||||
--add-section .initrd="$MY_TMPDIR"/initrd --change-section-vma .initrd=0x3000000 \
|
--add-section .initrd="$MY_TMPDIR"/initrd --change-section-vma .initrd=0x3000000 \
|
||||||
"${EFISTUB}" "$MY_TMPDIR"/efi/EFI/${NAME}/bootx64.efi
|
"${EFISTUB}" "$MY_TMPDIR"/efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi
|
||||||
|
|
||||||
for i in LockDown.efi Shell.efi startup.nsh; do
|
for i in LockDown.efi Shell.efi startup.nsh; do
|
||||||
[[ -e "${BASEDIR}"/$i ]] || continue
|
[[ -e "${BASEDIR}"/$i ]] || continue
|
||||||
|
|
10
update.sh
10
update.sh
|
@ -234,10 +234,10 @@ if [[ ! -f /efi/EFI/Boot/bootx64.efi ]] \
|
||||||
|| cmp --quiet /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/Boot/bootx64.efi \
|
|| cmp --quiet /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/Boot/bootx64.efi \
|
||||||
|| cmp --quiet /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi /efi/EFI/Boot/bootx64.efi
|
|| cmp --quiet /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi /efi/EFI/Boot/bootx64.efi
|
||||||
then
|
then
|
||||||
cp /efi/EFI/${NAME}/bootx64.efi /efi/EFI/Boot/bootx64.efi
|
cp /efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi /efi/EFI/Boot/bootx64.efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp /efi/EFI/${NAME}/bootx64.efi /efi/EFI/${NAME}/${NEW_ROOT_NUM}.efi
|
cp /efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi /efi/EFI/${NAME}/${NEW_ROOT_NUM}.efi
|
||||||
|
|
||||||
if [[ -f /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi ]]; then
|
if [[ -f /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi ]]; then
|
||||||
mv /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi
|
mv /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi
|
||||||
|
@ -253,4 +253,10 @@ BOOT_ORDER=${BOOT_ORDER#,}
|
||||||
|
|
||||||
efibootmgr -o "FED${NEW_ROOT_NUM},FED$((${OLD_ROOT_NUM}+2)),$BOOT_ORDER"
|
efibootmgr -o "FED${NEW_ROOT_NUM},FED$((${OLD_ROOT_NUM}+2)),$BOOT_ORDER"
|
||||||
|
|
||||||
|
for i in /efi/EFI/${NAME}/bootx64-*.efi; do
|
||||||
|
[[ $i == /efi/EFI/${NAME}/bootx64-$ROOT_HASH.efi ]] && continue
|
||||||
|
[[ $i == /efi/EFI/${NAME}/bootx64-$CURRENT_ROOT_HASH.efi ]] && continue
|
||||||
|
rm -f "$i"
|
||||||
|
done
|
||||||
|
|
||||||
echo "Update successful. Reboot your machine to use it."
|
echo "Update successful. Reboot your machine to use it."
|
||||||
|
|
Loading…
Reference in a new issue