On Wed, Sep 20, 2023 at 09:02:42AM +0100, Barry wrote:
On 20 Sep 2023, at 01:41, Bill Cunningham <bill.cu1234@xxxxxxxxx> wrote:
I had to reinstall my windows system which is fine it takes care of itself. But, I have to install my entire fedora system from scratch. Is there a way to simply reinstall the boot loader code without having to install from scratch with a UEFI system? I'm sure there is but I don't know about it. There's also a command called "efibootmgr" is this what I am looking for? AFAIK fedora doesn't install more partitions but just code in the /boot/efi partition. How can I reinstall or repair boot loader code without touching the system? Without having to reinstalling from scratch?
In my notes I saved this command for fixing fedora booting on one of my systems.
(I had a system that would fill its EFI variable space and need a full reset)
efibootmgr --create --disk /dev/md126 --part 2 --loader /EFI/fedora/shim.efi --label Fedora
In this case /dev/md126 is my raided fedora disk, replace with your disk.
/dev/md126p2 - VFAT - EFI
Partition 2 is what is mounted on /boot/EFI, change the 2 as needed.
From my notes :) .. :
-----
add a boot entry:
efibootmgr -c -d /dev/sdb -p 1 -w -L Debian -l "\EFI\debian\grubx64.efi"
-----
If I recall correctly:
This command above was done a machine where /dev/sdb was a disk where
Debian was already installed. The 'man' page should explain the rest
of the options.
see:
https://wiki.debian.org/UEFI#efibootmgr_example_3_-_add_a_new_boot_entry
At the end of "man efibootmgr" you should find an example for a Fedora
install - it says "The default OS Loader is \EFI\fedora\grub.efi"
But that looks wrong to me. My guess would be that this should say for
a nowadays Fedora install probably:
"\EFI\fedora\shim.efi"
The latter at least was what I saw with a quick Internet search and
the output from entering "efibootmgr" on my own Fedora install here. Excerpt:
[ ....]
Boot0002* Fedora HD(1,GPT,[..])/File(\EFI\fedora\shim.efi)
[ .... ]
See the "\EFI\fedora\shim.efi" section above..
I'd simply take some Live system on a thumb, boot it, and then have a
look at the output of
# efibootmgr
and proceed with that info ...
Good luck!
Wolfgang
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue