You are not logged in.

#1 2016-04-01 19:51:21

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

can't delete EFI entry

Hi fellows,
I installed Arch (with Secure Boot enabled) on my machine.
Prior to do it, I wiped whole disk in which was previously installed Winz.
Now I'd like to delete its EFI entry, too, using `efibootmgr`:

$ efibootmgr
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001,0000
Boot0000* Windows Boot Manager	HD(1,GPT,5d353878-c78f-4d9a-803b-66cf82c8ff7b,0x800,0xfa000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...7................
Boot0001* Linux Boot Manager	HD(1,GPT,5d353878-c78f-4d9a-803b-66cf82c8ff7b,0x800,0x100000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0002* PreLoader	HD(1,GPT,5d353878-c78f-4d9a-803b-66cf82c8ff7b,0x800,0x100000)/File(\EFI\systemd\PreLoader.efi)

the command above shows all entries stored in NVRAM

$ sudo efibootmgr -b 0 -B -v
[sudo] password for mattia: 
efibootmgr: Boot entry 0000 not found
efibootmgr: Could not delete boot variable: Invalid argument

the command above should delete the 0 entry (the windows one)

Why the command fail? Or better, why `efibootmgr` can't find entry 0000 while is able to display it?

Thank you


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#2 2016-04-01 19:59:28

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: can't delete EFI entry

For your own security and subsequent sanity efibootmgr requires you to stipulate the entry you wish to work with after every argument.

# efibootmgr -b 0000 -B 0000

Should do the job wink

Offline

#3 2016-04-01 20:15:19

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: can't delete EFI entry

no, unfortunately that doesn't work too

$ sudo efibootmgr -b 0000 -B 0000
[sudo] password for mattia: 
efibootmgr: Boot entry 0000 not found
efibootmgr: Could not delete boot variable: Invalid argument

+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#4 2016-04-01 20:22:10

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: can't delete EFI entry

Shouldn't the command be just "efibootmgr -b 0000 -B"?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#5 2016-04-01 20:29:39

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: can't delete EFI entry

as I've initially written.
different forms but same result

$ sudo efibootmgr -b 0000 -B
[sudo] password for mattia: 
efibootmgr: Boot entry 0000 not found
efibootmgr: Could not delete boot variable: Invalid argument

+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#6 2016-04-01 21:04:52

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: can't delete EFI entry

Ooooh ouch! On most machines i've seen entry 0000 is a the "Bios Setup" so may be impossible to remove... have you previously removed PXE boot, USB boot entries etc as they are noticable by their absence O_o

Offline

#7 2016-04-01 21:26:40

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: can't delete EFI entry

No, I've handled EFI only to enable Secure Boot after Arch installation, following our wiki, which tells you to add an entry.
Unfortunately it's my first with UEFI so I'm totally new to this world...
Maybe does I have to edit some UEFI setting? Maybe my machine (in signature) UEFI is buggy?


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#8 2016-04-01 22:24:34

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: can't delete EFI entry

nTia89 wrote:
Boot0000* Windows Boot Manager	HD(1,GPT,5d353878-c78f-4d9a-803b-66cf82c8ff7b,0x800,0xfa000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...7................

I think that entry is probably protected by the firmware -- if those entries are deleted in the firmware in my machine, they are re-generated at the next boot automatically.

Does /EFI/Microsoft/Boot/botmgfw.efi actually exist on the EFI system partition?

If so, delete it.

If you have /sys/firmware/efi/efivars mounted rw (as standard) then you can delete NVRAM entries manually:

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

I don't think this is a good idea though, it's probably best to just leave the menu entry there.

$ESP/EFI/Microsoft/Boot/bootmgfw.efi can be used as a fallback location for your .efi loader (PreLoader.efi in your case) along with $ESP/EFI/BOOT/BOOTX64.EFI

I prefer this approach as NVRAM entries are not needed at all, more details at the bottom of this page:
https://wiki.archlinux.org/index.php/Secure_Boot


Jin, Jîyan, Azadî

Offline

#9 2016-04-02 12:17:19

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: can't delete EFI entry

no, I haven't recreated windows boot hierarchy in ESP
indeed:

[mattia@arch-xps ~]$ \ls -R /boot/
/boot/:
EFI			      initramfs-linux.img  loader
initramfs-linux-fallback.img  intel-ucode.img	   vmlinuz-linux

/boot/EFI:
Boot  systemd

/boot/EFI/Boot:
BOOTX64.EFI

/boot/EFI/systemd:
HashTool.efi  loader.efi  PreLoader.efi  systemd-bootx64.efi

/boot/loader:
entries  loader.conf

/boot/loader/entries:
arch.conf  arch-fallback.conf

anyway, you have pointed out that could be a firmware issue, so I have entered in UEFI interface;
I've noticed that there is a panel from I can edit boot entries
photo
and I've deleted the Winz entry. Fortunately all gone fine!

and now:

$ efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001
Boot0001* Linux Boot Manager	HD(1,GPT,5d353878-c78f-4d9a-803b-66cf82c8ff7b,0x800,0x100000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0002* PreLoader	HD(1,GPT,5d353878-c78f-4d9a-803b-66cf82c8ff7b,0x800,0x100000)/File(\EFI\systemd\PreLoader.efi)

[SOLVED]

Now, remain to understand why `efibootmgr` was unable to delete it.


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#10 2016-04-02 12:31:29

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: can't delete EFI entry

nTia89 wrote:

why `efibootmgr` was unable to delete it.

I don't think it was available for modification via /sys/firmware/efi/efivars

If you re-enable the entry, does it then show up as /sys/firmware/efi/efivars/Boot0000*?

I think those tickboxes in your firmware menu are for the default loader entries and these are generated on-the-fly by the firmware rather than existing as conventional static NVRAM entries.


Jin, Jîyan, Azadî

Offline

#11 2016-04-02 12:48:22

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: can't delete EFI entry

I can't re-enable that entry because doesn't exist anymore
Neither across reboots it is automatically created!

second photo

EDIT: image added

Last edited by nTia89 (2016-04-02 14:37:36)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#12 2016-04-03 11:00:37

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: can't delete EFI entry

What a peculiar firmware implementation you have smile

If you "fake" the Windows bootmanager using the systemd-boot .efi loader, does the entry get re-created automatically?

# mkdir -p /boot/EFI/Microsoft/Boot
# cp /boot/EFI/systemd/systemd-bootx64.efi /boot/EFI/Micorsoft/Boot/bootmgfw.efi

Jin, Jîyan, Azadî

Offline

#13 2016-04-03 12:27:49

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: can't delete EFI entry

Head_on_a_Stick wrote:

What a peculiar firmware implementation you have smile

If you "fake" the Windows bootmanager using the systemd-boot .efi loader, does the entry get re-created automatically?

# mkdir -p /boot/EFI/Microsoft/Boot
# cp /boot/EFI/systemd/systemd-bootx64.efi /boot/EFI/Micorsoft/Boot/bootmgfw.efi

No, nothing happens!
(except a new entry in the systemd-boot menu...)

PS: for academic purpose, I've tried to delete a non-Win EFI entry (the PreLoader one) and...
yes, that can be deleted!

...and the mystery goes on...


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#14 2016-04-03 15:42:26

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: can't delete EFI entry

Maybe, the first entry is detained to prevent to brick the motherboard. Definitely it won't boot without any software in ESP, but at the least one is searched.
That depends how old is the computer.

Last edited by TheSaint (2016-04-03 15:44:12)


do it good first, it will be faster than do it twice the saint wink

Offline

#15 2016-04-03 16:21:08

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: can't delete EFI entry

TheSaint wrote:

Maybe, the first entry is detained to prevent to brick the motherboard. Definitely it won't boot without any software in ESP, but at the least one is searched.
That depends how old is the computer.

the laptop we are talking about, is the ultrabook in my signature, which is now 1 year old


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

Board footer

Powered by FluxBB