Ask Your Question
1

Cannot add entry with efibootmgr

asked 2016-07-20 11:30:13 -0500

mikechav gravatar image

Hi guys, I have Fedora, Windows 7, and Arch (all 64 bit) installed on my machine. I made the mistake of adding an entry just for Arch during installation, and it overwrote the entry for Fedora (loaded grub2).

[root@laptop:michael] $ efibootmgr -v 
BootCurrent: 0000 Timeout: 0 seconds BootOrder: 0000,0001,0002 
Boot0000* Notebook Upgrade Bay  BBS(CDROM,�,0x0)....................................................................... 
Boot0001* Notebook Hard Drive   BBS(HD,�,0x0)....................................................................... 
Boot0002* Notebook Ethernet BBS(128,�,0x0)........................>..............................................

I had a lot of duplicate entries (up to Boot0008) so I removed them. Now I'm trying to add an entry for /EFI/fedora/grubx64.efi (loads grub with entries for all OSs)

Here's the issue:

[root@laptop:michael] $ efibootmgr -c -w -d /dev/sda -p 1 -l 'EFI\fedora\grubx64.efi' -L 'Grub'
efibootmgr: Could not set variable Boot0003: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory

Running the same command on Arch mentioned the device being out of memory, which is clearly not the case:

[root@laptop:michael] $ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G  209M  1.7G  11% /dev/shm
tmpfs           1.9G  1.5M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda4        69G   11G   56G  16% /
tmpfs           1.9G  120K  1.9G   1% /tmp
/dev/sda1        96M   74M   23M  78% /boot/efi
tmpfs           386M   20K  386M   1% /run/user/42
tmpfs           386M   16K  386M   1% /run/user/1000
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2016-07-26 13:25:06 -0500

cmurf gravatar image

Try using \EFI\fedora\shim.efi instead. I think yours would work if it had a leading \ after the ' but I know \ works because I've used it. The proper bootloader is actually shim.efi.

Also check firmware updates, the problem with multiple entries sounds like a firmware bug related to garbage collection.

Also note that EFI/BOOT should have a BOOTX64.EFI in it, and if that happens to be populated by Fedora's installer (? it normally is with a Fedora only installation but I don't know know who tries to own this fallback bootloader position on multiboot installs) with shim.efi renamed as BOOTX64.EFI (you can hash them to find out) it will call fallback.efi in that same directory and add a proper entry to NVRAM.

edit flag offensive delete link more

Comments

thanks, I did indeed change to shim, which was the correct way to go But for the memory error, I just went ahead and removed everything, and redid the EFI partition. My device is so old, the last update on it was 2011, so no way to get help there!

mikechav gravatar imagemikechav ( 2016-07-30 12:17:36 -0500 )edit
0

answered 2016-07-30 12:19:14 -0500

mikechav gravatar image

To those interested, I went ahead and did the stupid thing (wipe the EFI partition and start fresh), took me a while given a lot of the steps were new to me, but all's good in the world again.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-07-20 11:30:13 -0500

Seen: 2,161 times

Last updated: Jul 30 '16