SOLVED - see UPDATE 2 below (but lost all files/programs on Windows 7)

I have a Laptop (ASUS X310A, I installed Ubuntu 12.04 to be side by side with Windows 7 but I seem to have gotten a problem with booting Windows 7. I used the Boot Repair twice with no results.

Boot-Repair info: http://paste.ubuntu.com/1417623/

The error I get when starting Windows 7 from GRUB is: error: invalid efi file path

In Boot Manager or Menu, I have 3 options now: 2x for Ubuntu (maybe cause I did boot-repair twice) 1x Windows boot manager (If I boot this it opens "ASUS Preload Wizard", it gives me the option to re-install windows losing all previous data -)

When I was making the partition before installing Ubuntu, I made the new partition by making sda4 smaller and adding ext4 mounted: "\" and adding a swap area. Installed it and it didn't work, nothing worked. So i booted Ubuntu from the USB again and deleted the partitions I made and decided to make sda3 smaller and making the partitions but this time it gave me the option that I could mount sda3 on "\windows" or "\dos" I ignored it and didn't choose neither because the I know that it doesn't need to be mounted and proceeded to create what is now sda7 (ext4) and sda8 (swap area). It still didn't work so I booted from USB and did the first boot-repair, so I was able to boot Ubuntu now but not windows, but when I did it through my USB I was not able to update boot-repair, so i decided to redo the boot-repair from Ubuntu running on the Hardisk (fully updated) and it still didn't work.

In GRUB this is what i see (when booting using Ubuntu as first option in Boot Menu): Ubuntu, with Linux 3.2.0-29-generic Ubuntu, with Linux 3.2.0-29-generic (recovery mode) Windows UEFI loader Windows Boot UEFI bootx64.efi.bkp Windows 7 (loader) (on /dev/sda3) Windows Recovery Environment (loader) (on /dev/sda5)

I tried all the ones starting with "Windows" they all don't work

Please help, Many Thanks


I tried:

menuentry "Windows 7" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt1)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi.bkp

"Window 7" appears in GRUB, and when I choose it, It asks if I want to start windows normally so I do and then I get a blue screen and then it returns me to GRUB


so basically this is what we did,

We choose "Windows UEFI" in GRUB and pressed F9 to go into "ASUS Preload Wizard" and basically choose the language and proceeded to re-install windows 7 essentially on the first partition (sda3), which is Drive C:.

We let it do its thing through diskpart.exe (dos window, "the black window") - Microsoft DiskPart version 6.1.7601

It re-installed Windows 7, it then jumped to a windows 7 interface with large icons did some more installing and then jumped to ASUS - Windows configuration loading screen then windows opened and then did some stuff and shutdown automatically.

So I assumed that it needed a restart so I went back into "Windows UEFI" in GRUB and same things happened it did some updates then shutdown. So I cycled this maybe 10 times until in the end Windows 7 AT LAST WORKED!!!

So I went back to Ubuntu 12.04, everything was working fine, I opened Gparted and deleted the partition: sda5 - ntfs - 1.00Mio - bios_grub

and resized sda4 (Drive 'D') to use up the unused space

Went back to windows checked everything and I believe everything is fine now in terms of booting.

But i lost all the files and programs installed on windows 7. But I made a back up of all my files before installing Ubuntu 12.04, so I have them all. In terms of programs I will just have to re-install them. :)


I'm a little foggy on some of the details of what's going on, but here are some of the key points from your Boot Info Script output:

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 7: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /EFI/Boot/bootx64.efi /EFI/Boot/bootx64.efi.bkp 

This is your EFI System Partition (ESP), which holds EFI-mode boot loaders. Ordinarily, such files end in .efi; however, some Linux tools (such as Boot Repair, if I understand correctly) rename the original Windows files with .bkp extensions and replace them with copies of GRUB. This seems to be a measure to work around certain buggy EFIs that ignore the usual NVRAM boot loader list and just boot EFI/Microsoft/Boot/bootmgfw.efi or EFI/BOOT/bootx64.efi directly.

Here's a bit from later in your Boot Info Script output, taken from your GRUB configuration file:

menuentry "Windows UEFI loader" {
search --fs-uuid --no-floppy --set=root CA62-F337
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi.bkp

menuentry "Windows Boot UEFI bootx64.efi.bkp" {
search --fs-uuid --no-floppy --set=root CA62-F337
chainloader (${root})/EFI/Boot/bootx64.efi.bkp

This shows that GRUB is configured to boot its renamed boot loader; but this action isn't working. As near as I can tell, those entries are correct; but GRUB seems to be quite finicky in its EFI chainloading configuration, which these entries employ. Sometimes what works on one system fails on another. You could try editing the file to add something like this instead:

menuentry "Windows 7" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt1)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi.bkp

If that works, add the entry to your /etc/grub.d/40_custom file so that it will be included whenever GRUB re-creates its grub.cfg configuration file.

Another option is to install another boot loader or boot manager to be used instead of or in addition to GRUB. My first recommendation is rEFInd, but I'm biased because I maintain it. It has the advantage of being easy to install: Download it, extract the archive, and run the install.sh script in Linux. Unfortunately, the renamed Windows boot files pose a problem, so you'll have to either rename them back to their original forms or create manual boot stanzas in rEFInd's refind.conf file to launch the real Windows boot loaders. Once you've done this, when you reboot you should see an entry for Windows, which should work with any luck. You'll also see an Ubuntu entry, which should launch GRUB.

If rEFInd works, you may want to consider some further reconfiguration that will make rEFInd boot Linux directly, without involving GRUB. This topic is described on rEFInd's documentation page describing methods of booting Linux. In brief, if you copy your Linux kernel and initial RAM disk file to the root directory of the ESP or a subdirectory of EFI on the ESP, and place a refind_linux.conf file with your kernel options in the same directory, rEFInd will be able to launch the kernel directly. If you juggle your mount points a bit, rEFInd can detect when you install updated kernels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.