Jump to content











Photo
- - - - -

UEFI Boot to USB entry


  • Please log in to reply
18 replies to this topic

#1 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 12 April 2019 - 05:30 AM

So, my advanced startup shows "Use Devices" option which shows me 2 further options to boot from EFI USB, EFI DVD and EFI Network. I am using Windows 10 1809, october build or pre January 2019 build. These options are available to me with/without the usb plugged in. In bootice, in the uefi entries section, I can further see these options.
 
Although, I can't see them in the boot menu unless I plug in the usb. At which point it shows and boots to usb. That's the conventional method to booting to usb.
 
But with with that "Use Devices" option in advanced startup, I can directly boot to usb from within windows. I can also do so via bootice, and selecting the tick mark to "Boot this entry next time" option at which it directly boots to my usb. 
 
I have two questions, I can see it in my laptop, but was trying to reproduce in other laptop too unsuccessfully. I didn't had to do anything in this one, and idk how they are enabled already. I want to know how can I manually add such entry through bootice/easybcd if possible. The second question is, can I change uefi entries from cmd, or more or less, at least be able to tick that box "Boot this entry next time" through cmd and save it up?

 

https://ibb.co/Y3p9DnM

 

(Sorry, it told me that I couldn't post image with that extension in this forum.)


Edited by Raex, 12 April 2019 - 05:31 AM.


#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 12 April 2019 - 08:18 AM

UEFI BIOSes hold a 'boot device' list in NVRAM. The BIOS settings options can display and change this list and it can also be accessed programatically (e.g. via Advanced Settings in Windows or BootIce).

This list will therefore vary from BIOS to BIOS.

When using the BIOS Boot Selection menu pop-up, it will often not list a device (model dependent) if it does not consider them to be valid (e.g. cannot read the filesystem of that device or it does not contain a boot file of the expected name\path). For instance, the default boot file for a UEFI64 BIOS is at \EFI\BOOT\BOOTX64.EFI and all UEFI BIOSes can read FAT filesystems. If the file does not exist, some BIOSes wont list that device\partition as a boot option (and others will!).

 

This feature has nothing to do with the BCD file, although confusingly, bcdedit can program the BIOS NVRAM as well as change the BCD file.

https://serverfault....er-from-windows

 

In BCD there are only two mapped NVRAM variables for {fwbootmgr} - "display order"(boot order) and "timeout". But you can set bootnext variable (which has no mapping in BCD).

 

 

In bcdedit the /bootsequence switch will set the next boot device.

 



#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 April 2019 - 08:37 AM

Can you post screenshots of that tool (bootice) when (n the left pane) you have selected the other entries? (namely the EFI USB DEVICE).

 

On the other thread:

http://reboot.pro/to...-startup-items/

you asked for a command line, but can BootIce (GUI) actually do what you want?

 

The use of BCDEDIT for these NVRAM editis is limited, it is explained/summed up here:

https://blog.mussard...r-from-windows/

 

 

:duff:

Wonko



#4 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 12 April 2019 - 02:48 PM

UEFI BIOSes hold a 'boot device' list in NVRAM. The BIOS settings options can display and change this list and it can also be accessed programatically (e.g. via Advanced Settings in Windows or BootIce).

This list will therefore vary from BIOS to BIOS.

When using the BIOS Boot Selection menu pop-up, it will often not list a device (model dependent) if it does not consider them to be valid (e.g. cannot read the filesystem of that device or it does not contain a boot file of the expected name\path). For instance, the default boot file for a UEFI64 BIOS is at \EFI\BOOT\BOOTX64.EFI and all UEFI BIOSes can read FAT filesystems. If the file does not exist, some BIOSes wont list that device\partition as a boot option (and others will!).

 

This feature has nothing to do with the BCD file, although confusingly, bcdedit can program the BIOS NVRAM as well as change the BCD file.

https://serverfault....er-from-windows

 

 

In bcdedit the /bootsequence switch will set the next boot device.

 

I think I can agree on it varying from BIOS to BIOS, but the fact is that I have these options even when I don't have any other devices plugged in. Notice that there's no path to efi or anything in the screenshot with EFI USB and even without that it just boots fine for me to my usb.

 

Can you post screenshots of that tool (bootice) when (n the left pane) you have selected the other entries? (namely the EFI USB DEVICE).

 

On the other thread:

http://reboot.pro/to...-startup-items/

you asked for a command line, but can BootIce (GUI) actually do what you want?

 

The use of BCDEDIT for these NVRAM editis is limited, it is explained/summed up here:

https://blog.mussard...r-from-windows/

 

 

:duff:

Wonko

 

https://ibb.co/Y3p9DnM  Here's a screenshot for ya, unfortunately I have two entries like that, and they are both the same. I wonder if I should remove one or not or if there's a way to backup before doing so.

 

Anyways, yeah bootice gui can do that, as long as the entries are there when I tick the checkbox to boot that particular device next time in it I can do so. Moreover, it's not just bootice. 

 

In easybcd I can see 5 entries when I have turned on expert mode in it via the options. https://ibb.co/yXnd9Fs

Three of them are the EFI usb, EFI CD/DVD and EFI Networkl as you can see in the screenshot. 

 

But regardless the bios, isn't this feature of windows. The "Use Device" in advanced startup is something you should get always. It has been there since windows 8/8.1 now, so shouldn't that be bios independent. 


Edited by Raex, 12 April 2019 - 02:49 PM.


#5 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 12 April 2019 - 03:28 PM

The NVRAM will keep the 'devices/paths' in its list even if the device is not present. Otherwise, if you removed the device and then plugged it in again, it would no longer be in the list and you couldnt boot from it.

BUT - if you pressed F8 or F12 or whatever you BIOS Boot Selection hot key is, the BIOS would check the NVRAM list and may (or may not) list only the devices that are actually present and\or that actually have valid boot files on them.

What is in the NVRAM list will depend on the initial BIOS settings plus what else it has been programmed with (e.g. by other OS's, bcdedit, etc.) since the BIOS NVRAM boot list was last cleared.


Edited by steve6375, 12 April 2019 - 03:28 PM.


#6 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 12 April 2019 - 03:37 PM

The NVRAM will keep the 'devices/paths' in its list even if the device is not present. Otherwise, if you removed the device and then plugged it in again, it would no longer be in the list and you couldnt boot from it.

BUT - if you pressed F8 or F12 or whatever you BIOS Boot Selection hot key is, the BIOS would check the NVRAM list and may (or may not) list only the devices that are actually present and\or that actually have valid boot files on them.

What is in the NVRAM list will depend on the initial BIOS settings plus what else it has been programmed with (e.g. by other OS's, bcdedit, etc.) since the BIOS NVRAM boot list was last cleared.

 

So, even though when I plug my usb and can boot to it via changing the boot device after pressing f12, this entry won't appear when I have the usb unplugged? In my other laptop, I can see an entry for my usb when it's plugged in bootice, but I can't tick the boot this device next time since that entry doesn't contain any media file entry in it, i.e it doesn't contain the file path for the containing efi file. As such I can't save it but I can see my usb in bootice at that moment. 

 

EDIT: While fooling around with the bcd file, I somehow can see these entries in bcdedit. Even bootice now shows them in the bcd when I try to edit it.  https://ibb.co/g3f62Qy


Edited by Raex, 12 April 2019 - 03:45 PM.


#7 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 12 April 2019 - 03:44 PM

The F12 list includes valid boot devices/files on all connected devices - so you can boot to any new device that has a default boot file. The list shown in bootice, etc, is read from the NVRAM boot list.
The 2nd link Wonko sent you shows you how to add a specific usb dev/file into NVRAM
.

#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 April 2019 - 09:20 PM

EDIT: While fooling around with the bcd file, I somehow can see these entries in bcdedit. 

Which version of BCDEDIT are you using?

That custom:250000c2 should be "pre-Windows8" only:

https://www.boyans.n...MenuPolicy.html

 

And it should be in the actual BCD (and not in NVRAM) :unsure:

 

It is confusing as seemingly both BootIce and BCDEDIT do not fully/easily say what exactly they are displaying or better from where (actual BCD or NVRAM) they extract the info they show.

 

Try checking the BCD with the Visual BCD Editor here:

https://www.boyans.net/

if I recall correctly, it should ONLY see the BCD and not the NVRAM, so you can better understand which is which.

 

:duff:

Wonko



#9 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 12 April 2019 - 09:26 PM

FWBOOTMGR = Firmware boot manager = NVRAM

 

So 'Firmware Application' will be the NVRAM entries

 

Presumably if you ran

bcdedit /set {fwbootmgr} BOOTSEQUENCE {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

where xxxxxis the EFI USB Device UUID, it would reboot to a valid USB drive if one is connected?



#10 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 12 April 2019 - 10:00 PM

FWBOOTMGR = Firmware boot manager = NVRAM

So 'Firmware Application' will be the NVRAM entries

Presumably if you ran

bcdedit /set {fwbootmgr} BOOTSEQUENCE {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
where xxxxxis the EFI USB Device UUID, it would reboot to a valid USB drive if one is connected?

 


That's the same conclusion I got from Wonko's second link he posted. Although I'm gonna use the DISPLAYORDER one, since that is what I can see in my bcdedit through cmd.

Which version of BCDEDIT are you using?
That custom:250000c2 should be "pre-Windows8" only:
https://www.boyans.n...MenuPolicy.html

And it should be in the actual BCD (and not in NVRAM) :unsure:

It is confusing as seemingly both BootIce and BCDEDIT do not fully/easily say what exactly they are displaying or better from where (actual BCD or NVRAM) they extract the info they show.

Try checking the BCD with the Visual BCD Editor here:
https://www.boyans.net/
if I recall correctly, it should ONLY see the BCD and not the NVRAM, so you can better understand which is which.

:duff:
Wonko

Hey there Wonko, I downloaded it and got the same results.

https://ibb.co/82RbFWx
https://ibb.co/J2KYzTG

Here are two screenshots, one from VisualBCD and one from bcdedit from cmd. I don't know which bcdedit I have, but whatever it is it's from windows only.
In the VisualBCD you can see that those entries are definitely in the bcd only, and maybe in the nvram too. I have those options in Windows Boot Manager and Firmware Boot Manager both as you can see in the screenshot from cmd.

Notice how the identifier id's are similar, that's what I thought but they are different in the beginning. It differs by this only at the beginning, "3c32afac_xxxx" where at the end of first 8 characters, it goes on with "3c32afad_xxxx" and then "3c32afae_xxxx" respectively for EFI USB, EFI CD/DVD and EFI Network.

I was going to try that on the other laptop, but I'm worried about messing the ID's and thus need more research into it.

 

EDIT: Lol, I tried to add an entry but instead of the firmware bootmgr I tried to do so to the windows boot manager, and my bcd reset entirely. Had to make another one, fortunately laptop booted. -deep sigh- 


Edited by Raex, 12 April 2019 - 10:43 PM.


#11 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 13 April 2019 - 04:38 PM

https://ibb.co/vXhhPjN

I can't add entries for USB or CD/DVD from here.
I think the reason I can't see them is due to this only.

https://www.dell.com...0-8-1-8?lang=en
In this article it shows how to enable boot from dvd with uefi option. But for me I can't see any entry for the other devices but only for the HDD when I tried to add another entry.

Can anyone help me in adding the other entries, I guess that's the key to get the "Use Device" option in windows advanced startup.


Edited by Raex, 13 April 2019 - 04:48 PM.


#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 April 2019 - 05:34 PM

AFAICU, the contents of NVRAM and the BCD are "synchronized" on UEFI, so most probably what you are seeing is the "mirror" of the NVRAM, see last reply here:
https://superuser.co...ore-via-regedit
 
Those "strange" numbers are actually GUID's, they (the ones in  https://ibb.co/g3f62Qy) resolve to:
C:\appoggio\UUID>uuid.exe -d 3C32AFB0-1EB6-11E9-BADA-9EAC7DEF81A2
encode: STR: 3c32afb0-1eb6-11e9-bada-9eac7def81a2
SIV: 80016857965363594694098596695488037282
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 1 (time and node based)
content: time: 2019-01-23 02:26:05.434667.2 UTC
clock: 15066 (usually random)
node: 9e:ac:7d:ef:81:a2 (local unicast)


C:\appoggio\UUID>uuid.exe -d 3C32AFAC-1EB6-11E9-BADA-9EAC7DEF81A2
encode: STR: 3c32afac-1eb6-11e9-bada-9eac7def81a2
SIV: 80016857648450944637041246321312235938
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 1 (time and node based)
content: time: 2019-01-23 02:26:05.434666.8 UTC
clock: 15066 (usually random)
node: 9e:ac:7d:ef:81:a2 (local unicast)


C:\appoggio\UUID>uuid.exe -d 3C32AFAD-1EB6-11E9-BADA-9EAC7DEF81A2
encode: STR: 3c32afad-1eb6-11e9-bada-9eac7def81a2
SIV: 80016857727679107151305583914856186274
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 1 (time and node based)
content: time: 2019-01-23 02:26:05.434666.9 UTC
clock: 15066 (usually random)
node: 9e:ac:7d:ef:81:a2 (local unicast)


C:\appoggio\UUID>uuid.exe -d 3C32AFAE-1EB6-11E9-BADA-9EAC7DEF81A2
encode: STR: 3c32afae-1eb6-11e9-bada-9eac7def81a2
SIV: 80016857806907269665569921508400136610
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 1 (time and node based)
content: time: 2019-01-23 02:26:05.434667.0 UTC
clock: 15066 (usually random)
node: 9e:ac:7d:ef:81:a2 (local unicast)
Hint1: check the MAC address of the NIC on the laptop you got these GUIDs
Hint2: what happened on 2019-01-23 around 02:26:05 UTC? :unsure: (possibly a reset of the NVRAM? :dubbio: )
 
All in all I would say that - like almost anything revolving around stupid UEFI, everything is ether undocumented or badly implemented or both and that each stupid firmware engineer stupidly read the stupid (2200 pages long) specifications his/her own stupid way and thus each stupid firmware behaves stupidly different from every other stupid one.  :(
 
:duff:
Wonko
  • Raex likes this

#13 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 13 April 2019 - 06:35 PM

I didn't know those Guids could reveal such data lmao. Yes I installed windows on that day on this system. In my previous post I showed an image from Dell bios which only has hdd (windows boot manager) in uefi options. Can't add another entry I think that might be what could enable me to have that option.

#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 April 2019 - 06:24 PM

I didn't know those Guids could reveal such data lmao. Yes I installed windows on that day on this system. 

Yep :), it is not like *everyone* knows these tricks, but they can come handy ;) .

 

What I find "curious" (but maybe it is perfectly "normal", cannot say) is that seemingly - according to the timestamps of the GUID's - the order in which those entries were created was:

1) EFI USB Device

2) EFI DVD/CDROM

3) EFI Network

4) Actual installed windows

 

Since I doubt that the first three are part of the Windows install/setup, it is more likely that they were pre-existing in NVRAM (as if they are created by the UEFI, independently from any Windows insatall and before it) and the Windows install simply enumerated them before adding/creating its own entry. :unsure:

 

:duff:

Wonko


  • Raex likes this

#15 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 14 April 2019 - 06:58 PM

Yep :), it is not like *everyone* knows these tricks, but they can come handy ;) .

What I find "curious" (but maybe it is perfectly "normal", cannot say) is that seemingly - according to the timestamps of the GUID's - the order in which those entries were created was:
1) EFI USB Device
2) EFI DVD/CDROM
3) EFI Network
4) Actual installed windows

Since I doubt that the first three are part of the Windows install/setup, it is more likely that they were pre-existing in NVRAM (as if they are created by the UEFI, independently from any Windows insatall and before it) and the Windows install simply enumerated them before adding/creating its own entry. :unsure:

:duff:
Wonko


I have acer v5 122p netbook and for me I haven't had such troubles before. These entries are the result that it automatically has entries to boot to uefi enabled devices unlike Dell's laptops for which uefi booting is only allowed to windows boot manager, originally when the windows is installed on it. The bios automatically picks up uefi enabled devices when one is plugged into it but it never shows you an entry for it otherwise.

I came upon some articles and I think I might have found how to add them, although I knew about that technique before but I thought maybe the bios would have default settings for uefi devices, but unfortunately it didn't. The trick to adding it to the firmware boot manager is to have a uefi enabled device plugged into the laptop (a USB or a CD/DVD) and then add that entry to the firmware boot manager whereby it'll permanently add an entry to boot to a uefi enabled device whether it is the same usb or a different one. Still have to try it on, but I'm pretty sure this method would work.

Edit: I should say that in legacy mode, dell gives option to boot to devices by default unlike in uefi mode. So it's dell's own problem which they have created by themselves. And by default, if bios allows it windows will have these entries in advanced startup whereby they might get copied into the bcd too. Also, yes bootice allows you to boot to a usb I've done so many times on my laptop.


Edited by Raex, 14 April 2019 - 07:06 PM.


#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 April 2019 - 08:49 AM

Well, you just said the "magic word" (DELL).
For some reasons historically the good Dell's engineers have made changes to *anything*, to the point that our friend cdob coined the phrase:
"Help, its a Dell!"
http://reboot.pro/to...e-2#entry140022

In the good ol'times of BartPE there were "special mods" exclusively for Dell's machines and a lot of other project need *something special* when it comes to Dell[1].

:duff:
Wonko

[1] only for the record, right after Dell in the "most fiddling with BIOS OEM" list, there is HP that has historically another quirk for changing and or crippling BIOSes of otherwise perfectly working boards...
  • Raex likes this

#17 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 15 April 2019 - 09:05 PM

Edit: I should say that in legacy mode, dell gives option to boot to devices by default unlike in uefi mode. So it's dell's own problem which they have created by themselves.

Yes, NVRAM settings and behaviour is manufacturer specific.
Depending on the targeted end user, there are different security concerns.

Traditionally the BIOS boot settings can't be changed from the operating system.
New: UEFI boot settings can be changed from the operating system.

Dell uses often Dell unique solutions.
They are often used by big customers with a central IT department.
That's customers with a central security department, not to be configured by a end user.

Which Model do you use?

Back then there is a UEFI Boot Sequence at a Latitude E7440 (4th generation).
https://www.dell.com...indows-10-8-1-8

The NVRAM settigns can be changed at the UEFI firmware.
Secure Boot Disabled/Enabled seems to change the default behaviour.
Disabling Secure Boot may delete the NVRAM settings.
The idea seems to be: protect the end user from the end user, the end user has to light the torch himself.

Does exist a similar UEFI Boot Sequence setting at your machine?

Setting a supervisor password may change the behaviour.
E.g. without a supervisor password UEFI USB boot is disabled.
With a supervisor password, UEFI secure boot is disabled by default, but you may add UEFI USB boot manually.
The supervisor password is set by central IT department. And the end user dosn't know the supervisor password.
That's a idea only, not confirmed at a real machine.
A manufacturer may have special ideas.

#18 Raex

Raex

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 16 April 2019 - 02:45 AM

Yes, NVRAM settings and behaviour is manufacturer specific.
Depending on the targeted end user, there are different security concerns.

Traditionally the BIOS boot settings can't be changed from the operating system.
New: UEFI boot settings can be changed from the operating system.

Dell uses often Dell unique solutions.
They are often used by big customers with a central IT department.
That's customers with a central security department, not to be configured by a end user.

Which Model do you use?

Back then there is a UEFI Boot Sequence at a Latitude E7440 (4th generation).
https://www.dell.com...indows-10-8-1-8

The NVRAM settigns can be changed at the UEFI firmware.
Secure Boot Disabled/Enabled seems to change the default behaviour.
Disabling Secure Boot may delete the NVRAM settings.
The idea seems to be: protect the end user from the end user, the end user has to light the torch himself.

Does exist a similar UEFI Boot Sequence setting at your machine?

Setting a supervisor password may change the behaviour.
E.g. without a supervisor password UEFI USB boot is disabled.
With a supervisor password, UEFI secure boot is disabled by default, but you may add UEFI USB boot manually.
The supervisor password is set by central IT department. And the end user dosn't know the supervisor password.
That's a idea only, not confirmed at a real machine.
A manufacturer may have special ideas.

 

It's dell inspiron 5570. And well, my method didn't work. It created a similar entry to the usb drive, and didn't work. I wonder if I might need an actual uefi usb rather than an aioboot usb. 



#19 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 16 April 2019 - 04:16 AM

I wonder if I might need an actual uefi usb

Yes, try a GPT USB disk. The Inspiron seems to expect GPT at UEFI mode.

https://forums.tomsh...laptop.3119970/

https://askubuntu.co...a-dell-inspiron
  • Raex likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users