# Solved: Guides for restoring GRUB not working



## deadscenekid (Apr 26, 2006)

I have used multiple different guides for restoring and re-installing GRUB when accidentally deleting it.

At the moment I have Windows 7 Ultimate on my Master HDD and LinuxMint 8 on my Slave HDD.

After reading quite a few guides, all of them say "Boot from Live CD, open Terminal, type sudo grub, then type "find /boot/grub/stage1""

Well, I have done this multiple times and for some reason, when I type "find /boot/grub/stage1", I get an error which says "Error 15: File not found"

Oh, I have also read that you have to mount the HDD where Linux is located, which I did. :]

Any help would be appreciated; as I am quite lost.

*EDIT* I figured it out, I just needed any file within /grub for it to find and it found it and now I have another problem, then next step in all the guides is 
"type root (hd#) then setup (hd#)"

Well, I do that and it gives me "Error 17: Cannot mount selected partition."

Oh, and just so you might know, half of this drive is NTFS partition and the other half is LinuxMint

*EDIT 2*: Got it to mount and now terminal is saying "Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... no, Error 15: File not found"

*EDIT 3*: Well, I just took things into my own hands and did this: "sudo mount /dev/sdb5 /mnt" and then "sudo grub-install --root-directory=/mnt hd1,4" and it installed and then I did "setup (hd1,4)" and it set it up, but still not working...any ideas anyone?


----------



## saikee (Jun 11, 2004)

If you set up Grub in (hd1,4) successfully and Grub reports no error then your Grub has been installed in the 5th partition of the second hard disk as Grub counts from 0 (version1 Legacy Grub only that uses menu.lst).

This Grub can be booted by another operating system but cannot boot itself.

To boot itself the setup needs to be in the whole of the first bootable disk and that is "setup (hd0)".

If you still have a problem post the output of 

```
sudo fdisk -l
```
 here.


----------



## deadscenekid (Apr 26, 2006)

Since I can't get into Windows, I'm not sure how I would boot it from there.

Here is the output from

```
sudo fdisk -l
```


```
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x13c703b5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1306    10485760   27  Unknown
/dev/sda2   *        1306       19458   145803096    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3b9a22c7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       50372   404613058+   7  HPFS/NTFS
/dev/sdb2           50373       60801    83770942+   5  Extended
/dev/sdb5           50373       60371    80316936   83  Linux
/dev/sdb6           60372       60801     3453943+  82  Linux swap / Solaris

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb3ea99a5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      108468   871269178+   7  HPFS/NTFS
/dev/sdc2          108469      121601   105490822+   5  Extended
```
*EDIT*: I fixed it. :] Thanks for your help. I fixed it by doing 

```
root (1,4)
```
then used:

```
setup (hd0)
```
Thanks for your help, saikee.


----------



## saikee (Jun 11, 2004)

You have 3 disks of sizes 160Gb, 500Gb and 100Gb known to Linux as devices sda, sdb and sdc.

My guess of your first bootable MS system is in sda2 as it has been marked bootable. This should be known to Grub as (hd0,1).

If that is the case these lines added into the /boot/grub/menu.lst will fire it up

```
title MS system in sda2 known to Grub as (hd0,1)
root (hd0,1)
chainloader +1
```


----------

