Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was trying to reinstall Grub over my new Windows installation referring to this guide.

Unfortunately on the step where they said to enter this command:

sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444/boot /dev/sda

I did not change the last part. So while my system reserved partition is /dev/sda1 my entire partition was /dev/sda!

Now when I try to startup all I get is the Grub terminal. However I observe using GParted that the partitions do still exist.

Is there any way that I can retrieve everything?

share|improve this question
    
You didn't change what last part ? Is it 0d104aff-ec8c-44c8-b811-92b993823444/ ? –  Binarylife Jul 18 '11 at 16:59
add comment

2 Answers

up vote 2 down vote accepted

I'll assume you did this using a live CD or a live USB.

You can simply run the Live CD/USB again and using the instructions below:

1.Mount your Ubuntu Partition as in this picture: enter image description here

2.Now you need to verify and copy one thing; run mount | tail -1 in a terminal

You should see output similar to this:

/dev/sda2 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)

You will need to copy the UUID number which appear in bold in: /media/0d104aff-ec8c-44c8-b811-92b993823444.

3.Now replace The UUID Number you have copied above in this command :

sudo grub-install --root-directory=/media/**UUID** /dev/sda and without /boot

Note:: /dev/sda is your drive, and it is not the problem , the problem is in the UUID number which the partition of Ubuntu. Grub must be installed in /dev/sda .

share|improve this answer
add comment

I believe grub resorts to command line because it cannot find the grub.cfg file.

This is probably because your command line is wrong. Seeing that you use Ubuntu 10.10, you are using --root-directory (rather than --boot-directory) as your guide says you should, but you are specifying the boot directory. You have to specify the root directory (without /boot).

share|improve this answer
add comment

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.