I bought a new laptop with Windows 8 pre-installed and I tried to make it dual boot like my windows vista laptop with Ubuntu. Turns out because of some boot sector changes its really complicated now!

Ubuntu installed fine, but it wouldn't boot up windows anymore. After reading a new threads on here about people with the same problem, I Installed and ran the Boot repair software (https://help.ubuntu.com/community/Boot-Repair)

After going through the instructions, I rebooted my computer and it gave me a "Grub Rescue" screen saying

 error: invalid arch independent ELF magic.
 grub rescue>

I am running Ubuntu from the live cd now...and have tried to fix that problem by running

sudo mount /dev/sda1 /mnt 
sudo grub-install --root-directory=/mnt /dev/sda

This ended up booting in the "grub" window where it allows me to type some rudimentary commands.

Can anyone help me fix my computer and get back to 1. Ubuntu booting up! 2. Dual boot with my windows which is still installed

Here is the pastebin that Boot-repair gave me to write down after the installation: http://paste.ubuntu.com/5835513

1 Answer 1


First thing you need to make sure that secure boot is disable in bootloader. After that make changes in boot option and select legacy option. The default one is UEFI. Now insert bootable device whether it's pen drive or cd or DVD. Press F12 and it will show you set of options. Select cd or DVD or pen drive under UEFI mode. Be cautious don't even do mistake in this selection. Don't select it under Legacy option. Ubuntu installation screen will appear within few minutes. Go through it and reach till disk partition page. If this doesn't show you anything don't be panic!! calm down, This means you have to remove dmraid from your installation setup. For that start Ubuntu installation from begining and select "Try Ubuntu" instead of "Install Ubuntu". It will start within few minutes and show you the desktop screen from there select open Terminal. And type. "sudo apt-get remove dmraid" It will remove raid metadata which allows disk to be visible at disk partition page.

Make sure that the partition file system you wish to install Linux, Ubuntu or Backtrack on it is ext4, ext3 or ext2, and not FAT32 or NTFS.

Then mount / on it:

During the installation process press "change" on the partition you wish to use

Make sure "do not use this partition" scroll is not chosen, scroll to ext4, ext3 or ext2

On the "mount" field write /

Click ok, then next a message will appear saying something like "swap area was not defined, do you wish to continue or choose a swap area?", click "ok" and continue or click "go back" and choose another partition and click change, on the file system scroll choose "swap" and click "ok" and next

This will solve both "no root file system is defined" and the "swap area" message, if you still get the swap area message then on step 4 mount /swap to the partition.

At the end select device for boot loader as whole hard disk. e.g. Suppose 500 GB or something.

Create and Keep 100 MB for grub boot something.

Identifying if an Ubuntu has been installed in EFI mode An Ubuntu installed in EFI mode can be detected the following way:

its /etc/fstab file contains an EFI partition (mount point: /boot/efi) it uses the grub-efi bootloader (not grub-pc) from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command: [ -d /sys/firmware/efi ] && echo "Installed in EFI mode" || echo "Installed in Legacy mode"

Converting Ubuntu into EFI mode Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.

If you do not see a "Separate /boot/efi partition" line, this means that your PC does not have any EFI partition. In this case, exit Boot-Repair, then create an EFI partition (see the "Creating an EFI partition" paragraph above). If you see a "Separate /boot/efi partition" line, tick it then click the "Apply" button. Set up your BIOS so that it boots the HDD in EFI mode (see the ""Set up the BIOS in EFI or Legacy mode" paragraph above).

Check that in a set of listed partition you have one windows partition with EFS type and which is basically boot for windows. Keep one thing that you only have one EFS partition in system.

Also follow boot-repair on How do I Dual Boot Windows 8 UEFI and Ubuntu 12.10?

After installation restart system, press F12 and select Ubuntu under EFSI boot option.

Curtesy by:

"No root file system is defined" error during installation

Dual Booting Pre-installed Windows 8

Installing Ubuntu Alongside a Pre-Installed Windows with UEFI


How can I Install ubuntu on a pc preinstalled with Windows 8?


  • I don't have EFSI mode, I have UEFI mode. I set the default to Legacy and booted it with the CD and pressed F12. I got a bunch of options but none of them were "Install Ubuntu with UEFI mode"
    – user171943
    Commented Jul 2, 2013 at 9:52
  • Oh yeah by mistake I had written EFSI but it's not that it is UEFI. You are right. From there you have to select cd or DVD whatever device you are using for installation under UEFI mode
    – Jay
    Commented Jul 2, 2013 at 11:27
  • why does the first step says to set it as "LEGACY" mode then?
    – user171943
    Commented Jul 2, 2013 at 12:56
  • I had tried it with UEFI but in that my system was not able to detect Ubuntu. So I had read somewhere that in order to make preinstalled system dual boot one should have to set boot mode as Legacy and then select device under UEFI. By the way have able to dual boot successfully??
    – Jay
    Commented Jul 2, 2013 at 14:34
  • No..right now i can't boot any of them..it just goes to grub window. I don't understand what you are saying tho. If i set boot mode as legacy...there is no way of changing it when i press F12 and ubuntu options are brought up. The boot option can only be changed at the BIOS settings and it can either be legacy or UEFI. I can't set it as legacy and select UEFI somewhere else
    – user171943
    Commented Jul 2, 2013 at 15:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .