Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 shimx64.efi file on top of the Windows /EFI/windows/bootmgfw.efi. However this isn't recommended because Windows Update will restore bootmgfw.efi and you'll be back to only Booting windows.

Instead, I suggest renaming the fallback /EFI/Boot/bootx64.efi and boot hard drive entry or use rEFInd.

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

You have several options available:

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

  1. Rename /efi/boot/bootx64.efi, copy shim or grub into /efi/boot and name it bootx64.efi Then boot hard drive entry. New versions of Boot-Repair automatically do this with 'Use the standard EFI file' in advanced options.

    From live installer mount the efi partition on hard drive: 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 
  2. (This is the same as what Boot-Repair used to do in II. 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.

II. If you ran Boot-Repair's fix for "buggy UEFI" with an older copy it's best to undo it. And then make the change above to use bootx64.efi To undo and 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.

III. Edit Windows BCD, one alternative to Boot-Repair's 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

IV. If Description has to be Windows, then change UEFI description. This really only works for those with just Ubuntu, and no Windows install at all.

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

Restore or a new Windows UEFI entry - assumes default sda1 add -p 2 if sda2 (see man efibootmgr -d drive & -p partition options):

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

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