You are not logged in.

#1 2016-01-02 18:55:28

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

[SOLVED] How to restore UEFI entries with efibootmgr

So .... I did something wrong playing with efibootmgr and removed the below entries:

Boot0006* Network	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6567de8ee595634d842b325e6a43510b)
Boot0007* Network Boot	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,1b7f7356e3475744a9a6ed8e91832083)

Can someone help me, on how to restore them ?
Thanks in advance

Last edited by ebal (2016-01-20 07:06:12)


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#2 2016-01-03 13:28:23

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] How to restore UEFI entries with efibootmgr

I don't know of any way of restoring those default entries, the only thing I can suggest is to remove the motherboard's CMOS battery and leave it for 10 minutes or so.

Hopefully, this will reset the NVRAM entries to the factory default settings.

Of course this is somewhat of a leap of faith so undertake this at your own risk.

EDIT: Also, any needed NVRAM entries would have to be re-created afterwards by, for example, re-installing the boot{loader,manager}

Last edited by Head_on_a_Stick (2016-01-03 13:29:10)

Offline

#3 2016-01-03 14:04:20

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] How to restore UEFI entries with efibootmgr

You sure they do not come back automagically once you reboot? Coz that would be the case if it's generated by the UEFI. For example, mine always generate:

Boot0006* Network Card

if I have PXE Option ROM and CSM enabled, or

Boot0007* UEFI: IPV4 Realtek PCIe GBE Family Controller
Boot0008* UEFI: IPV6 Realtek PCIe GBE Family Controller

if I have UEFI Network Stack enabled and CSM disabled. They both come back after I deleted them with efibootmgr with a reboot.

But if it's some entry created by yourself then I guess you can only re-create but not restore.

P.S. I often do this to reset my UEFI settings / NVRAM:

# rm /sys/firmware/efi/efivars/*

Last edited by tom.ty89 (2016-01-03 14:06:10)

Offline

#4 2016-01-04 07:12:31

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] How to restore UEFI entries with efibootmgr

thanks for your help,

@Head_on_a_Stick I cant remove any battery, cause my dell xps (L322X) doesnt have a removable battery !!!

Although, I dont think that NVRAM entries would be cleared up even if I could remove the battery.
Unfortunately I cant test this theory with this ultrabook.

@tom.ty89 I am pretty sure about that.
On other boards, I see that via UEFI bios settings I can add/remove efi entries but with this laptop, doesnt seems to work like that.


But gimme a sec to explain the problem:

Somehow this UEFI bios is searching for a windows UEFI entry at boot time.
Even if there is one !!

so at every boot is searching for windows and add a new UEFI entry at the first free slot.
My Linux entry is on 000A slot and after removing Boot0006,Boot0007 windows took the slot 0006.

This "feature" of dell has the outcome to boot only on windows and not showing the linux entry.
So I've removed every windows UEFI entry.

Reboot

and then boot only at windows, again !!!!!


After gazillion hours of searching and testing and reading .... I've removed (again) the window entry and the linux entry.

I added the Linux entry at the first free slot 0006 and then reboot my laptop.
Windows took the 0007 slot and now I can boot on my archlinux without problem !!!!


But my initial question still exists:

Is there a way to restore the deleted network entries ?


Thanks again


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#5 2016-01-04 07:43:53

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] How to restore UEFI entries with efibootmgr

No idea. Thing is do you need or have you ever used network boot at all tongue
Maybe you can see if the UEFI has option(s) about network boot, if so, try disable -> save and reboot -> enable -> save and reboot on it and see.

Offline

#6 2016-01-20 05:46:31

MarSoft
Member
Registered: 2013-02-03
Posts: 9

Re: [SOLVED] How to restore UEFI entries with efibootmgr

These variables in /sys/firmware/efi/efivars are in binary format, and efibootmgr just decodes them. For what I know, it doesn't allow you to create new variables of type VenMsg or FvFile. But you can probably create them by the hand in hex editor. The only problem is to find documentation on binary format.
Also you can try EFI Shell (uefi-shell-git) which has bcfg command for manipulating boot records.
Personally I have a problem with Lenovo G580 - efibootmgr (or kernel) fails to read existing records, and as a result it overwritten Bios Setup record. So for now it only boots Arch Linux, but no bios setup or boot menu.

UPD: probably

efivar

command will help; working with it now.

Last edited by MarSoft (2016-01-20 05:55:12)

Offline

#7 2016-01-20 07:05:31

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] How to restore UEFI entries with efibootmgr

Thank you all, for your help.

Last night I did a bios upgrade via DELL's executable and it restored (or recreated) all the deleted entries on my UEFI.
Unfortunately the process removed (or overwrite) my ArchLinux UEFI entry and my laptop tried to boot up from the network !!

Thankfully, with all the UEFI education I had the previous month troubleshooting this issue,  I knew what I had to do.
So I added the ArchLinux UEFI entry again and via archiso live usb fixed the boot order of the UEFI entries.

So case closed !


a few lessons learned with all that:

* is that vendors dont respect the UEFI specification (my laptop is booting windows even if there is no any windows uefi entry !!!)
* Just Flash your BIOS and restart from the begging
* Using archiso's

EFI/boot/bootx64.efi
EFI/boot/loader.efi
&
loader/ directory

you can boot your own archlinux via UEFI without installing grub, syslinux or anything on the matter from your operating system.
works perfectly and totally recommended it.


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#8 2016-01-20 08:06:44

MarSoft
Member
Registered: 2013-02-03
Posts: 9

Re: [SOLVED] How to restore UEFI entries with efibootmgr

Just for record (don't know where to place that):
I found a way to make system "find" efi variables even if it doesn't display them at all (efibootmgr says "No BootOrder is set; firmware will attempt recovery"): if you just touch these records via "touch /sys/firmware/efi/efivars/Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c" and so on for different numbers and for BootOrder var, system will manage to load their values. Looks like it is a bug with querying list of variables on Lenovo G580 (at leas on bios version 62cn32ww). At the same time, UEFI Shell displays these variables correctly.

Offline

Board footer

Powered by FluxBB