mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2026-06-06 19:34:41 +08:00
Compare commits
2 Commits
85db6e7cea
...
47a6467e27
| Author | SHA1 | Date | |
|---|---|---|---|
| 47a6467e27 | |||
| faf75d2a7f |
+12
-5
@@ -391,14 +391,21 @@ 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
|
||||
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
|
||||
# Check for BIOS
|
||||
elif [[ -f /boot/grub2/grub.cfg ]]; 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
|
||||
# Check for UEFI
|
||||
elif [[ -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
|
||||
fi
|
||||
|
||||
if [[ -f /boot/grub2/grub.cfg && -f /boot/efi/EFI/fedora/grub.cfg ]]; then
|
||||
prompt -w "Under EFI, GRUB2 looks for its configuration in /boot/efi/EFI/fedora/grub.cfg,\n however the postinstall script of grub2-common installs a small shim which chains to the standard configuration at /boot/grub2/grub.cfg which is generated above.\n To reset this shim to defaults, delete the existing /boot/efi/EFI/fedora/grub.cfg and then reinstall grub2-common."
|
||||
|
||||
prompt -i "sudo rm -f /boot/efi/EFI/fedora/grub.cfg"
|
||||
prompt -i "sudo dnf reinstall grub2-common"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user