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.