Skip to content

Commit

Permalink
Update Secure Boot support
Browse files Browse the repository at this point in the history
  • Loading branch information
picodotdev committed Nov 11, 2023
1 parent a1ef63b commit bc0738b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions alis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1292,8 +1292,8 @@ function bootloader_grub() {
arch-chroot "${MNT_DIR}" grub-mkconfig -o "${BOOT_DIRECTORY}/grub/grub.cfg"

if [ "$SECURE_BOOT" == "true" ]; then
cp {PreLoader,HashTool}.efi "${MNT_DIR}${ESP_DIRECTORY}/EFI/grub"
cp "${ESP_DIRECTORY}/EFI/grub/grubx64.efi" "${MNT_DIR}${ESP_DIRECTORY}/EFI/systemd/loader.efi"
mv {PreLoader,HashTool}.efi "${MNT_DIR}${ESP_DIRECTORY}/EFI/grub"
cp "${MNT_DIR}${ESP_DIRECTORY}/EFI/grub/grubx64.efi" "${MNT_DIR}${ESP_DIRECTORY}/EFI/systemd/loader.efi"
arch-chroot "${MNT_DIR}" efibootmgr --unicode --disk "$DEVICE" --part 1 --create --label "Arch Linux (PreLoader)" --loader "/EFI/grub/PreLoader.efi"
fi

Expand All @@ -1312,8 +1312,8 @@ function bootloader_refind() {
#arch-chroot "${MNT_DIR}" sed -i 's/^#default_selection "+,bzImage,vmlinuz"/default_selection "+,bzImage,vmlinuz"/' "${ESP_DIRECTORY}/EFI/refind/refind.conf"

if [ "$SECURE_BOOT" == "true" ]; then
cp {PreLoader,HashTool}.efi "${ESP_DIRECTORY}/EFI/refind"
cp "${ESP_DIRECTORY}/EFI/refind/refind_x64.efi" "${MNT_DIR}${ESP_DIRECTORY}/EFI/refind/loader.efi"
mv {PreLoader,HashTool}.efi "${MNT_DIR}${ESP_DIRECTORY}/EFI/refind"
cp "${MNT_DIR}${ESP_DIRECTORY}/EFI/refind/refind_x64.efi" "${MNT_DIR}${ESP_DIRECTORY}/EFI/refind/loader.efi"
arch-chroot "${MNT_DIR}" efibootmgr --unicode --disk "$DEVICE" --part 1 --create --label "Arch Linux (PreLoader)" --loader "/EFI/refind/PreLoader.efi"
fi

Expand Down Expand Up @@ -1355,8 +1355,8 @@ Exec = /usr/bin/systemctl restart systemd-boot-update.service
EOT

if [ "$SECURE_BOOT" == "true" ]; then
cp {PreLoader,HashTool}.efi "${ESP_DIRECTORY}/EFI/systemd"
cp "${ESP_DIRECTORY}/EFI/systemd/systemd-bootx64.efi" "${MNT_DIR}${ESP_DIRECTORY}/EFI/systemd/loader.efi"
mv {PreLoader,HashTool}.efi "${MNT_DIR}${ESP_DIRECTORY}/EFI/systemd"
cp "${MNT_DIR}${ESP_DIRECTORY}/EFI/systemd/systemd-bootx64.efi" "${MNT_DIR}${ESP_DIRECTORY}/EFI/systemd/loader.efi"
arch-chroot "${MNT_DIR}" efibootmgr --unicode --disk "$DEVICE" --part 1 --create --label "Arch Linux (PreLoader)" --loader "/EFI/systemd/PreLoader.efi"
fi

Expand Down

0 comments on commit bc0738b

Please sign in to comment.