Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

my computer is a Sony Vaio Notebook. I used Ubuntu and Win 8 with dualboot but windows somehow managed to remove the choosing of the OS at startup. I think the bios is EFI and secureboot was disabled already and Boot Repair somehow fails, I attach the error links it gives. Can someone help please? I already spent half a day to find a solution.. Thanks a lot!

igor igel

share|improve this question
sda is missing GRUB ... "Place GRUB into sda" using: – jm_____ Jun 22 '14 at 17:21
With UEFI you do not have grub in the MBR of sda, just in the efi partition which it is. – oldfred Jun 22 '14 at 17:23
up vote 10 down vote accepted

Sony, HP, and many laptop vendors are hard-coded to only boot Windows.

There are several work-a-rounds that suggest you move the grub grubx64.efi or shim64.efi file on top of the Windows /EFI/windows/bootmbfw.efi. However this isn't recommended because Windows Update will restore bootmfw.efi and you'll be back to only Booting windows.

Instead, I suggest renaming bootx64.efi and boot hard drive or use rEFInd.

Make sure you backup the entire EFI partition before making changes.

You have several options available:

A: Move the grub files bootx64.efi or shim64.efi (for secure boot) on top of /EFI/BOOT/BOOTX64.EFI

a1: Rename /efi/boot/bootx64.efi, copy shim or grub into /efi/boot and name it bootx64.efi Then boot harddrive entry.

From live installer mount the efi partition on hard drive, lines with # are comments only: Mount efi partition. check which partition is FAT32 with boot flag. Often sda1 or sda2 but varies.

sudo mount /dev/sda1 /mnt

only if not already existing,

sudo mkdir /mnt/EFI/Boot
sudo cp /mnt/EFI/ubuntu/* /mnt/EFI/Boot

If new folder created, the bootx64.efi will not exist, skip this command

sudo mv /mnt/EFI/Boot/bootx64.efi /mnt/EFI/Boot/bootx64.efi.backup

make grub be hard drive boot entry in UEFI. If not existing, may have to update UEFI also with efibootmgr.

sudo mv /mnt/EFI/Boot/grubx64.efi /mnt/EFI/Boot/bootx64.efi 

a2:(this is the same as what Boot-Repair used to do in B:. Not now recommended: Rename /efi/Microsoft/Boot/bootmgfw.efi and copy grub or shim into /efi/Microsoft/Boot and name it bootmgfw.efi Then boot Windows entry to boot to grub menu. You have to manually add a grub menu entry to boot renamed Windows efi file. Grub2's os-prober entry boots bootmgfw.efi entry which is now just grub, so it will not work.

Users who manually moved efi files around see post #6

B: If you ran Boot-Repairs fix for "buggy UEFI" with an older copy best to undo it. And then make the change above to use bootx64.efi To undo & to rename files to their original names, you just need to tick the "Restore EFI backups" option of Boot-Repair.

Any rename either manually or with Boot-Repair will need to be redone after a Windows update as it will restore Windows files.

C: Edit Windows BCD, one Alternative to Boot-Repairs rename to make shim have Windows name. Some systems work better to register grub/shim from inside Windows - for those that keep resetting Windows as default

Grub not showing on startup for Windows 8.1 Ubuntu 13.10 Dual boot

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

D: If Description has to be Windows then change UEFI description.

sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\ubuntu\shimx64.efi"

New Windows entry - assumes default sda1 add -p 2 if sda2:

sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\Microsoft\Boot\bootmgfw.efi"

E: Some install rEFInd which seems to be another workaround and has nice boot icons.

PPA available to make it easy to install in Ubuntu:

share|improve this answer
Yes! Renaming worked for me! I mounted the efi partition and copied the files ../EFI/ubuntu/grubx64.efi to ../EFI/Boot/ and to /EFI/Microsoft/Boot and changed the name of the file as follows. In the ../EFI/Boot directory I overwrote the bootx64.efi with the file and in the ../EFI/Microsoft/Boot i overwrote the bootmgfw.efi with the file . That was all I think. Thank you very much! – user296880 Jun 23 '14 at 20:28
For those stuck on Windows: I managed to do the rename approach describe in option a1 without leaving Windows. I opened a command window as administrator, then ran mountvol S: /S to mount the EFI partition as S:. I had odd issues with going up and down folders, but moving a copy of grubx64.efi a folder at a time into /EFI/Boot, then renaming it to bootx64.efi worked. – Peter Becker Sep 17 '15 at 10:59

I have an Acer that has the same problem. My solution is to "reboot" windows, rather than shutdown (which is really just a hybernate.)

By rebooting (Which may trigger updates,) the system shuts down and you can select boot from the bios. You do have to catch it before it reboots.

I rarely use windows so booting this way doesn't bother me at all. Unless, of course, windows updates.

share|improve this answer

Your Answer


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.