# Ubuntu – The Windows 8 and Ubuntu 12.04 Dual Boot NIghtmare

12.04bootdual-bootgrub2windows 8

I have done some research as to how to go about this dual-boot, and I am close, but I need some guidance with booting into Windows 8 (Ubuntu is installed).

I have a Lenovo Ideapad y510p.

I will go over what I have done to dual-boot this laptop, with windows 8 pre-installed, with Ubuntu 12.04:

1. I followed every instruction to the letter for the 97-vote response here, and everything worked fine up until after the repair boot section:
Installing Ubuntu Alongside a Pre-Installed Windows with UEFI

2. I ran into the following error upon restarting after the repair boot section:
error: invalid arch independent elf magic. This error (a grub issue) disabled me from booting into Ubuntu 🙁

3. After a little googling, I followed the instructions in the reactivating grub 2 section to resolve the error:
http://kb.acronis.com/content/1686

4. I found a possible solution to fixing the Windows 8 boot issue, and tried it:

5. I thought the above solution worked, but when I attempt to boot into Windows 8, I get the following missing file error:

File: \Boot\BCD

Status: 0xc000000e

Info: The Boot Configuration Data for your PC is missing or contains errors.

Here is some other information that may be useful:

• I have 3 partitions devoted to Ubuntu.

• The first, sda8, has a flag bios_grub (1049 kb).

• The second, sda9, is where everything else is (96.6 GB).

• The last, sda10, is for swap (8299 MB).

My question is: How do I fix the boot configuration for Windows 8? Any help would be greatly appreciated 🙂

Update 1: When I attempt to boot into UEFI mode, I get the following error: invalid arch independent elf magic (the same error I saw in step 2).

Update 2: A useful link here I found:
Dual booting Ubuntu 12.04: UEFI and Legacy

So, this is my 4th time installing Ubuntu on the laptop, and it looks like I need to install it in UEFI mode. Should I scrap it all again, and reinstall? Or is there ANY way of salvaging my installation? At this point, I can't even boot into Windows (although I have an installation cd to fix the windows boot issue, that would ultimately screw over ubuntu).

Update 3: After doing a little more browsing around, I found a cool way around this messy grub stuff, using rEFInd. Rod Smith's post here saved me!

Installing ubuntu 12.04.02 in uefi mode

Now, I am able to dual-boot Windows 8 and Ubuntu and boot into both operating systems 🙂

I have another issue (relating to the boot configuration in the bios) that I will post as a separate question 🙂

Then, after Windows was done making a clean install in the rest of the space allotted to it (and, in the process, creating the necessary UEFI structure before my partition, and a Windows partition immediately after), I simply replaced that partition with an ext4 partition during the Ubuntu installation and mounted it as /boot, installing grub to it. Everything worked fine after that (after running boot-repair, that is).