# [SOLVED (somehow)] Grub: STRANGE errors,cant install on sata

## Seelenfeuer

Hello again... (I somehow dislike having to open a new topic ^^ )

After my second hd gave up and my first hd's filesystem (just a sidenote: reiser4!) was twisted while rescuing what was left on the second hd i decided to do a complete fresh install (again... -.-). The new hd i bought is an 160gb sata drive. 

Up till now the installation went smooth, i have a (imo) nice partition layout, a good fs choice and so on. But now it comes to grub and i'm totally (i mean TOTALLY) clueless:

My hd is divided into 4 parts:

----------

- sda1 (boot   ) with 32mb and ext2

- sda2 (swap  ) with 1gb    and swapfs

- sda3 (/        ) with 59gb  and reiser4

- sda4 (media) with 100gb and xfs

----------

There is another normal ide hd which will be used for backups. There is some kind of bug in grub which makes it detect the ide drive as hd0, even if it is not the boot drive. I manually changed the entry in the device.map file, i think that should be ok.

The real problem is: when i run grub-install /dev/sda i get the following error:

```
grub> root (hd1,0)

 Filesystem type is ext2fs, partition type 0x1

grub> setup  --stage2=/boot/grub/stage2 --prefix=/grub (hd1)

 Checking if "/grub/stage1" exists... yes

 Checking if "/grub/stage2" exists... yes

 Checking if "/grub/e2fs_stage1_5" exists... yes

 Running "embed /grub/e2fs_stage1_5 (hd-1214190148)"... failed (this is not fatal)

 Running "embed /grub/e2fs_stage1_5 (hd-1214190148,-1214190672)"... failed (this is not fatal)

 Running "install --stage2=/boot/grub/stage2 /grub/stage1 (hd-1214190148) /grub/stage2 p /grub/menu.lst "... failed

Error 0: Error while parsing number

grub> quit
```

As i said before, i have absolutely NO idea what to do about it.... i maybe could use lilo, but 1st it would be much nicer to solve this and 2nd i like grub more ^^

before i forget, there are some more really strange things:

1) on the second hd there is still an old boot partition with ext2fs. when i check it with fsck from the livecd (sabayon linux because of the reiser4 support) everything is fine, but from the chroot it is detected as xfs Oo i already wrote the partition table new, this behaviour stays....

2) if i try to install grub manually (through the grub shell) grub doesnt recognize ANY partition! i.e. i tried root (hd+TAB+and it completes to '(hd12' (without the second bracket) and gives the error "Error 5: Invalid device requested". if i type root (hd1) without shell-completion i get "Filesystem type unknown, using whole disk".

any help is greatly appreciated......!

Regards & Thx in advance

Seelenfeuer

ps: i already tried grub 0.96 instead of 0.97, no difference...

----------

## pteppic

I've always done manual installs with grub so:-

```
hd(12
```

Yeah, grub hates it over hd7

```
root=(hd1)
```

Shouldn't that be root (hd1,0)?

Grub gave me real grief the other day with 1 sata and 1 pata drive, try taking the ide drive out and trying manual install again.

----------

## Seelenfeuer

 *Quote:*   

> Shouldn't that be root (hd1,0)? 

 

damn, okay XD following this it gives the same thing as grub-install (sounds logical o.o)

ill try out that thingy with the ide-drive...no reason to run away  :Wink: 

ILL - BE - BACK  :Cool: 

----------

## Seelenfeuer

Ok, removed the ide-drive, no difference... i think for now ill boot from the second (ide) hd (if possible o.o ) until someone finds a solution... maybe someone could imagine why the hd suddenly gets this strange id (hd-1214190148)? I noticed it even changes..... Oo *sigh* i somehow trigger always those problems noone else has ^^ well, good night everybody, ill surely write again...

Regards

----------

## pteppic

If you read the grub info page (not being rude, I just can't remember the syntax) you can boot from grub on the mbr of the second drive, but use the boot partition of the sata drive as if it was booting the system, I think is the 'map' command.

----------

## Seelenfeuer

hm... well, that sounds interesting (and at least a bit better thant having the whole boot partition on the second drive...), ill try out and report tomorrow!  :Smile: 

Good night (this time for sure ^^ )

Seelenfeuer

----------

## NeddySeagoon

Seelenfeuer,

Lets start at the beginning. Grub does not detect hard drives, it asks the BIOS about them, thats why grun knows all drives as hdX, it has no idea how drives are connected. From this, it follows that only drives the BIOS can see are bootable and detection order is BIOS dependant too.

It gets worse. Some BIOSes always report to grub that the drive you boot from is hd0, this means that grub drive numbering may not be fixed for you.

Can your system boot from SATA, if not, grub cannot see the drive either?

----------

## Seelenfeuer

I now switched to lilo, though it requires a little more effort i think it should be sufficient, but for now it works and im just happy ^^ if there is someone who wants to further scrutinize this case im willing to help. Thx to everybody for the support!  :Smile: 

Regards

Seelenfeuer

----------

