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.

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 at 21:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new 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 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 at 0:25

1 Answer 1

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 at 14:24

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