Add scripts for installing secure boot
This commit is contained in:
parent
ac2eb53194
commit
543d3e59ca
2 changed files with 19 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
|
||||
. "../../../scripts/Arch/Conig/SecureBoot/install.sh";
|
||||
. "../../../scripts/Arch/Devices/SurfaceBook2/install.sh";
|
||||
. "../../../scripts/Arch/Software/sddm/install.sh";
|
||||
. "../../../scripts/Arch/Config/ssh-agent/install.sh";
|
||||
|
|
18
scripts/Arch/Config/SecureBoot/install.sh
Executable file
18
scripts/Arch/Config/SecureBoot/install.sh
Executable 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;
|
Loading…
Reference in a new issue