Grub installation problems

1

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?

user57162

Posted 2011-07-18T15:28:37.413

Reputation: 266

You didn't change what last part ? Is it 0d104aff-ec8c-44c8-b811-92b993823444/ ? – Binarylife – 2011-07-18T16:59:13.817

Answers

2

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 .

Binarylife

Posted 2011-07-18T15:28:37.413

Reputation: 519

0

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).

Ambroz Bizjak

Posted 2011-07-18T15:28:37.413

Reputation: 4 265