Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am stuck with a rather irritating problem I ran into after installing 11.10 on my macbook pro 5,5.

I did a clean install efi booting into the setup using the desktop cd. Upon the first reboot I was presented with the "invalid arch independent ELF magic" and grubs rescue console.

I have read GRUB: "invalid arch independent ELF magic" after Natty install on SSD but the solution is no solution for me since installing grub via live cd only means installing the mbr version and I can't seem to find any manual on how to install grub-efi while booted into the live cd.

So my question is: How can I either edit the grubx64.efi file in my EFI Partition, reinstall grub-efi with a live CD / DVD or use grub rescue commands to fix this issue?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

The solution for me was (and probably for anyone having that problem):

Boot into the live cd and type into the terminal (of course you must edit the mounting operations respecting your own partition table):

sudo apt-get install grub-efi-amd64
sudo mount /dev/sda3 /mnt
sudo mount /dev/sda1 /mnt/boot 
sudo grub-install --root-directory=/mnt /dev/sda

Now grubx64.efi should boot without any problems.

Running update-grub while booted into ubuntu restored the more eye friendly looks of the grub boot menu.

share|improve this answer
add comment

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
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 choice in my boot menu for the USB with 12.04 installation.

Hope it helps!

share|improve this answer
add comment

Your Answer

 
discard

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.