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…
Best Answer
I can make no promises, but try this from a Windows Command Prompt window launched with Administrator privileges:
Note that
{bootmgr}
should be typed exactly; that's not a variable. If that doesn't work, you could try this in Linux:/boot/efi
(your EFI System Partition, or ESP).sudo mv /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/Microsoft
.cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
./etc/grub.d/40_custom
file entry that refers toEFI/Microsoft/bootmgfw.efi
. Model it after the existing entry in/boot/grub/grub.cfg
that refers toEFI/Microsoft/Boot/bootmgfw.efi
; just removeBoot
from the boot path and give the entry a new name.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:
40_custom
entry beginning withmenuentry 'Windows ...'
situated between a set of### BEGIN <path> ###
and### END <path> ###
tags/comments. This is the entry having the path containingBoot
./etc/grub.d/40_custom
by adding the copiedmenuentry
.Windows Boot Manager
or something similar).EFI/Microsoft/Boot/bootmgfw.efi
toEFI/Microsoft/bootmgfw.efi
.EDIT:
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.