0

Windows 10 has a function to boot from a USB Flash Drive after restart using some kind of "boot override" function, which probably bypasses the usual boot order in the BIOS.

Can I find something similar in Linux?

14
  • Booting from external media has nothing to do with installed OS: support.microsoft.com/en-us/surface/… Commented Apr 27, 2023 at 16:50
  • In ideal world…any help?! link provides nothing
    – JZK
    Commented Apr 27, 2023 at 17:02
  • It sure does! It says how to boot to the UEFI settings by pressing and holding the volume-up button while booting. Commented Apr 27, 2023 at 17:04
  • No, this not working. Tested thousand of time over 3 years. Only way I could access usb boot was from windows and this option (by having only Ubuntu installed) is now gone
    – JZK
    Commented Apr 27, 2023 at 17:13
  • 1
    Okay, we know this now, but how was someone supposed to know that until now? When you ask a question, you need to clearly spell out what you tried and what was the result when you tried that. Commented Apr 27, 2023 at 17:16

1 Answer 1

4

Yes, by using efibootmgr to change the EFI firmware's 'BootNext' parameter.

For example, to boot into Windows once, set 'BootNext' to the entry you want, then reboot:

# efibootmgr
 BootCurrent: 0001
 BootOrder: 0000,0001
 Boot0000* Windows Boot Manager
 Boot0001* Ubuntu
 Boot001F  USB HDD

# efibootmgr --bootnext 0000
# reboot

Generally, the firmware will only add removable devices to this list if they were present during system boot. Even with Windows, a USB stick that's plugged in later will not show up in the list (unless you do a normal reboot first).

You can also rearrange the entries permanently, using --bootorder 0001,0000 or such.

To reboot into the firmware settings screen, a different method is used (the 'OsIndications' parameter – older systems might not support this):

# systemctl reboot --firmware-setup

The functions are also accessible via CLI from Windows:

Linux Windows
efibootmgr bcdedit /enum firmware
efibootmgr --bootnext NUM bcdedit /set {fwbootmgr} bootsequence GUID
efibootmgr --bootorder NUM… bcdedit /set {fwbootmgr} displayorder GUID…
reboot, systemctl reboot shutdown /r /t 0
systemctl reboot --firmware-setup shutdown /r /fw /t 0

(Normally bcdedit deals with the Windows Boot Manager's own menu, but these specific commands ask it to manage the EFI boot menu instead.)

2
  • This seems exactly what I was looking for. I’ll test it soon and write back. Thank you!!
    – JZK
    Commented Apr 28, 2023 at 5:53
  • Man, you’re amazing! Thank you very much. Working like charm!
    – JZK
    Commented Apr 28, 2023 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .