Add scripts for installing secure boot

This commit is contained in:
Manuel Thalmann 2023-05-07 01:22:17 +02:00
parent 7210bfced1
commit f78d3437d2
2 changed files with 19 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null; pushd "${BASH_SOURCE%/*}" > /dev/null;
. "../../../scripts/Arch/Conig/SecureBoot/install.sh";
. "../../../scripts/Arch/Devices/SurfaceBook2/install.sh"; . "../../../scripts/Arch/Devices/SurfaceBook2/install.sh";
. "../../../scripts/Arch/Software/sddm/install.sh"; . "../../../scripts/Arch/Software/sddm/install.sh";
. "../../../scripts/Arch/Config/ssh-agent/install.sh"; . "../../../scripts/Arch/Config/ssh-agent/install.sh";

View file

@ -0,0 +1,18 @@
#!/bin/bash
EFI_BOOT_DIR="${EFI_BOOT_DIR:-"/boot"}";
BOOTLOADER_ID=${BOOTLOADER_ID:-"Arch"};
bootNum="$(efibootmgr | sed "/$BOOTLOADER_ID/{ s/^.*Boot\([[:digit:]]\+\)\*.*$/\1/; p; }; d")";
echo $EFI_BOOT_DIR;
yay --noconfirm -Syu secureboot-grub;
sudo efibootmgr --delete-bootnum --bootnum "$bootNum";
sudo sed -i \
-e "/esp=/{" \
-e "a esp=\"$EFI_BOOT_DIR\"" \
-e "d" \
-e "}" \
/etc/secureboot.conf;
sudo secure-grub-install;