12

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?

0

4 Answers 4

10

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.

2
  • It's not clear, why do we need to mount those sda3 and sda1? Which one does have the Ubuntu OS
    – kenn
    Jan 13, 2019 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? Jun 4, 2019 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!

0

I had this problem after doing a fresh install of 20.04 on a DELL E5510.

The first messages were GRUB complaining the drive was encrypted. Then after another reinstall, I got the invalid arch message.

After several hours: 1. I switched my BIOS to UEFI and booted Live CD. 2. Ran Boot-Repair on my HDD. Boot repair then removed GRUB and installed grubx64.efi file. (Boot Repair wouldn't run unless I booted the Live CD in UEFI.)

  1. Computer still complained "no bootable drive". Went back in to BIOS and had to point the UEFI interface to grubx64.efi. Prior to that, it was looking for shimx64.efi.

Hopefully you don't spend 2 days as I did.

You must log in to answer this question.

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