# Have created RAID1, but can't put grub on to it![solved]

## Unclethommy

Hi there, 

I have recently got hold of an adaptec RAID 2400A controller and have created a RAID1 to use for my file system. Everything went okay and I created the usual three partitions (/boot, swap and /). But when it comes to getting grub onto the MBR of the drive. It doesn't want to. The RAID1 appears in Knoppix as /dev/sda. So I normally would do 

```
grub-install --no-floppy /dev/sda
```

in the chrooted environment. But it complains saying it can't open the device...

I have made sure that the boot flag is on for the /boot partition and don't know why it refused to write to the disk....

Would anyone have any ideas?

I have to dual boot with another drive (not raid, but a SATA disk) so would it be better to just install grub on that drive and reference the gentoo installation from there?Last edited by Unclethommy on Thu Jan 31, 2008 8:30 am; edited 1 time in total

----------

## andreas_st

Did you mount /proc and /dev in the chroot environment?

What is the output of 

```
ls -l /dev/sda
```

----------

## Unclethommy

hi there, I mount both /proc and /dev with 

```
 mount -o bind /proc /mnt/gentoo/proc
```

before I chroot, like in the alternative installation guide.

When I am chrooted, ls -l shows what seems to be two drives sda and sdb with the same partitions. When I try to install grub to either, it says 

```
/dev/sda does not have any corresponding BIOS driver
```

Do I need to compile the driver which allows me to see the RAID1 (i2o_scsi) as a module in the system I am chrooted in or something?Last edited by Unclethommy on Mon Jan 28, 2008 2:38 pm; edited 1 time in total

----------

## andreas_st

Is grub able to find its files? What is the output if you start grub and let it search?

```
$ grub

grub> find /boot/grub/stage1

grub> quit

```

----------

## Unclethommy

I will have a check when I get home this evening, but a few questions:

1) Should there even be TWO copies of the same RAID1 drive? I read that this only happens when using software RAID and not a hardware RAID and it should appear only as one drive.

2) Do I even need to install grub on the drive I want in a chrooted environment? Can it be done from the live CD console as root so I don't have to muck about with mounting drives and chrooting? 

3) Grub was installed on the old drive that I copied onto the new RAID drive. Do you think it would help if I reinstalled grub in the chrooted enviroment so that it knows its on the new disk?

4) I had to 

```
modprobe i2o_scsi
```

So that I could see the partitions in Knoppix (which I believe uses a generic kernel). Was this correct or is there another driver I need to access to just be able to see one drive? I have an Adaptec 2400A ATA Raid card.

5) Is there any way to just boot the system up with the RAID so that I can at least start using the gentoo kernel/system and see if it works? Does something need to be done to the MBR? I've never actually booted a purely linux system, I've always dual booted it (and hence always has grub installed).

6) Can I simply install gentoo as I would on one drive and then get the hardware raid card to mirror it to another and create a RAID1 or do both drives need to be wiped before anything is installed to them? There is a thread about doing this but the link is broken  :Sad: 

https://forums.gentoo.org/viewtopic-t-147430-highlight-raid.html

----------

## Unclethommy

having chrooted onto the disk, grub output 

```
(hd1,0)
```

which i believe is one of the raid1 disca as (hd0,0) is one of my old sata drives with windows on it. does this help?

----------

## andreas_st

If you are using hardware raid your operating system should see only the raid device, not the single disks. If your OS can see both disks of a raid 1 setup you probably did not set up the raid correctly.

You have to install grub booted into the chrooted environment.

If grub can find its files on the disk you should be able to install it in the boot sector of this disk. In the documentation it is mentioned that the grub-install utility has troubles to find the right BIOS devices sometimes. I always install grub from the grub shell. The following should work:

```
$ grub

grub> find /boot/grub/stage1

 (hd1,0)

grub> root (hd1,0)       

grub> setup (hd1)

grub> quit

```

Your raid device seems to be the second BIOS device and your Windows installation seems to be on the first one. Because of that you will have to change the configuration of the bootloader of your windows disk to be able to boot to the Linux installation on the second device.

----------

## Unclethommy

hi there, i have decided to repeat the whole process by creating the raid1 again and repeating the process woith a gentoo 2007.0 livecd. thankfully i think it has the right driver as the raid1 showed up as one drive. 

Everything now works and I am able to boot into my new (hopefully faster) system.

Thanks again.

----------

