Add entries for KeyTool and UEFI Shell

This commit is contained in:
Manuel Thalmann 2022-11-18 11:42:07 +01:00
parent 9d331249b9
commit 5672ecb34f

View file

@ -14,7 +14,7 @@ else
cd "$contextRoot" cd "$contextRoot"
# Install Prerequisites # Install Prerequisites
apt install -y wget rpm2cpio apt install -y wget rpm2cpio efitools
# Download and Extract Package # Download and Extract Package
wget https://kojipkgs.fedoraproject.org//vol/fedora_koji_archive02/packages/shim-signed/15/2/x86_64/shim-x64-15-2.x86_64.rpm -O "$packageName" wget https://kojipkgs.fedoraproject.org//vol/fedora_koji_archive02/packages/shim-signed/15/2/x86_64/shim-x64-15-2.x86_64.rpm -O "$packageName"
@ -37,6 +37,8 @@ else
mv $defaultBootDir/BOOTx64.efi $defaultBootDir/grubx64.efi mv $defaultBootDir/BOOTx64.efi $defaultBootDir/grubx64.efi
cp "$src/shimx64.efi" $defaultBootDir/BOOTx64.efi cp "$src/shimx64.efi" $defaultBootDir/BOOTx64.efi
cp "$src/mmx64.efi" $defaultBootDir cp "$src/mmx64.efi" $defaultBootDir
cp /usr/lib/efitools/x86_64-linux-gnu/KeyTool.efi /boot/efi/EFI/systemd/
wget https://github.com/tianocore/edk2-archive/raw/master/ShellBinPkg/UefiShell/X64/Shell.efi -O "$systemdFullName/Shell.efi"
# Add boot entries # Add boot entries
efibootmgr --unicode --disk /dev/nvme0n1 --part 0 --create --label "Shim" --loader /EFI/BOOT/BOOTx64.efi efibootmgr --unicode --disk /dev/nvme0n1 --part 0 --create --label "Shim" --loader /EFI/BOOT/BOOTx64.efi
@ -51,6 +53,16 @@ else
echo "efi /EFI/BOOT/mmx64.efi" echo "efi /EFI/BOOT/mmx64.efi"
} > /boot/efi/loader/entries/MokManager.conf } > /boot/efi/loader/entries/MokManager.conf
{
echo "title KeyTool"
echo "efi /EFI/systemd/KeyTool.efi"
} > /boot/efi/loader/entries/KeyTool.conf
{
echo "title UEFI Shell"
echo "efi /EFI/systemd/Shell.efi"
} > /boot/efi/loader/entries/Shell.conf
# Install surface MOK # Install surface MOK
apt install -y linux-surface-secureboot-mok apt install -y linux-surface-secureboot-mok