Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

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 orI don't know how to use it...

share|improve this question
I think you're on a good way solving this yourself. Just keep digging [; – Melon Jan 3 at 11:11
2  
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 at 5:21
Naaah, I think that they just don't care that's. Anyway, hope to see your tutorial soon. – Melon Jan 4 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 at 9:30

2 Answers

up vote 3 down vote accepted

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 it 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.

share|improve this answer
Sorry bcdedit /set {bootmgr} \\EFI\\ubuntu\\grubx64 does not work. I tried almost everything in Windows 8. – Kouros Jan 4 at 10:55
That should be bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi (with single backslashes), not bcdedit /set {bootmgr} path \\EFI\\ubuntu\\grubx64.efi (with double backslashes). I'm not really sure if it makes any difference, but it's conceivable that it would, so it's best to try with the single backslashes. – Rod Smith Jan 4 at 15:31
Nop doesn't work either :( – Kouros Jan 7 at 20:03
PS C:\Windows\system32> bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi The set command specified is not valid. Run "bcdedit /?" for command line assistance. The parameter is incorrect. – Kouros Jan 7 at 20:29
Sorry I used Power Shell, works only on cmd.exe – Kouros Jan 7 at 20:32
show 3 more comments
  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
share|improve this answer
Nop problems come from Windows 8 – Kouros Jan 7 at 20:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.