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

This question already has an answer here:

I installed Ubuntu 12.04. I erased a GRUB file by mistake, now grub rescue doesn't let me do anything. I used Boot Repair, and now my PC is stuck at:

error: invalid arch independent ELF magic.
grub rescue>

I used Boot Repair, but it looks like my laptop can't detect my USB drive, also I can't access the BIOS.

share|improve this question

marked as duplicate by karel, Eric Carvalho, Luis Alvarado Jul 24 '14 at 21:10

This question was marked as an exact duplicate of an existing question.

Please make an effort to communicate with us, it is hard to read. OTHERWISE : Your informations aren't lost. Even if your PC was broken, you could get them back by plugin your HDD inside another PC running Windows or Linux. I'll let others help you with your boot issue, but please edit your post to clean and rewrite it. – MrVaykadji Mar 22 '14 at 0:21
Sorry, I will edit it right now, Im very desesperated that every solution of this page doesnt fix my computer!!! – Renji94 Mar 22 '14 at 0:25

If you can boot from a cd which logically you must've had to do when you installed you can download a supergrub cd which will allow you to boot into your ubuntu installation. From there just run:

sudo grub-install /dev/sda
sudo update-grub
share|improve this answer
Actually sudo command doesnt work, it says unknown command 'sudo', and i checked the dev folder and there is not a sda file – Renji94 Mar 22 '14 at 14:24

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