12

I seem to have windows passing by on GRUB/Ubuntu. There's no Ubuntu folder under Windows. I can boot from firmware to Grub, then choose either OS. I removed Wubi/Ubuntu and reinstalled directly to the same partitions.

The windows Boot Manager did not create an entry for Ubuntu, so I need to create the entry. Wubi puts wubildr.mbr on my system... but this is the wrong thing for EFI installs. I need the shimx64.efi so the created Windows boot in EFI might work.

I will make a copy of my boot with bcdedit, and point the entry to Ubuntu.

If this is incorrect, please tell me what to do next?

1
  • Just use bcdedit /v and copy it to paste here, pls?
    – WLC
    Mar 11, 2016 at 14:42

3 Answers 3

20

If you want to add an UEFI entry for Ubuntu with bcdedit, you can use the following commands as administrator:

List all BCD entries for UEFI:

bcdedit /enum firmware

Copy UEFI entry of "Windows Boot Manager" to create a new entry for Ubuntu:

bcdedit /copy {bootmgr} /d "Ubuntu Secure Boot"

Set file path for the new Ubuntu entry. Replace {guid} with the returned GUID of the previous command.

bcdedit /set {guid} path \EFI\ubuntu\shimx64.efi

Set optionally Ubuntu as first entry in the boot sequence. Replace {guid} with the returned GUID of the copy command.

bcdedit /set {fwbootmgr} displayorder {guid} /addfirst

Alternatively, you can use a script which does the job for you:

@ECHO OFF
rem add Ubuntu EFI entry

bcdedit /enum firmware

for /f "tokens=2 delims={}" %%a in ('bcdedit /copy {bootmgr} /d "Ubuntu Secure Boot"') do set guid={%%a}
bcdedit /set %guid% path \EFI\ubuntu\shimx64.efi
bcdedit /set {fwbootmgr} displayorder %guid% /addfirst

bcdedit /enum firmware 
7
  • This might help. But The system start-up (Firmware) is already booting both the OS, as it should. It's just windows doesn't acknowledge Ubuntu.
    – WLC
    Mar 14, 2016 at 16:07
  • bcdedit entries "Firmware Application (101fffff)" should be visible in Windows menu Advanced Startup Options->Use a device Mar 15, 2016 at 21:41
  • bcdedit entries "Windows Boot Manager" as I used in my guide are not visible in this menu but the main function is to insert an entry to EFI menu of your firmware and change boot order if necessary Mar 15, 2016 at 21:51
  • I tried the above commands. It indeed added a new entry, but adding it as first one (/addfirst) does not seem to be effective. It still boots Windows by default instead of grub.
    – fviktor
    Jan 4, 2017 at 22:24
  • The Makers of easyBcd say: ”If your Windows PC is booting in EFI mode, Microsoft has blocked the loading of [...] This means that you can no longer use EasyBCD to add Windows 9x, XP [or] Linux entries.” – So I understand, with UEFI neither EasyBCD tool nor bcdedit will make this possible? Or am I missing something? (and I keep reading bcdedit /set {UUID} path \EFI\ubuntu\grubx64.efi accross the net, strongly sound like it is possible...
    – Frank N
    Aug 27, 2019 at 7:18
5

The easiest way for your intention should be EasyUEFI. EasyUEFI can create an entry for Ubuntu. \EFI\ubuntu\shimx64.efi is the right file path for that entry. If necessary, you can also change the boot order.

2
  • I do not have an Ubuntu folder under windows.
    – WLC
    Mar 14, 2016 at 16:05
  • @WLC The folder \EFI\ubuntu is on the EFI partition. The EFI partition is hidden under Windows, but EasyUEFI should also see this hidden partition.
    – ngng
    Mar 14, 2016 at 20:56
0

adding to @hakuna_matata 's answer you should execute :

for other os default

bcdedit /displayorder {guid_of_os} /addfirst

for windows as default

bcdedit /displayorder {guid_of_os} /addlast

syntax

bcdedit /displayorder <id> [...] [ /addfirst | /addlast | /remove ]

you will get Ubuntu during boot on options

You must log in to answer this question.

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