clonedisk.sh,mkimage.sh: install Shell.efi and Lockdown.efi
This commit is contained in:
parent
7b5e78e9a1
commit
7a10c19f02
22
clonedisk.sh
22
clonedisk.sh
|
@ -159,19 +159,19 @@ mkdir -p boot
|
||||||
mount ${OUT}1 boot
|
mount ${OUT}1 boot
|
||||||
mkdir -p boot/EFI/FedoraBook
|
mkdir -p boot/EFI/FedoraBook
|
||||||
cp /efi/EFI/Boot/bootx64.efi boot/EFI/FedoraBook/1.efi
|
cp /efi/EFI/Boot/bootx64.efi boot/EFI/FedoraBook/1.efi
|
||||||
|
[[ -e /efi/Lockdown.efi ]] && cp /efi/Lockdown.efi boot
|
||||||
|
[[ -e /efi/Shell.efi ]] && cp /efi/Lockdown.efi boot/EFI/Boot/bootx64.efi
|
||||||
|
|
||||||
umount boot
|
umount boot
|
||||||
rmdir boot
|
rmdir boot
|
||||||
|
|
||||||
if ! [[ $UPDATE ]]; then
|
if ! [[ $UPDATE ]]; then
|
||||||
if ! [[ $(efibootmgr) == *FED1* ]]; then
|
for i in FED1 FED2 FED3 FED4; do
|
||||||
efibootmgr -C -b FED1 -d ${OUT_DEV} -p 1 -L "FedoraBook 1" -l '\efi\fedorabook\1.efi'
|
efibootmgr -B -b $i
|
||||||
efibootmgr -C -b FED2 -d ${OUT_DEV} -p 1 -L "FedoraBook 2" -l '\efi\fedorabook\2.efi'
|
done
|
||||||
efibootmgr -C -b FED3 -d ${OUT_DEV} -p 1 -L "FedoraBook Old 1" -l '\efi\fedorabook\_1.efi'
|
efibootmgr -C -b FED1 -d ${OUT_DEV} -p 1 -L "FedoraBook 1" -l '\efi\fedorabook\1.efi'
|
||||||
efibootmgr -C -b FED4 -d ${OUT_DEV} -p 1 -L "FedoraBook Old 2" -l '\efi\fedorabook\_2.efi'
|
efibootmgr -C -b FED2 -d ${OUT_DEV} -p 1 -L "FedoraBook 2" -l '\efi\fedorabook\2.efi'
|
||||||
fi
|
efibootmgr -C -b FED3 -d ${OUT_DEV} -p 1 -L "FedoraBook Old 1" -l '\efi\fedorabook\_1.efi'
|
||||||
|
efibootmgr -C -b FED4 -d ${OUT_DEV} -p 1 -L "FedoraBook Old 2" -l '\efi\fedorabook\_2.efi'
|
||||||
BOOT_ORDER=$(efibootmgr | grep BootOrder: | { read _ a; echo "$a"; })
|
efibootmgr -o "FED1,FED2,FED3,FED4,$BOOT_ORDER"
|
||||||
if ! [[ $BOOT_ORDER == *FED1* ]]; then
|
|
||||||
efibootmgr -o "FED1,FED2,FED3,FED4,$BOOT_ORDER"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -158,6 +158,8 @@ mount ${DEV_PART}1 "$MY_TMPDIR"/boot
|
||||||
|
|
||||||
mkdir -p "$MY_TMPDIR"/boot/EFI/Boot
|
mkdir -p "$MY_TMPDIR"/boot/EFI/Boot
|
||||||
cp "$SOURCE"/bootx64.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
cp "$SOURCE"/bootx64.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
||||||
|
[[ -e ${CURDIR}/Lockdown.efi ]] && cp ${CURDIR}/Lockdown.efi "$MY_TMPDIR"/boot/
|
||||||
|
[[ -e ${CURDIR}/Shell.efi ]] && cp ${CURDIR}/Lockdown.efi "$MY_TMPDIR"/boot/
|
||||||
umount "$MY_TMPDIR"/boot
|
umount "$MY_TMPDIR"/boot
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue