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

I just got over with installing Ubuntu 13.04 on my Asus laptop from a USB stick. After the installation finished and the computer restarted, it started up with a GRUB: invalid arch independent ELF magic error. I looked around on Google to find out a solution and found Cadoc's thread GRUB: “invalid arch independent ELF magic” after 11.10 install on Macbook Pro 5,5 and followed the solution up to the line

sudo grub-install --root-directory=/mnt /dev/sda

When I typed that command, I got

/usr/sbin/grub-bios-setup: Not found.

and I couldn't find any solution for that after some searching on Google. So what do I have to do to fix that and get thing going fine?

share|improve this question

If `grub-bios-setup' is not found, you probably have a EFI mode installation of Ubuntu.

[ -d /sys/firmware/efi ] && echo "Installed in EFI mode" || echo "Installed in Legacy mode" 

If this is not the case, something went really bad during installation. You can try using boot-repair to fix your problem.

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)
share|improve this answer
It turned out that my installation wasn't in EFL mode, so I'm going to try second solution. There's only one thing, where should I enter the two lines you provided? I mean in which directory do I have to be, considering that I am booting from a USB stick. – arsaKasra Aug 2 '13 at 21:44

Looks like a bad grub install. If you can boot using the USB Drive into a Live ISO mode (the "try Ubuntu" option), you should be able to re-install grub and get the system up and running. Check to see if your BIOS uses UEFI as well.

See this link.

Have a nice day.

share|improve this answer

Your Answer


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.