From 8c5e68beb010003e47a0abf1c8021d5df4afb0d7 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 1 Apr 2023 13:01:04 +0200 Subject: [PATCH] Add scripts for installing grub --- scripts/Software/Arch/GRUB/install.sh | 9 +++++++++ scripts/Software/Common/GRUB/init.sh | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 scripts/Software/Arch/GRUB/install.sh create mode 100644 scripts/Software/Common/GRUB/init.sh diff --git a/scripts/Software/Arch/GRUB/install.sh b/scripts/Software/Arch/GRUB/install.sh new file mode 100644 index 00000000..3fe0c52d --- /dev/null +++ b/scripts/Software/Arch/GRUB/install.sh @@ -0,0 +1,9 @@ +#!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; + +EFI_BOOT_DIR="${EFI_BOOT_DIR:-"/boot"}"; +BOOTLOADER_ID=${BOOTLOADER_ID:-"GRUB"}; +pacman -Syu grub efibootmgr; +. ../../Common/GRUB/init.sh; + +popd > /dev/null; diff --git a/scripts/Software/Common/GRUB/init.sh b/scripts/Software/Common/GRUB/init.sh new file mode 100644 index 00000000..aa30738e --- /dev/null +++ b/scripts/Software/Common/GRUB/init.sh @@ -0,0 +1,5 @@ +#!/bin/bash +EFI_BOOT_DIR="${EFI_BOOT_DIR}"; +BOOTLOADER_ID="${BOOTLOADER_ID}"; +grub-install --target=x86_64-efi --efi-directory="$EFI_BOOT_DIR" --bootloader-id="$BOOTLOADER_ID"; +grub-mkconfig -o "$EFI_BOOT_DIR/grub/grub.cfg";