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.

I have an HP ProBook 5330m with SSD, without CD, and Windows 7. I also installed ubuntu 12.10 and have been dual booting for many months now. Something went wrong and now I can't boot my laptop at all!

The error message is

error: invalid arch independent ELF magic.
grub rescue>

Another problem is that I cannot boot from USB! I tried to create usb startup disks - ubuntu live CD, supergrub, ... but when I configure the USB as first boot sequence, I get the error:

Remove disks or other media.
Press any key to restart

So, I'm really stuck. Any suggestions? How can I recover my system with the grub rescue shell?

share|improve this question

1 Answer 1

Boot into Live CD and run:

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

NOTE:

sdaX-->Here X stands for the partition where you have installed /. If its installed in sda2 then you need to run sudo mount /dev/sda2 /mnt

share|improve this answer

Your Answer

 
discard

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.