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?
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?
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.)