i've just installed Ubuntu 12.04 on my new laptop ( with Win7 64bit pre installed ) in EFI mode and now i can't load Win7 anymore ( Ubuntu just loads fine from grub ). When i select the Windows 7 entry in the grub menu, i get this error:
Invalid EFI file path
The grub.cfg entry ( generated by boot-repair ) is:
menuentry "Windows 7 (loader) (on /dev/sda3)" --class windows --class os {
insmod part_gpt
insmod ntfs
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set=root B8449665449625E2
chainloader +1
}
This is the parted output :
GNU Parted 2.3
Viene usato /dev/sda
Benvenuti in GNU Parted. Digitare "help" per l'elenco dei comandi.
(parted) print list
Modello: ATA ST9500325AS (scsi)
Disco /dev/sda: 500GB
Dimensione del settore (logica/fisica): 512B/512B
Tabella delle partizioni: gpt
Numero Inizio Fine Dimensione File system Nome Flag
5 1049kB 106MB 105MB fat32 avvio
3 345MB 200GB 200GB ntfs Basic data partition
1 200GB 200GB 1049kB bios_grub
2 200GB 496GB 296GB ext4
4 496GB 500GB 4172MB
The boot EFI partition, mounted as
/dev/sda5 on /boot/efi type vfat (rw) )
has the following files ( excluding the grub folder and other files on the boot root ) :
./efi
./efi/efi
./efi/efi/boot
./efi/efi/boot/bootx64.efi
./efi/efi/ubuntu
./efi/efi/ubuntu/grubx64.efi
./efi/efi/Microsoft
./efi/efi/Microsoft/Boot
./efi/efi/Microsoft/Boot/bootmgfw.efi.grb
./efi/efi/Microsoft/Boot/bootmgfw.efi
./efi/efi/Microsoft/Boot/bootx64.efi.grb
./efi/efi/Microsoft/Boot/bootx64.efi
How can i fix this ?
Thanks
EFI/Microsoft/Boot/bootmgfw.efi.grb
file on the ESP is the real Windows boot loader, so renamingbootmgfw.efi
to something else and then renamingbootmgfw.efi.grb
back to bootmgfw.efi will fix it. You can check the file sizes of these files and ofEFI/ubuntu/grubx64.efi
to verify this, or usediff
to compare them. FWIW, Ubuntu's developers might have done this to work around bugs in some EFI implementations, but it's rather naughty of them, if so! – Rod Smith Nov 12 '12 at 23:18set root=(hd0,gpt1)
because that is where my DELL keeps its EFI partition. – Mutant Bob Dec 15 '16 at 16:56insmod part_gpt
is needed. If you're here for a non-Windows GRUB chainloading fix and your path is correct, that is your answer. – SleighBoy Nov 18 '19 at 23:01