I have a problem with a screwed dual-boot of ubuntu 13.04 and windows 8 on a new DELL XPS 12 (EFI/grub2) System not loading windows8 at all,... here is a story:

I've got a new DELL XPS 12 System with preinstalled Windows8 on (U)EFI Firmware (I have never dealt with EFI before).

There are 5-6 partitions over there :

EFI

Windows 8

Hibernate

Ubuntu 13.04

Windows Data

Repair

but it worked as expected for few weeks.

I decided then to install a new Ubuntu 13.04 x64 on top of Windows8 with dual boot.
Somehow (don't ask) I screwed Windows 8 partitions and got only a new Ubuntu installed on a new partition I've created before but lost the access/boot as well as a way to read any of the NTFS Windows partitions I had.
I tried to fix that all during the next few days by using TestDisk, BootRepair and few other tools quite successfully and now I am close to a final solution yet not there, needing some help.

Here is the actual situation:

Ubuntu 13.04 x64 installed and working as expected with grub2 loader

From ubuntu I'have all the NTFS partitions readable so my Windows 8 and Windows Data partition are there

On computer boot in EFI mode (NO secureboot though) grub2 loads and Ubuntu starts up with no issues

The problem is that Windows8 does NOT boot from grub2 stating "...EFI" file not found

Comparing the issues with some others I've read here seems I have Windows 8 EFI file screwed as my bootx64 and bootmdfw efis are 121KB big and not 1.3MB as some reported/supposed for Windows 8

2 Answers
2

First, your partition type codes are messed up. Your first three partitions are all flagged as EFI System Partitions (ESPs), but only the first one should be of that type. Your partition #2 should almost certainly be of "Microsoft Basic Data" type. I'm not sure about your partition #3. You can change partition type codes with gdisk, using its t option. Be sure to save your changes via the w option when you're done. In gdisk, change the type code for partition #2 to 0700. I'm not sure about partition #3, though.

If changing the type code doesn't work, try using the rEFInd CD or USB flash drive. (You can get these from the rEFInd downloads page.) If you boot into rEFInd and it enables you to boot Windows, then install rEFInd using the Debian package or binary .zip file. This will supplement or bypass GRUB 2 (as you see fit) for booting Linux, and bypass GRUB for booting Windows.

I have to say it is very frustrating to see all the these tools (boot-repair, rEFInd, etc.) being recommended over and over and again and again, while the cause is unclear and the actual issues being treated like witchcraft.

Food for thought: Running 100 tools while not understanding the issue, might in some cases solve your problem, but might also not solve your problem or make things worse.

You are right, apart from the multiple EFI System Partitions your setup is missing some files. A proper setup looks like this:

The language resources are not that important for basic boot functionality, but bootmgfw.efi, bootmgr.efi, BOOTSTAT.DAT and BCD. One of the latter files (it must be BCD, because a GUID like string is clearly visible among other data when I put the file in an editor) contains configuration data (e.g. which partition to use for boot) and needs to be generated, which is the rather tricky part as I only know the Windows command for doing that. The other files are easy to find as they are stored in C:\Windows\Boot\ on typical installations.

If you're lucky you'll find a working MBR (C:\Boot\) or EFI (C:\EFI\) boot configuration on the Windows 8 partition or the Windows boot partition that can be booted by GRUB. For booting the MBR configuration I recommend installing Ubuntu in MBR mode to a USB stick, booting it and let GRUB os-prober find the configuration to boot Windows and fix the issue in Windows. For EFI you can write a custom GRUB entry. Read my comment on: Grub errors during UEFI dual boot for Windows 8 (can't find command 'drivemap')

From within Windows you can reinstall the EFI boot loader and configuration to the location of your choice with bcdboot C:\Windows /s C: /f uefi. In this case /s C: will install to C:, you should replace it with the drive letter of the ESP you want to use.

thnx for reply... i actually used testdisk and restored my lost partitions defs with success, used then bootxxx from win8 in order to recreate / fix boot sector but it did not help with booting win8 from grub2,... as well as boot-repair wasn't able to repair it... now I will try your suggestions with bcdxxx from within win8... thnx! b.
–
Zlatibor Boro UrosevicMay 19 '13 at 22:39