Adding a UEFI firmware boot entry using bcdedit

How to add a new UEFI firmware boot menu entry (in NVRAM) using bcdedit

. Ex. I have tried the following steps, but no boot record is added.

bcdedit /create /d "LinuxLoader" /application osloader 

      

this will return a new guid (say newguid)

bcdedit /set {newguid} device partition=S:
bcdedit /set {newguid} path \boot\efi\bootx64.efi
bcdedit /set {fwbootmgr} displayorder {newguid} /addfirst

      

Thanks in advance.

+3


source to share


1 answer


You cannot use applications like OSLOADER to boot Linux: this kind is for Windows bootloaders, such an application is bootable applications (not the same as EFI applications), they are signed by Microsoft exclusively and run by Windows Boot Manager (see first slides of this UEFI document for a good description of the process.)

On the other hand, it should be possible to add another boot manager along with Windows and register it to UEFI (NVRAM storage); the steps are the same as you wrote, just use

bcdedit /create /d "LinuxLoader" {bootmgr}

as the first operation. The theory behind the action bcdedit

( bcdsrv

really) is that in the last step, the record must also be copied to NVRAM; so your UEFI manager will now have at least two options to choose from, with Windows Boot Manager probably still the default. This means that in practice you may need to use a magic key to bring up this menu (UEFI boot manager). To change the default entry, you can try



bcdedit /set {fwbootmgr} default $newguid

which would update the variable BootCurrent

in NVRAM, so the UEFI firmware then has to choose the Linux bootloader, preferring Windows; no guarantee, although I believe there are UEFI firmwares out there that are poorly programmed for that matter; as per this question , it even seems like the standard behavior of the Windows 8 boot process to revert a change like this: --(

In addition, I would make another entry, other than the standard location (ESP) \ EFI \ BootX64.efi, as a position in the {fwbootmgr} list: such an entry will persist if some (bad) tool decides to restore the correct value and completely erase standard place with Microsoft bootmgfw.efi

...

+1


source







All Articles