Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 on a Pre-Installed Windows 8 System (UEFI Supported)

  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:

  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 :)

share|improve this question
Do you have secure boot enabled? Most machines with preinstalled W8 require that. boot-repair will fix most things. – ubfan1 Jul 26 '13 at 17:13
My computer is in Legacy Mode. Secure Boot is disabled. I ran boot-repair in the advanced settings mode (which was what I thought I was supposed to do in the Step 1 link). Should I run it again? – Steve Jul 26 '13 at 17:19
If you boot Ubuntu in Legacy/BIOS/CSM you will not be able to chainload from grub to Windows as BIOS & UEFI write hardware system info differently for operating system to use. You need to boot Ubuntu in UEFI mode with either Secure boot on or off. Boot-Repair should give the option to fix your install as it can convert a BIOS install to UEFI by uninstalling grub-pc and installing grub-efi. If you have to have secure boot to boot Windows, Boot-Repair can also install shim and signed kernels if you boot it in secure boot mode. – oldfred Jul 26 '13 at 18:43
@oldfred When I boot Ubuntu (my installed version) in UEFI mode with secure boot disabled, I get this error: invalid arch independent elf magic. When I boot it with Secure Boot enabled, I get a system message saying that both Ubuntu and Windows have been blocked from booting, and then I switch to the USB menu. – Steve Jul 26 '13 at 19:02

Fair disclosure: I don't fully understand the mechanics involved. Still, after experiencing a similar nightmare with my laptop, what finally did it for me was realizing that I can't install grub too far into the drive; You don't say what partitioning scheme you tried, so I figured this might be the issue you're experiencing as well.

What I did was keep the UEFI structure intact (or, rather, allowing the Windows installation disc to create a new one from scratch), but I made sure to have a small (200MB) dedicated partition located relatively close to the beginning of the drive (around 400MB into it) which Windows leaves alone. (I can't stress enough, though, that it should still be Windows that partitions the drive. The way I did it, I completely removed the filesystem, then created a 400MB partition, my dedicated partition after it, then erased the original and let Windows do its thing with what's left. I'm sure you could simplify the process somehow, but I was seeing stars by that stage.)

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).

share|improve this answer

I had same problem and i find this program and it fixed dual boot problem.

I try to do in grub comment line. I have done everything wrote on forums. At the end,i download this program and run at terminal.

share|improve this answer

I encountered a similar issue. Windows is installing boot information to a different partition. The solution I found was to boot my installation media and choose repair (to enter the WindowsPE environment.) From there you may access a command prompt with keyboard shortcut shift+f10

I issued the following commands:

bcdedit /enum all

This is listed all the boot information Windows had and where it was located. I determined that Windows had put boot files on another partition "D"

I issued the following command:

robocopy d:\Boot c:\Boot /mir /xf bcd.*

From this point all the information was copied to the correct partition C.

We also need to fix up the {bootmgr} device entry:

bcdedit /store c:\Boot\BCD /set {bootmgr} device partition=C:

You should now be able to boot successfully; reboot and try. I hope this helps someone else.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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