You are not logged in.

#1 2013-08-19 11:30:34

geohei
Member
Registered: 2013-01-08
Posts: 22

2 entries for Windows 7 in UEFI Boot Menu

Hi.

I'm presently planning to install archlinux in multiboot with Windows7 12.04 on an SSD (GPT) in UEFI mode.
The motherboard is GA-Z77X-UD5H, latest stable UEFI F14.

I noticed that Windows 7 shows up with 2 entries in Boot Menu.
1. Windows Boot Manager
2. UEFI: Hard Disk
Both entries start Windows 7 properly.

Before I continue with archlinux installation, I'd like to understand why there are 2 entries. Can someone explain ...?

Thanks,

Last edited by geohei (2013-08-19 11:37:04)

Offline

#2 2013-08-19 13:50:01

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: 2 entries for Windows 7 in UEFI Boot Menu

Chances are the first entry is launching the boot loader file EFI/Microsoft/Boot/bootmgfw.efi, whereas the second one is launching the fallback boot loader file EFI/BOOT/bootx64.efi. Ordinarily, the fallback boot loader is used on removable disks or as a fallback in case the NVRAM entries get erased. Therefore, Microsoft installs copies of its boot loader both where it should officially go (in the EFI/Microsoft directory tree) and in the fallback position, to ensure the computer is bootable should a problem occur with the NVRAM.

Offline

#3 2013-08-19 19:49:26

geohei
Member
Registered: 2013-01-08
Posts: 22

Re: 2 entries for Windows 7 in UEFI Boot Menu

Interesting!
I'd like to post parts of "efibootmgr -v".
May I do so without revealing confidential information from my system?

Offline

#4 2013-08-20 11:56:17

geohei
Member
Registered: 2013-01-08
Posts: 22

Re: 2 entries for Windows 7 in UEFI Boot Menu

I assume that all below doesn't reveal any sensitive data about my system. If not, please advise.

References (UEFI boot menu entries):
[1.] Windows Boot Manager
[2.] UEFI: Hard Disk
[3.] wbm

My SSD (gdisk):

...
Command (? for help): p
Disk /dev/sda: 500118192 sectors, 238.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7B0E6510-D248-42E6-BB41-8F1545A740AA
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 500118158
Partitions will be aligned on 2048-sector boundaries
Total free space is 38072941 sectors (18.2 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00  EFI System - Windows
   2          206848          468991   128.0 MiB   0C01  Microsoft reserved part
   3          468992       210184191   100.0 GiB   0700  Basic data partition
   4       210184192       315041791   50.0 GiB    0700  Basic data partition
   5       315041792       315246591   100.0 MiB   EF00  EFI System - Ubuntu
   6       315246592       420104191   50.0 GiB    0700  Microsoft basic data
   7       420104192       462047231   20.0 GiB    8200  Linux swap
...

Now ... answers to your reply ...

Yes, you were right. The [1.] entry indeed launches EFI/Microsoft/Boot/bootmgfw.efi, but [2.] doesn't launch EFI/BOOT/bootx64.efi.

...
Boot0002  Windows Boot Manager	HD(1,800,32000,4462fa04-dc5d-4536-8f23-8c34bc638faf)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.}...a................
...
Boot0007  UEFI: Hard Drive 	ACPI(a0341d0,0)PCI(1f,2)Vendor(cf31fac5-c24e-11d2-85f3-00a0c93ec93b,82)HD(4,db206000,1400000,576819bb-30d0-463b-9fe3-549001951ca4)AMBO
...

I believe that [2.] is generated by UEFI when starting up the computer, since I can delete the entry (efibootmgr -b 7 -B) and it shows up again after next restart of the system. When I delete [1.], the entry doesn't reappear after system restart! To achieve this, I need to create new entry [3.] (wbm) starting EFI/Microsoft/Boot/bootmgfw.efi (efibootmgr -c -d /dev/sda -l "\EFI\Microsoft\Boot\bootmgfw.efi" -L "wbm" -p 1 -g -w). The first start of bootmgfw.efi seems to generate "Windows Boot Manager" entry, but with a slight difference to [3.]. See below.

...
Boot0000  wbm	HD(1,800,32000,4462fa04-dc5d-4536-8f23-8c34bc638faf)File(\EFI\Microsoft\Boot\bootmgfw.efi)
...
Boot0002  Windows Boot Manager	HD(1,800,32000,4462fa04-dc5d-4536-8f23-8c34bc638faf)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.}...a................
...
Boot0007  UEFI: Hard Drive 	ACPI(a0341d0,0)PCI(1f,2)Vendor(cf31fac5-c24e-11d2-85f3-00a0c93ec93b,82)HD(4,db206000,1400000,576819bb-30d0-463b-9fe3-549001951ca4)AMBO
...

I don't see any difference in behaviour between [1.]  and [3.] regarding behaviour. Both start Windows 7 identically (as far as noticed by me).

Also ... I would like to see detailed explanations about the data printed by "efibootmgr -v". This would help a lot. Google didn't help. Right now, it's more a wild guess.

After all this testing, I discovered that [2.] didn't start Windows anymore, like mentioned in the initial article. No clue why. I don't know how I could possibly get rid of this unnecessary entry (UEFI settings ?).

Last edited by geohei (2013-08-20 12:20:13)

Offline

#5 2013-08-20 19:50:37

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: 2 entries for Windows 7 in UEFI Boot Menu

geohei wrote:

I noticed that Windows 7 shows up with 2 entries in Boot Menu.

I'm answering your questions to the best of my ability, but this point comes first: Don't worry about it. You might not even use the boot menu when booting your computer, so what's in there is unimportant, except insofar as it gets you to whatever boot menu you will be using (GRUB's, rEFInd's, or gummiboot's, in all likelihood).

geohei wrote:

I'd like to post parts of "efibootmgr -v".
May I do so without revealing confidential information from my system?

Yes. Neither efibootmgr nor gdisk reveals any particularly sensitive data. (Both do return GUIDs, which are unique to your computer, and could conceivably be used to target a virus against you specifically. Unless you have real cause to think that the CIA, NSA, or whatever is writing the next StuxNet just to get into your computer, though, the GUIDs revealed by these programs aren't likely to be sensitive. If the CIA, NSA, etc. are targeting you, then you shouldn't be posting publicly on this site about your problem at all.)

geohei wrote:

Yes, you were right. The [1.] entry indeed launches EFI/Microsoft/Boot/bootmgfw.efi, but [2.] doesn't launch EFI/BOOT/bootx64.efi.

...
Boot0002  Windows Boot Manager	HD(1,800,32000,4462fa04-dc5d-4536-8f23-8c34bc638faf)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.}...a................
...
Boot0007  UEFI: Hard Drive 	ACPI(a0341d0,0)PCI(1f,2)Vendor(cf31fac5-c24e-11d2-85f3-00a0c93ec93b,82)HD(4,db206000,1400000,576819bb-30d0-463b-9fe3-549001951ca4)AMBO
...

Just because the Boot0007 entry doesn't reference EFI/BOOT/bootx64.efi doesn't mean that it's not launching that program. In fact, I believe that this entry is telling the firmware to boot the fallback boot loader for the disk -- that is, EFI/BOOT/bootx64.efi. You can test this by replacing EFI/BOOT/bootx64.efi with a program that you'd recognize, such as rEFInd. If I'm right, then when you select the option, the program you installed should launch.

I believe that [2.] is generated by UEFI when starting up the computer

Probably; I've seen this behavior before.

When I delete [1.], the entry doesn't reappear after system restart!

This also is normal. EFIs are free to auto-generate whatever entries they want, but they aren't obligated to do so. (This is one of about a million system-to-system variables that make life difficult for those of us who write EFI software. This specific issue is very low on the list of frustrations, though.)

I need to create new entry [3.] (wbm) starting EFI/Microsoft/Boot/bootmgfw.efi (efibootmgr -c -d /dev/sda -l "\EFI\Microsoft\Boot\bootmgfw.efi" -L "wbm" -p 1 -g -w). The first start of bootmgfw.efi seems to generate "Windows Boot Manager" entry, but with a slight difference to [3.]. See below.

...
Boot0000  wbm	HD(1,800,32000,4462fa04-dc5d-4536-8f23-8c34bc638faf)File(\EFI\Microsoft\Boot\bootmgfw.efi)
...
Boot0002  Windows Boot Manager	HD(1,800,32000,4462fa04-dc5d-4536-8f23-8c34bc638faf)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.}...a................
...

I don't see any difference in behaviour between [1.]  and [3.] regarding behaviour. Both start Windows 7 identically (as far as noticed by me).

Your "Windows Boot Manager" entry has parameters that are passed to it -- that is everything from "WINDOWS" (in all-caps) on in the Boot0002 entry. Understanding their meaning would require understanding what the bootmgfw.efi file does with options, which is something I don't happen to know. It appears to be something to do with setting a particular Boot Configuration Data (BCD) value, though -- probably setting a default boot option. That's just a guess, though.

Also ... I would like to see detailed explanations about the data printed by "efibootmgr -v". This would help a lot. Google didn't help. Right now, it's more a wild guess.

I don't know of a definitive source for this information, except for the efibootmgr source code, which I've not studied. Clearly, there's a title ("wbm" or "Windows Boot Manager," for instance). There's also a way to identify a disk or partition, which includes a number of codes, including a GUID for a partition. Also a way to identify a file on that partition, at least for some entries.

After all this testing, I discovered that [2.] didn't start Windows anymore, like mentioned in the initial article. No clue why. I don't know how I could possibly get rid of this unnecessary entry (UEFI settings ?).

As I said, don't worry about it. When you install Linux, you'll probably also install GRUB, rEFInd, or gummiboot, and use it to select your boot OS. You'll use the built-in EFI boot manager only if the boot manager you install fails, or possibly to boot to an external medium. You'll spend far more time trying to remove extra NVRAM entries (possibly to no effect) than you'll waste reading the extra entries on those rare occasions when you need to do so.

Offline

Board footer

Powered by FluxBB