3

After installing Ubuntu 11.10 on a pc which already has Windows 7 I get this error:

error: invalid arch independent ELF magic.
grub rescue>

So I used Supergrub boot disk to get into Ubuntu. And made sure that grub-efi-amd64 package is present, and I ran sudo grub-install /dev/sda command. That also led to the same error. Then I tried the solution given here and here. That also gave same error. fdisk -ul /dev/sda shows that boot partition (/dev/sda1) is a msdos partition. /dev/sda6 is root partition and /dev/sda9 is the home partition. So, how can I solve this issue?

1
  • Please update: mark an answer accepted if it worked or edit the question to say you gave up?
    – Krista K
    Jun 19, 2012 at 19:16

2 Answers 2

2

It's been almost four months, but if you still need a solution, my recommendation is to switch to a different boot loader. In my experience, GRUB 2 (which Ubuntu uses by default) is the least reliable of the common EFI boot loaders for Linux. Given that you're dual-booting with Windows, you're probably best off with either Fedora's patched GRUB Legacy or a combination of ELILO and either rEFInd or rEFIt. Of these, you can do the combination of ELILO and rEFIt using Ubuntu packages, but you'll need to do some manual configuration, and Ubuntu's rEFIt package has some bugs on UEFI-based PCs. (It works better on Macs.) Thus, you'll probably have to go beyond the packaging system to manually download either GRUB Legacy or rEFInd.

1
  • Wow, finally got my new PC to work again after installing rEFInd. New Core i7, didn't even boot to windows, just using a new separate SSD with 12.04 fresh install. OEM HDD not even plugged in. This is an epic fail on Ubuntu's part. :( They should pay you for UEFI support.
    – Krista K
    Jun 19, 2012 at 20:49
1

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!

You must log in to answer this question.

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