From dcb6bf45b587a7595a695e6aa8ec35c3a1af19c5 Mon Sep 17 00:00:00 2001 From: Raman Gupta Date: Thu, 14 Apr 2022 13:19:42 -0400 Subject: [PATCH] EFI boot enhancements --- .../_partials/proc_installing-grub2-on-efi-system.adoc | 6 +++--- .../proc_restoring-bootloader-using-live-disk.adoc | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/_partials/proc_installing-grub2-on-efi-system.adoc b/modules/ROOT/pages/_partials/proc_installing-grub2-on-efi-system.adoc index 29f71cb..ac0afb6 100644 --- a/modules/ROOT/pages/_partials/proc_installing-grub2-on-efi-system.adoc +++ b/modules/ROOT/pages/_partials/proc_installing-grub2-on-efi-system.adoc @@ -78,13 +78,13 @@ If you already have a working *GRUB2* EFI configuration file, you do not need to Otherwise, create the configuration file using the `grub2-mkconfig` command. ---- -# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg +# grub2-mkconfig -o /boot/grub2/grub.cfg ---- .More information -* Under EFI, *GRUB2* looks for its configuration in `/boot/efi/EFI/fedora/grub.cfg`. -* For newly installed kernels to work, `grubby` expects `/etc/grub2-efi.cfg` to be a symlink to the real grub.cfg (for example `/boot/efi/EFI/fedora/grub.cfg`). +* Under EFI, *GRUB2* looks for its configuration in `/boot/efi/EFI/fedora/grub.cfg`, 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. To reset this shim to defaults, delete the existing `/boot/efi/EFI/fedora/grub.cfg` and then `dnf reinstall grub2-common`. +* For newly installed kernels to work, `grubby` expects `/etc/grub2-efi.cfg` to be a symlink to the real `grub.cfg` (for example `/boot/grub2/grub.cfg`). [[solving-problems-with-uefi-bootloader]] diff --git a/modules/ROOT/pages/_partials/proc_restoring-bootloader-using-live-disk.adoc b/modules/ROOT/pages/_partials/proc_restoring-bootloader-using-live-disk.adoc index 65cee20..9ef61be 100644 --- a/modules/ROOT/pages/_partials/proc_restoring-bootloader-using-live-disk.adoc +++ b/modules/ROOT/pages/_partials/proc_restoring-bootloader-using-live-disk.adoc @@ -47,7 +47,7 @@ mount /dev/mapper/fedora-root /mnt/root ---- . Mount the boot partition in the `boot` directory of the filesystem that you have mounted in the previous step. - ++ ---- mount /dev/sda1 /mnt/root/boot/ ---- @@ -61,9 +61,15 @@ mount -o bind /sys /mnt/root/sys mount -o bind /run /mnt/root/run ---- +. If you use EFI boot, you may also want to bind the efivars and the EFI system partition: ++ +---- +mount -o bind /sys/firmware/efi/efivars /mnt/root/sys/firmware/efi/efivars +mount /mnt/root/boot/efi +---- + . Change your filesystem into the one mounted under `/mnt/root`. + - ---- chroot /mnt/root ----