Recovering GRUB in Ubuntu 8.10

Asked by Ramesh

I have installed Ubutnu and Windows . I formatted Windows XP and I was unable to boot Ubutnu . I tried a few to recover GRUB but I was unable to restore it. Please help me..!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
zvacet
Solved:
Last query:
Last reply:
Revision history for this message
Ramesh (ramesh-iit19) said :
#1

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00310031

   Device Boot Start End Blocks Id System
/dev/sda1 1 3070 24659743+ c W95 FAT32 (LBA)
/dev/sda2 3071 8294 41961780 f W95 Ext'd (LBA)
/dev/sda3 8295 9696 11261565 83 Linux
/dev/sda4 9697 9729 265072+ 82 Linux swap / Solaris
/dev/sda5 3071 4376 10490413+ b W95 FAT32
/dev/sda6 4377 5682 10490413+ b W95 FAT32
/dev/sda7 5683 6988 10490413+ b W95 FAT32
/dev/sda8 6989 8294 10490413+ b W95 FAT32
ubuntu@ubuntu:~$ sudo grub

Revision history for this message
Ramesh (ramesh-iit19) said :
#2

grub> root (hd0,3)

grub> setup (hd0)

Error 17: Cannot mount selected partition

grub>

Revision history for this message
Best zvacet (ivicakolic) said :
#3

Read http://ubuntuforums.org/showthread.php?t=224351.I think your ubuntu is on (hd0,2) because grub count from 0 not from 1.

Revision history for this message
pablitofuerte (pablitofuerte) said :
#4

As zvacet said grub uses a different nomenglature than fdisk (grub = fdisk -1) to identy partitions. It should be:
 $ sudo grub

1. grub> find /boot/grub/stage
    ** Search the root partition (/):
2. grub> root (hd0,2)
    ** hd0,2 ; or the result of the first step (find)
3. grub> setup (hd0)
4. grub> quit

Revision history for this message
Ramesh (ramesh-iit19) said :
#5

grub> setup (hd0)

The command shows error as ,

Error 17: Cannot mount selected partition

Revision history for this message
zvacet (ivicakolic) said :
#6
Revision history for this message
Ramesh (ramesh-iit19) said :
#7

Thanks zvacet, that solved my question.