11

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 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?

9

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.

  • It's not clear, why do we need to mount those sda3 and sda1? Which one does have the Ubuntu OS – kenn Jan 13 '19 at 17:57
  • Just for clarity for less knowledgeable users like me: in this scenario, "sda3" represents the partition your OS is on, and "sda1" is your boot partition, yes? I have the following results when I run fdisk -l: Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 7814035455 7814031360 3.7T Linux filesystem ... in the above, would I mount sda2 as /mnt, and sda1 as /mnt/boot? – JeanSibelius Jun 4 '19 at 10:34
3

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!

0

I used the boot repair option in System Tools (I think) that was there after booting live CD/USB. Go online first (settings/WiFi) then run the repair using defaults. Worked fine for me using Zorin 15.

Well. After updating 15 (suggested updates this is new install), boot failed again with different grub error, so ran boot repair again. Said repair failed but started eventually after a few errors then second restart was normal after complete shutdown although I get an error about a theme file missing.

I'm dual booting Win 10 on an SSD (which still works ok for now until the next Win update screws it again..

Hoping that this isn't a regular thing after every Zorin update!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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