0

i was unaware my friend installed ubuntu on my machine until now because im suddenly getting a grub rescue error. all i did yesterday was turn the machine on, check email and turn it off. Today it wont start and im getting the grub rescue error. From what ive been able to understand so far with my limited knowledge of this situation is i need to install ubuntu on a thumbdrive since i dont have a disk, but from there i have no idea how to access it from the thumbdrive and fix this problem. I'd also like someone to confirm that files won't be lost before doing this fix attempt. (windows 7 as my main OS)

1 Answer 1

0

I assume you want to be able to boot both Windows 7 and Ubuntu, right?

In GRUB rescue mode, execute the following command:

ls

It will list all your drives and partitions, like:

(hd0) (hd0,msdos2) (hd0,msdos1)

If you don't know your Ubuntu boot partition, check them one by one:

ls (hd0,msdos2)/
ls (hd0,msdos1)/

When you hit the right one, you'll get a line mentioning "lost+found" an so on.

Assuming (hd0,msdos2) is the right partition, execute these commands one-by-one:

set prefix=(hd0,2)/boot/grub
set root=(hd0,2)
insmod normal
normal

Now you'll be able to boot into Ubuntu. Once you do, look for "Terminal" application & execute the following commands from the command line:

sudo update-grub
sudo grub-install /dev/sda

None of the above can damage data on your Windows partition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .