boot-repair fails (UEFI and pre-installed Windows 8)

I have bought a new laptop, Toshiba Satellite NB10t-A-101, with pre-installed Windows 8, after one day of figuring out how to install Ubuntu in UEFI I finally managed to do it (which wasn´t easy, as M$, Intel and Toshiba have made it more difficult with this model). It installed correctly. I created new partitions (making space beforehand in Windows 8). However after the installation the Windows boot manager turns on, with both Windows 8 and Ubuntu options. After selecting Ubuntu I am getting the same WUBI error as described here: Installing Ubuntu Alongside a Pre-Installed Windows with UEFI

 Windows failed to start. A recent hardware or software change might be the 
cause. To fix the problem:

  1. Insert your Windows Installation disc and restart your computer. 
  2. Choose your language settings, and then click "Next."
  3. Click "Repair your computer."

If you do not have this disc, contact your system administrator or computer 
manufacturer for assistance.

    File: \ubuntu\winboot\wubildr.mbr
    Status: 0xc000007b
    Info: The application or operating system couldn't be loaded because a 
          required file is missing or contains error.

Which is already strange, as I thought the installation was in EFI mode (note- the secure boot option was disabled since the beginning, so this shouldn´´t be the cause). However after going to the "repair" options, the Windows menu appears (the same menu that allows to enter UEFI configuration), and in the "boot from device" option one additional figure appears- "ubuntu" which boots directly into the previously installed Ubuntu (14.04.1 LTS).

At this point I hoped the boot-repair would help. I followed the instructions from here: https://help.ubuntu.com/community/UEFI ("Converting Ubuntu into EFI mode"), unfortunately it does not help and I am getting this error:

 An error occurred during the repair.

Please write on a paper the following URL:
http://paste.ubuntu.com/8012282/

In case you still experience boot problem, indicate this URL to:
[email protected]

You can now reboot your computer.
 Please disable SecureBoot in the BIOS.

A broken Wubi has been detected. Please fix it this way:
https://wiki.ubuntu.com/WubiGuide#Cannot_boot_into_Ubuntu

After rebooting I am getting the same initial error (missing WUBI file) and can only enter Ubuntu as described above. Why is Ubuntu still looking for the WUBI? How can I repair the boot options, maintaining dual-boot with Windows? (unfortunately I still need Windows for one program that won´t emulate, also the shop salesman told me I would loose warranty if I delate Windows)

I´m a beginner user and getting to this point was very hard- please, use simple explanations :)

EDIT: Photograps of the boot process. After the error message I can go to the other windows menu and "boot from device"

enter image description hereenter image description here

enter image description here

enter image description here


I did a quick look in the manual for the laptop and F12 (confirmed to be working) should have been the right key according to instructions for booting from external media. You should probably check the manual yourself.

UEFI firmware update

There is the possibility that the UEFI firmware of the laptop does something else than what is expected according to the output from efibootmgr -v.

BootOrder: 0006,0000,2003,2001
[...]
Boot0006* ubuntu HD(2,200800,82000,2f11f25e-4303-11e3-be2a-0c54a5038f2e)File(EFIubuntushim‌​x64.efi

You should check if there is a firmware update available to update and check again after the update if it fixed your issue.

Per HDD-default UEFI bootloader

Another possbibility is that the default bootloader (\EFI\BOOT\BOOTx64.EFI on each HDDs ESP) is always booted (seems to be the case). Check if you can change this behaviour. A fully functional firmware should be able boot the ubuntu or Windows Boot Manager entries (as seen in the efibootmgr -v output) instead of the default one. I found a related post in a blog.

My general advice is too back up \EFI\BOOT\BOOTx64.EFI and replace it. I prefer gummiboot (tested, works), rEFInd is also possbile. I don't know what boot-repair does or suggest for this.

This really seems to be a firmware issue and installing another distribution does not seem to improve on this (I also found a forum post for Fedora with a similar issue).

Suggested solution

You con only boot the \EFI\BOOT\BOOTx64.EFI file on a harddrive with this laptop, so you need to replace it with something, that can boot more than just Windows. Running boot-repair will not help or make confusion worse.

  1. Get gummiboot

    Download gummiboot from the Arch Linux repositories. (Everything is fine, we are just doing Linus Torvalds style package management. You can find the download link on that page far on the right under Package Actions > Download From Mirror)

    Mount the EFI System Partition (ESP) and backup all existing files on the ESP (e.g. use zip or tar). You can put the backup file at the root of the partition, there should be enough space.

    Extract gummibootx64.efi from the package (it's under /usr/lib/gummiboot/) and copy it as \EFI\BOOT\BOOTx64.EFI to your ESP.

  2. Configure gummiboot to boot GRUB

    Create folders along the path loader/entries/ at the root of your ESP and create a file named ubuntu-grub.conf with the following content:

    title          Ubuntu GRUB
    efi            \EFI\ubuntu\grubx64.efi
    

    You also need to add the file loader.conf in loader/ to make gummiboot work.

    default        Ubuntu GRUB
    timeout        4
    

    default is the title of the default entry to boot. Edit appropriately if you have chosen another title.

  3. Reboot

    That's it. Gummiboot will automatically find and create menu entries to boot Windows.


WUBI is incompatible with an EFI-mode boot, which is almost certainly what your computer uses if it came with Windows 8 or 8.1 pre-installed. I recommend you delete your WUBI installation and perform a standard EFI-mode installation. (See also the Ubuntu community wiki and my page on EFI-mode installations for more information.)