# added a disk -> grub failure.

## pavel.stratil

Hi,

got the following problem: have 1 scsi disk (system) and 1 sata disk (data). for this configuration, i used the following

grub.conf

```

default 0

timeout 5

title=Gentoo Linux 2.6.13 Gentoo r3

root (hd1,0)

kernel (hd1,0)/kernel-2.6.13-gentoo-r3 root=/dev/sdb3 doscsi

```

and device.map

```

(fd0)   /dev/fd0

(hd0)   /dev/sda  # the sata

(hd1)   /dev/sdb  # the scsi system disk

```

This worked fine and dandy. Now I bought another sata disk (same type as the one i already have). So I changed

grub.conf

```

default 0

timeout 5

title=Gentoo Linux 2.6.13 Gentoo r3

root (hd1,0)

kernel (hd1,0)/kernel-2.6.13-gentoo-r3 root=/dev/sdb3 doscsi

title=Alternative

root (hd2,0)

kernel (hd2,0)/kernel-2.6.13-gentoo-r3 root=/dev/sdc3 doscsi

```

and device.map

```

(fd0)   /dev/fd0

(hd0)   /dev/sda  # the sata

(hd1)   /dev/sdb  # the sata

(hd2)   /dev/sdc  # the scsi system disk

```

This resulted into stage 1.5 error 5. I have no clue what to do... the new sata drive has not yet been touched, so no fs/partitions set there (when i'm here i will ask one more thing: how do create partitions on the new disk and format it for ext3? (sorry am a n00b)).

----------

## Telemin

have you tried using the grub-install facility, which will create the devicemap properley for you and tell you axactly how it has designated each disk.

----------

## pavel.stratil

 *freestyling wrote:*   

> have you tried using the grub-install facility, which will create the devicemap properley for you and tell you axactly how it has designated each disk.

 

No not really. the problem is that if i attach the 3rd drive i cant boot at all. and if i dont have the 3rd drive attached then it doesnt have much sense to run grub-install or does it?

----------

## Telemin

boot off the live-cd and chroot in, then run grub-install ^_^

----------

## nlindblad

I've had similiar problems with a motherboard moving the device-order around when connecting new harddrives. As suggested above, use the Live-CD to solve it out by performing a GRUB re-configuration...

----------

## pavel.stratil

 *nlindblad wrote:*   

> I've had similiar problems with a motherboard moving the device-order around when connecting new harddrives. As suggested above, use the Live-CD to solve it out by performing a GRUB re-configuration...

 

well true  :Smile:  it helped. BUT instead of having error 5 in stage 1.5 i got error 15 in stage 1.5  :Smile:  the reason for the error 5 was that i had no partition/fs on the new drive. The new error precisely said:

```
GRUB loading stage1.5

GRUB loading, please wait ...

Error 15
```

soo a different kinda problem. i checked out what written online ... the forum says that its usually because the path to the kernel image and the grub.conf entry dont match. but the examples showed a slight difference on what GRUB says in such a case (displays a few lines from grub.conf, in my case this didnt happent, obviously).

But i rechecked the paths. i also checked the mapping.. i guessed it correctly:

/dev/sda old sata (hd0)

/dev/sdb new sata (hd1)

/dev/sdc scsi (hd2)

well. again i am clueless... could any1 help?

----------

## jmbsvicetto

Hi.

If you get the error before getting the GRUB menu, that most likely means that you have an error with the splashimage line.

Since you've moved your partitions, post your grub.conf file and the output of fdisk -l.

----------

## pavel.stratil

 *jmbsvicetto wrote:*   

> Hi.
> 
> If you get the error before getting the GRUB menu, that most likely means that you have an error with the splashimage line.
> 
> Since you've moved your partitions, post your grub.conf file and the output of fdisk -l.

 

Hi, i have the splashimage disabled. My old as well as new grub.conf have been posted in my first post.

and the fdisk -l from the lifecd:

```

Disk /dev/sda: 400.0 GB, 400088457216 bytes

255 heads, 63 sectprs/track, 48641 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

     Device  Boot    Start          End          Blocks  ID   System

/dev/sda1               1           48641     390708801  83   Linux

Disk /dev/sda: 400.0 GB, 400088457216 bytes

255 heads, 63 sectprs/track, 48641 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

     Device  Boot    Start          End          Blocks  ID   System

/dev/sda1               1           48641     390708801  83   Linux

Disk /dev/sdc: 36.7 GB, 36703934464 bytes

255 heads, 63 sectprs/track, 4462 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

     Device  Boot    Start          End          Blocks  ID   System

/dev/sdc1     *         1             9           72261  83   Linux

/dev/sdc2              10           321         2506140  82   Linux swap / Solaris

/dev/sdc3             322          4462       33262582+  83   Linux

```

found out an interesting thing.. when i boot the old way, only with one sata+one scsi, then when i use the new disk, i get a blank screen with an _ blinking. with the old sata disk it boots fine.

----------

## jmbsvicetto

 *pavel.stratil wrote:*   

> ...
> 
> Hi, i have the splashimage disabled. My old as well as new grub.conf have been posted in my first post.

 

OK. Then that's not the problem. I'm sorry, but I didn't notice that.

 *pavel.stratil wrote:*   

> 
> 
> and the fdisk -l from the lifecd:
> 
> ```
> ...

 

Well, my first comment is that you must have something wrong as you definetely cannot have 2 /dev/sda disks on your system!!! Second, your SCSI disk has become /dev/sdc, therefore (hd2) as you stated, but you didn't updated GRUB accordingly.

Try using the following /boot/grub/grub.config file, assuming that you boot from the first SATA disk.

```
default 0

timeout 5

title=Gentoo Linux 2.6.13 Gentoo r3

root (hd2,0)

kernel kernel-2.6.13-gentoo-r3 root=/dev/sdc3 doscsi

#title=Alternative

#root (hd2,0)

#kernel (hd2,0)/kernel-2.6.13-gentoo-r3 root=/dev/sdc3 doscsi 
```

To install GRUB into the first SATA disk do the following

```
# grub

grub> root (hd2,0)

grub> setup (hd0)

grub> quit

#
```

There's no reason to use the "Alternative" boot menu as you didn't create any new /boot filesystem. Unless you want to be able to boot from the second SATA disk.

----------

## pavel.stratil

Ooops.. sorry.. i did some indentation changes with the fdisk output and i probably incidently deleted the b in sdb and changed it for an a. once again, sorry..

but the rest.. i have to disagree. Let me reexplain:

SCSI 36.7GB: 3 partitions (boot, swap and root)

SATA 400GB (old): mounted to /mnt/data1

SATA 400GB (new): to be mounted to /mnt/data2

having the alternative boot sequence in grub.conf had this reason: it didnt boot imediately with 3 disks so i had two possibilities, one with the new disk attached - 3-disk setup (alternative.. please note that there are correct (hd2,0) and sdc3 entries!), and the old (Gentoo Linux 2.6.13 Gentoo r3) 2-disk setup. this started grub perfectly well to the 2 disk setup even when i had default 1 (=the 3disk boot sequence was default.. naturally i had to switch in the menu to "Gentoo Linux 2.6.13 Gentoo r3" to continue booting the system).

i tried your

```
default 0

timeout 5

title=Gentoo Linux 2.6.13 Gentoo r3

root (hd2,0)

kernel kernel-2.6.13-gentoo-r3 root=/dev/sdc3 doscsi

```

with nothing else in the grub.conf. Ended up with a blinking cursor and not even an error message from grub. As for the other solution, I dont want to install grub into the sata drives, i want to keep it on the scsi drive. this is because i swap disks between machines from time to time. Having a sata disk with a boot record, would disrupt the machine i put the sata disk in because all the machines i run have a scsi system+boot drive and sata disks to store data.

Also, how would you then explain the fact that the system doesnt boot if i use the old grub.conf but instead of using old sata+scsi i use new sata+scsi... the new sata disk has the same partitioning, same fs, and i wrote some test data onto it without errors when booting from lifecd.

----------

## jmbsvicetto

 *pavel.stratil wrote:*   

> Ooops.. sorry.. i did some indentation changes with the fdisk output and i probably incidently deleted the b in sdb and changed it for an a. once again, sorry..

 

No problem, but now it makes sense.

 *pavel.stratil wrote:*   

> but the rest.. i have to disagree. Let me reexplain:
> 
> SCSI 36.7GB: 3 partitions (boot, swap and root)
> 
> SATA 400GB (old): mounted to /mnt/data1
> ...

 

I hadn't quite understood your configuration.

So, you have GRUB installed in your SCSI disk, right? You've reinstalled it, when you created the new config for the 3 disks, with all disks connected, right? Afterwards, it stopped working with the old config and only works with the newer one, right?

----------

## pavel.stratil

 *Quote:*   

> I hadn't quite understood your configuration.
> 
> So, you have GRUB installed in your SCSI disk, right? You've reinstalled it, when you created the new config for the 3 disks, with all disks connected, right?

 

sofar right..

[/quote]

 Afterwards, it stopped working with the old config and only works with the newer one, right?[/quote]

not quite. the old config had only the boot sequence named "Gentoo Linux 2.6.13 Gentoo r3".

after adding the new disk, i added the bootequence "Alternative" and set "default 1", so it should be using

the "Alternative boot sequence" which is written for booting the 3disks system.

The problem is:

when I have the 3rd disk attached, grub wont even load that far to show me the menu to select which boot sequence to use. When I used my grub.conf with the two boot sequences active, i got a stage 1.5 error 15.

when I used your suggestion (i commented out the boot sequence "Gentoo Linux 2.6.13 Gentoo r3" which was ment for the 2disks setup), grub didnt even loead that far to show an error (ended up with a blank screen with cursor blinking before grub even said anything).

So I can boot the old way to a two disk system when i physically unplug the 3rd drive. When i plug the 3rd drive in, i dont boot..

----------

## pavel.stratil

 *pavel.stratil wrote:*   

>  *Quote:*   I hadn't quite understood your configuration.
> 
> So, you have GRUB installed in your SCSI disk, right? You've reinstalled it, when you created the new config for the 3 disks, with all disks connected, right? 
> 
> sofar right..
> ...

 

----------

## jmbsvicetto

OK. If I understood everything, the problem is that GRUB is configured to work as (hd1) and when you connect the 3rd disk it becomes (hd2) and so it blows.

My first suggestion is that if you want to have your SCSI disk as the boot disk, you must tell the BIOS to boot from the SCSI disk and set it to look at SCSI before looking at the SATA disks. The purpose is to have your SCSI disk as (hd0), that way, you can connect and disconnect SATA disks without affecting GRUB.

Then, you also need to convince udev to call your SCSI disk /dev/sda. That way, your root partition will always be /dev/sda3.

----------

## pavel.stratil

 *jmbsvicetto wrote:*   

> OK. If I understood everything, the problem is that GRUB is configured to work as (hd1) and when you connect the 3rd disk it becomes (hd2) and so it blows.

 

basically thats it..

 *jmbsvicetto wrote:*   

> My first suggestion is that if you want to have your SCSI disk as the boot disk, you must tell the BIOS to boot from the SCSI disk and set it to look at SCSI before looking at the SATA disks. The purpose is to have your SCSI disk as (hd0), that way, you can connect and disconnect SATA disks without affecting GRUB.

 

well that was the first thing i thought of. unfortunatelly, it's either not a bios level thing or there can be nothing done about it.. i tried 1. having the sata disks disabled to boot, 2. enable to boot on sata but place them after scsi. none did a diference.

 *jmbsvicetto wrote:*   

> Then, you also need to convince udev to call your SCSI disk /dev/sda. That way, your root partition will always be /dev/sda3.

 

nice try  :Smile:  but unless you tell me how, that won't help. i am not stupid but i run gentoo as my first linux distro and do that for about 3 month so dont expect anything special from me  :Wink: )

----------

