I have a Sony VAIO S series with Windows 8 preinstalled, and I installed Ubuntu 12.10 on a new partition. When the PC boots Grub is display, and I can choose between Windows 8 (didn't worked at the beginning, had to change Grub settings) and Ubuntu 12.10. When I select Ubuntu 12.10 everything is OK, but when I use Windows 8, and I restart Grub isn't displayed anymore (Windows 8 boots immediately).

I booted a Ubuntu 12.10 LiveUSB, used efibootmgr, and found out that Windows 8 (each time it boots) changes EFI default bootloader from Grub to Windows Boot Manager.

How do I change this in Windows 8? I read something about bcdedit, but it does not work or I don't know how to use it...

  • I think you're on a good way solving this yourself. Just keep digging [;
    – Melon
    Jan 3, 2013 at 11:11
  • 3
    Yep I just need one little thing then I'll write a tutorial how to do it. Microsoft sucks why do they have to change the default boot manager? In my opinion it's to prevent people from using anything else then Microsoft products.
    – Kouros
    Jan 4, 2013 at 5:21
  • Naaah, I think that they just don't care that's. Anyway, hope to see your tutorial soon.
    – Melon
    Jan 4, 2013 at 9:57
  • I just asked Microsoft's customer service about this, and they directed me to their forums. On the forums a fella told me the windows puts itself on the first place. Period. If I don't like it, just create a batch file in windows that runs at every startup end bcdedt-s the windows uefi config to boot grub first next time. Nice.
    – netom
    Jan 7, 2013 at 9:30
  • The GPT file system contains a duplicate of the boot sectors. It seems Windows is just checking the MBR checksum and 'repairing' it by overwriting it with the original protective MBR data. A security best practice. en.wikipedia.org/wiki/GUID_Partition_Table
    – user273073
    Apr 23, 2014 at 14:04

7 Answers 7


I can make no promises, but try this from a Windows Command Prompt window launched with Administrator privileges:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Note that {bootmgr} should be typed exactly; that's not a variable. If that doesn't work, you could try this in Linux:

  1. Back up the entire contents of /boot/efi (your EFI System Partition, or ESP).
  2. Type sudo mv /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/Microsoft.
  3. Type cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi.
  4. Create a new /etc/grub.d/40_custom file entry that refers to EFI/Microsoft/bootmgfw.efi. Model it after the existing entry in /boot/grub/grub.cfg that refers to EFI/Microsoft/Boot/bootmgfw.efi; just remove Boot from the boot path and give the entry a new name.
  5. Type sudo update-grub to install the new GRUB entry.

When you reboot, GRUB should come up. The trouble is that if/when Windows decides to re-install its boot loader, the system will start booting straight to Windows again.

For step 4, you can:

  1. Copy the 40_custom entry beginning with menuentry 'Windows ...' situated between a set of ### BEGIN <path> ### and ### END <path> ### tags/comments. This is the entry having the path containing Boot.
  2. Create a new entry in file /etc/grub.d/40_custom by adding the copied menuentry.
  3. Change the name of the new entry (original should be Windows Boot Manager or something similar).
  4. Change the path from EFI/Microsoft/Boot/bootmgfw.efi to EFI/Microsoft/bootmgfw.efi.


Since writing this answer, I've become aware of a third-party Windows tool called EasyUEFI, which is an easier GUI tool than bcdedit for adjusting the EFI boot order from Windows. I don't know if EasyUEFI will stop Windows from making changes, though, if Windows has a habit of setting itself as the default on every boot. Thus, bcdedit may still be required, but EasyUEFI is definitely worth trying, too.

  • 5
    Would you consider doing me/us a favor and give us the specific terminal prompts for step 4? I did everything else except that step because I wasn't sure exactly what commands to type in. Grub now works, but it won't let me boot into Windows. Eek!
    – user280151
    May 10, 2014 at 14:34
  • please elaborate the step 4
    – ji-ruh
    Oct 31, 2017 at 6:26
  • \EFI\ubuntu\shimx64.efi found on Ubuntu 18.0.4 LTS
    – exploitr
    Feb 6, 2019 at 17:41

How do I change this in Windows 8? I read something about bcdedit, but it does not work or I >don't know how to use it...

Same issue here, I finally figured out that this latest W8.1 update did that, and I know that because I just updated today and haven't for 33 days or so my HP Pavilion told me..

Anyhow, here is what worked:

I followed this Utube video to stop 'Automatic [Boot] Repair': http://www.youtube.com/watch?v=VRQYmtysFkg

Then changed the bootmgr using the above solution supplied by Rod: bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi


btw: Boot Repair from my LiveUsb did nada but cause a short flash while W8 repaired its boot entry..

  • 1
    Its great that you have decided to help! But your answer does not provide any context for the (video)link you posted and we here at Ask Ubuntu want it. We want the answers here to provide contexts as (video)links may be dead sooner or later.
    – Venkatesh
    Jun 14, 2014 at 2:00
  1. run Boot-Repair's Recommended Repair from liveCD, then reboot the pc.
  2. if still not good, run Boot-Repair --> Advanced options --> untick "Backup and rename EFI files" --> tick "Restore EFI backups" --> Apply
  • 2
    Nop problems come from Windows 8
    – Kouros
    Jan 7, 2013 at 20:05

I have only a part of an answer: a working solution that is almost ok until I find out how to fix it permanently.

Had the same problem: thinkpad edge shipped with windows 8; installed ubuntu as dual boot and mostly forgot about windows until 8.1 came out and I thought I'd give it a try before deleting windows for good. So after installing 8.1, grub doesn't appear any more on startup BUT when I press F12 then a different menu appears which allows me to boot ubuntu. That's how I start my computer now: but every second time I forget to press F12 and it still starts Windows (which I almost never want).

So pressing F12 helps for a while (not sure if this works in your case but it may be worth a try). I know there are instructions about how to restore grub but I won't do anything before I'm completely sure.


Somehow Windows 8.1 is Completely Blocking Ubuntu is a duplicate of this question. I don't think it is but I can only comment here. I experienced the same symptoms as Windows 8.1 is Completely Blocking Ubuntu.

In my case the solution was to press F2 during bootup and change the order of booting so that ubuntu was top of the list. For some reason after I upgraded my dualboot (Win/ubuntu) laptop from Win 8 to Win 8.1 'windows' appeared at the top of the boot list ahead of ubuntu, DVD, USB, etc and my laptop booted straight into Windows 8.1 without giving me any choice.

Pressing F2 during bootup and making ubuntu top the list solved my problem and made ubuntu reachable again (along with Windows 8.1) after I upgraded to Windows 8.1 from the Microsoft store.


With Windows 10 and Ubuntu 14.04 on an Acer E17 I had a similar problem (Windows Boot Manager took over, couldn't access Grub on boot). I followed the instructions provided by Rod Smith above, but no luck. (very nice instructions, btw)

I found a setting in the BIOS under boot order that listed the Windows Boot Manager first and the HDD second. I swapped them, saved & exited/rebooted, and Grub came up right away.

I read elsewhere that some BIOS have a fast boot option that you might need to disable as well, but mine didn't have that.


On some machines, BIOS Settings control the boot priority of *.efi files in the UEFI partition. I found my HP Pavilion 15-f039wm laptop did, though it wasn't immediately obvious that it had that feature. Setting it in BIOS beats messing with the .efi files directly and using bcdedit.

For that machine, I press F10 to get to BIOS setup, then cursor to and select "Boot Options". There are options for UEFI boot priorities that can be rearranged, one of which is "OS Boot Manager". However that option has the extra feature that if I highlight it and press Enter, there is a pop up for rearranging the priorities for "ubuntu" and "Windows Boot Manager" within the "OS Boot Manager". I put "ubuntu" on top with F5/F6, save the pop-up's contents with F10, and then press F10 again to save and exit from BIOS Setup.

Now without per-boot intervention, I get the Grub menu which by default boots Ubuntu. I can still boot to Windows through the Grub menu, or get a secure boot by intervening with F9 to get the UEFI Boot Manager menu.

That BIOS feature helps explain why it seemed UEFI code was overriding changes to BootOrder that I made with efibootmgr in Ubuntu.

You must log in to answer this question.

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