Take the 2-minute tour ×
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 PC and after uninstalling Ubuntu from my laptop I went into a problem that I can't fix. I get a error message that says:

SECURE BOOT FAILED! Your VAIO has detected an invalid operating system.

I have tried to make a recovery and the only thing I get as a result is the following error message that is displayed in white text on a black background, and then I get into the same VAIO CARE section saying the same thing again! This appears before it enters the VAIO care system:

Could not open "\EFI\BOOT\fallback.efi": 14
Failed to open "\EFI\BOOT\grubx64.efi" - 800000000000000E
Failed to load Image
Failed to open "\EFI\BOOT\MokManager.efi" - 800000000000000E 
Failed to load Image

I don't know what to do. Please help me. I am studying and therefore I have to use my laptop every day!

share|improve this question
    
Are you running a dual boot? If so, what with? It would also be useful to know how you uninstalled Ubuntu. –  Wilf Feb 19 at 22:57
    
Disable Secure Boot in your firmware's setup utility. Ignore most of House Zet's answer unless you have problems after that point. –  Rod Smith Feb 20 at 14:27
    
I deleted the Ubuntu partition and I was running Ubuntu and Windows 8.1 in a dual boot! But when I turn off Secure Boot it will boot into GNU GRUB Version 2.00-19ubuntu2.1! Have to try to write exit but it keeps restarting and getting back to GNU GRUB! –  user250135 Feb 21 at 16:45

2 Answers 2

This message appears just because you enabled secure boot but use an unrolled boot manager.

  1. Disable secure boot in your uefi setting.
  2. Log into windows. And press win+s.
  3. Enter cmd then select run as admin.
  4. In the commandline, input the following things:

    mountvol S: /S 
    bcdedit /set {bootmgr} path \EFI\Boot\bootx64.efi
    

Warning: If you've made any changes to \EFI\Boot\bootx64.efi, this will not work as expected. You may need to register

\EFI\Microsoft\Boot\bootmgr.efi

instead of

\EFI\Boot\bootx64.efi

But I haven't tested it, do it at your own risk.

Finally, Reboot, enable secure boot.

Alternatively, you can also install the boot manager reFind to manage all your efi. Take a look at here:

http://www.rodsbooks.com/refind/

If you would like to install more os in future, this boot manager will help greatly.


Update:

In the screnn shot, I found that you may delete the EFI partition. This is a really bad suitation but still can be fixed with some effort. You have to recover it manually. Follow these steps:

Warning: all the disks like /dev/sdax in command is just an example, you should replace them according to your system environment.

  1. Make a bootable usb system, such as ubuntu live image. Make sure you have disabled secure boot.
  2. Boot into this live system. and run lsblk, you will get something like the following output, but without efi mounted:

    $ lsblk
    NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda       8:0    0 931.5G  0 disk 
    ├─sda1    8:1    0   260M  0 part 
    ├─sda2    8:2    0   1.5G  0 part 
    ├─sda3    8:3    0   260M  0 part /boot/efi
    ├─sda4    8:4    0   128M  0 part 
    ├─sda5    8:5    0 845.1G  0 part /home/win
    ├─sda6    8:6    0   392M  0 part 
    ├─sda7    8:7    0  33.9G  0 part 
    ├─sda8    8:8    0   500M  0 part /boot
    ├─sda9    8:9    0  19.5G  0 part /
    ├─sda11   8:11   0    27G  0 part /home
    └─sda12   8:12   0     3G  0 part [SWAP]
    
  3. Find your Recovery Disk. For sony vaio, it is usually Windows Recovery disk /dev/sda2 with size of 1.5GB (or EFI recovery disk /dev/sda1 with size 260MB).

  4. Mount this disk with

    mkdir recovery && mount /dev/sda2 recovery
    
  5. Make sure you get bootmgr.efi in this disk. Usually you can find it under ./recovery/EFI/Boot or ./recovery/EFI/Microsoft/Boot/.

  6. Find out your original efi partition. Usually it is /dev/sda3 on sony vaio and the size of disk is 260MB. If nothing appears to be efi partition, just make a new efi partition by yourself. Don't worry, it should be safe even you create multiply efi partitions.
  7. Use

    cgdisk /dev/sda
    

    and make /dev/sda3 a EFI partition(set code as ef00). Do Not Change Any Other Thing.

  8. Mount it.

    mkdir /boot/efi && mount /dev/sda3 /boot/efi
    
  9. Copy everything under ./recover/EFI to your new efi partition.

     cp -r ./recover/EFI /boot/efi/
    

    Make sure the output of

    $ ls /boot/efi/EFI/
    

    is

    Boot/       Microsoft/
    
  10. Make your new efi bootmanager loadable.

    efibootmgr -c -l \\EFI\\Boot\\bootx64.efi -L Microsoft
    

    Similar to my old answer, if the above command do not work, you may need to set windows bootloader under Microsoft\Boot:

    efibootmgr -c -l \\EFI\\Microsoft\\Boot\\bootmgr.efi -L Microsoft
    
  11. Remove all the mounted disk and usb stick. Reboot and enable secure boot. Now you can enter your windows.

share|improve this answer

I deleted the Ubuntu partition and I was running Ubuntu and Windows 8.1 in a dual boot!

But when I turn off Secure Boot it will boot into GNU GRUB Version 2.00-19ubuntu2.1!

Have to try to write exit but it keeps restarting and getting back to GNU GRUB!

share|improve this answer

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.