From 3fa5e0f31208d0ed81d4e2c9459d1663f3eaba30 Mon Sep 17 00:00:00 2001 From: OneRandom1509 Date: Tue, 12 Mar 2024 13:10:19 +0530 Subject: [PATCH 1/4] fix: removed UEFI grub config file for fedora --- install.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 8ce5bba..800d3ca 100755 --- a/install.sh +++ b/install.sh @@ -77,12 +77,10 @@ EOF generate() { if [[ "${install_boot}" == 'true' ]]; then - if [[ -d "/boot/efi/EFI/fedora" ]]; then - THEME_DIR='/boot/efi/EFI/fedora/themes' - fi if [[ -d "/boot/grub" ]]; then THEME_DIR='/boot/grub/themes' - elif [[ -d "/boot/grub2" ]]; then + fi + if [[ -d "/boot/grub2" ]]; then THEME_DIR='/boot/grub2/themes' fi fi @@ -357,10 +355,10 @@ updating_grub() { grub2-mkconfig -o /boot/grub2/grub.cfg # Check for Fedora (regular or Atomic) elif has_command dnf || has_command rpm-ostree; then - # check for UEFI + # DON'T TOUCH UEFI if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then - prompt -s "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n" - grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg + prompt -s "Find config file on /etc/grub2.cfg ...\n" + grub2-mkconfig -o /etc/grub2.cfg fi # Check for Bios if [[ -f /boot/grub2/grub.cfg ]]; then From 179e2c21a1b7e0c1140dc20f635d9ccd76321d7d Mon Sep 17 00:00:00 2001 From: OneRandom1509 Date: Tue, 12 Mar 2024 13:16:39 +0530 Subject: [PATCH 2/4] fix: removed UEFI grub fonts file for fedora --- install.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 800d3ca..9598699 100755 --- a/install.sh +++ b/install.sh @@ -160,14 +160,6 @@ install() { #Append GRUB_FONT echo "GRUB_FONT=/boot/grub2/fonts/unicode.pf2" >> /etc/default/grub fi - elif [[ -f "/boot/efi/EFI/fedora/fonts/unicode.pf2" ]]; then - if grep "GRUB_FONT=" /etc/default/grub 2>&1 >/dev/null; then - #Replace GRUB_FONT - sed -i "s|.*GRUB_FONT=.*|GRUB_FONT=/boot/efi/EFI/fedora/fonts/unicode.pf2|" /etc/default/grub - else - #Append GRUB_FONT - echo "GRUB_FONT=/boot/efi/EFI/fedora/fonts/unicode.pf2" >> /etc/default/grub - fi fi fi @@ -354,9 +346,8 @@ updating_grub() { elif has_command zypper || has_command transactional-update; then grub2-mkconfig -o /boot/grub2/grub.cfg # Check for Fedora (regular or Atomic) - elif has_command dnf || has_command rpm-ostree; then - # DON'T TOUCH UEFI - if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then + elif has_command dnf || has_command rpm-ostree; then + if [[ -f /etc/grub2.cfg ]]; then prompt -s "Find config file on /etc/grub2.cfg ...\n" grub2-mkconfig -o /etc/grub2.cfg fi From 0d7ea30481149525b5c59d43e9eb451e62f5f0f9 Mon Sep 17 00:00:00 2001 From: OneRandom1509 Date: Tue, 12 Mar 2024 14:59:50 +0530 Subject: [PATCH 3/4] chore: changed mkconfig directory to boot/grub2/grub.cfg --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 9598699..6d69835 100755 --- a/install.sh +++ b/install.sh @@ -347,9 +347,9 @@ updating_grub() { grub2-mkconfig -o /boot/grub2/grub.cfg # Check for Fedora (regular or Atomic) elif has_command dnf || has_command rpm-ostree; then - if [[ -f /etc/grub2.cfg ]]; then - prompt -s "Find config file on /etc/grub2.cfg ...\n" - grub2-mkconfig -o /etc/grub2.cfg + if [[ -f /boot/grub2/grub.cfg ]]; then + prompt -s "Find config file on /boot/grub2/grub.cfg ...\n" + grub2-mkconfig -o /boot/grub2/grub.cfg fi # Check for Bios if [[ -f /boot/grub2/grub.cfg ]]; then From 8c9aade1fa774e9f1341756eb02dd6ea3d31d7df Mon Sep 17 00:00:00 2001 From: OneRandom1509 Date: Tue, 12 Mar 2024 19:06:49 +0530 Subject: [PATCH 4/4] chore: removed duplicate mkconfig command for fedora --- install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 6d69835..d0a213b 100755 --- a/install.sh +++ b/install.sh @@ -347,11 +347,7 @@ updating_grub() { grub2-mkconfig -o /boot/grub2/grub.cfg # Check for Fedora (regular or Atomic) elif has_command dnf || has_command rpm-ostree; then - if [[ -f /boot/grub2/grub.cfg ]]; then - prompt -s "Find config file on /boot/grub2/grub.cfg ...\n" - grub2-mkconfig -o /boot/grub2/grub.cfg - fi - # Check for Bios + #Check for BIOS if [[ -f /boot/grub2/grub.cfg ]]; then prompt -s "Find config file on /boot/grub2/grub.cfg ...\n" grub2-mkconfig -o /boot/grub2/grub.cfg