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

Possible Duplicate:
GRUB: “invalid arch independent ELF magic” after install on SSD

I am currently trying at get an dual boot computer work, where the Ubuntu 12.04 system is spread over two drives.

The setup of the two drives are:


/dev/sda1 /boot/efi

/dev/sda2 some unknown msftres at 128MB (dont bother about this as long as the rest works)

/dev/sda3 windows7

/dev/sda4 /home

/dev/sda5 swap

/dev/sda6 /tmp

/dev/sda7 /var


/dev/sdb1 /

In an attempt to combine speed with SDD survival. Now, that might be a topic in itself, but for now I would be very happy just to get the Grub bootloader to work.

When booting at either HDD or SSD, I get: error: invalid arch independent ELF magic. grub rescue>

Very grateful for all kinds of suggestions for how to solve this!

share|improve this question

marked as duplicate by jokerdino, devav2, Jorge Castro, Ringtail, Anwar Shah Oct 15 '12 at 6:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Unlike the above, where / and /boot were on separate partitions, yours is all on /dev/sdb1, is that correct? Are you booting from the hard disk or from the SSD? – John S Gruber Oct 14 '12 at 15:31

I had the same problem “invalid arch independent ELF magic”.

I was installing from a USB stick booted from the Bios in UEFI mode.

After a couple a couple unsuccessful reinstallation of 12.04,I tried the same installation with the the USB stick booted without the UEFI mode and it works.

For your information my setting on a 120GB SSD

sda1 /windows 90 GB windows 7 64bits

sda2 /boot 100 MB

sda5 swap 1 GB

sda6 / 18GB ubuntu 12.04

sda7 /home 8GB

My motherboard is P8P67 Pro with Asus EZbios and I had two choices in my boot menu for the USB with 12.04 installation.

Hope it helps!

share|improve this answer
Fixed the elf arch magic problem for me. The installer then failed with migration assistant but that's separate. – kikixx May 6 '12 at 13:40

I have fixed the same problem with Backtrack on VMware the boot was broken after installing vmware tools.

I used the following commands :

sudo mount /dev/sda1 /mnt


sudo grub-install --root-directory=/mnt /dev/sda
share|improve this answer

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