fix: root perms, grub autodetect esp

This commit is contained in:
AngeD 2023-03-14 19:08:22 +01:00
parent 340dbb424f
commit afc80c621e
4 changed files with 3 additions and 4 deletions

View File

@ -58,7 +58,7 @@ if [ -n "$grub_timeout" ]; then
sed -i "/GRUB_TIMEOUT=/s/.*/GRUB_TIMEOUT=$grub_timeout/" /etc/default/grub
fi
grub-install --target=x86_64-efi --efi-directory="$esp" --bootloader-id=GRUB
grub-install --target=x86_64-efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
echo -e "${BOLD}${GREEN}DONE. Ctrl+D, umount -R /mnt and reboot${NORMAL}"

1
config
View File

@ -13,7 +13,6 @@ locales=(
)
lang="${locales[0]}"
esp="$(lsblk -f | grep vfat | grep -o '/boot.*')"
grub_timeout=1
pkg=(

View File

@ -8,7 +8,7 @@ GREEN='\e[32m'
PACMAN='pacman --noconfirm --needed -Syu'
if [ "$EUID" = 0 ]; then
if [ "$EUID" != 0 ]; then
echo 'This script needs root privileges.'
exit 1
fi

2
gpu.sh
View File

@ -7,7 +7,7 @@ GREEN='\e[32m'
PACMAN='pacman --noconfirm --needed -Syu'
if [ "$EUID" = 0 ]; then
if [ "$EUID" != 0 ]; then
echo 'This script needs root privileges.'
exit 1
fi