bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GRUB and HPT 370 rocks!!!


From: Uli Laube
Subject: GRUB and HPT 370 rocks!!!
Date: Tue, 08 Apr 2003 00:57:11 +0200

Hi,

I would like to report a little sucess story about HPT370 and GRUB. 
I am going to describe my setup here, so you can get an idea what I am
trying to do. The whole description is a bit lengthy so make sure you
have enough time. ;)

Hardware:

Abit VP6 MB with the VIA Apollo Pro Chipset (VT82C694X and VT82C686B)
Award BIOS Version: 6.00PG
Abit BIOS Version: YT
2x P3-933 -> SMP (I don't know if this matters, during the boot process
only one cpu should be active)
The MB has an additional Highpoint 370 IDE-RAID-chip onboard.
TOSHIBA DVD-ROM
2x HGST/IBM IC035L090AVV2
2x HGST/IBM IC035L060AVVA
Floppy(temporarily), no SCSI

The DVD-ROM is connected to one of the two IDE-bus' of the Appolo Pro
Chipset.
The four harddisks are connected to the two IDE-bus' of the Highpoint
Chip.

Unfortunately the .bin file for the YT version of system bios only
includes the 1.x version of the Highpoint BIOS.
I modified the .bin file of the system bios to include the newest
Highpoint HPT 370/372 Bios 2.34 which is available from their website.

Schematically we have the following situation:

VIA Chipset  ide0  Master   Toshiba DVD-ROM
                   Slave    nothing
             ide1  Master   nothing
                   Slave    nothing
HPT 370      ide2  Master   IC035L090AVV2
                   Salve    IC035L090AVV2
             ide3  Master   IC035L060AVVA
                   Slave    IC035L060AVVA

The boot sequence in the system bios is:

First Boot Device:  Floppy
Second Boot Device: CDROM
Third Boot Device:  ATA100RAID
Boot Other Device:  Enabled

I will name the IDE devices in linux fashion to talk about them more
easily:

VIA Chipset  ide0  Master   Toshiba DVD-ROM      /dev/hda
                   Slave    nothing              /dev/hdb
             ide1  Master   nothing              /dev/hdc
                   Slave    nothing              /dev/hdd
HPT 370      ide2  Master   IC035L090AVV2        /dev/hde
                   Salve    IC035L090AVV2        /dev/hdf
             ide3  Master   IC035L060AVVA        /dev/hdg
                   Slave    IC035L060AVVA        /dev/hdh

The boot device in the HPT 370 BIOS is  hde  on the ide2 bus. But that
doesn't matter because I am using a bootdisk (for the moment).
NO RAID Arrays are configured in the HPT 370 BIOS.

The first test I made was:

Win2k -> hde
hdf  empty
SuSE Linux 8.1 -> hdg
hdh empty

works great, without problems. The next idea was to test whether Linux
runs on a hardware-RAID-0-array via the HPT 370. So I moved the Linux
system to  hdf  resulting in:

hde: Win2k
hdf: Linux
hdg: Linux
hdh: empty

Then I created the RAID-0-array:

hde: Win2k
hdf: Linux
hdg: empty \
            > /dev/ataraid/d0
hdh: empty /

I was using the modules  hptraid  and  ataraid  at his point. It is a
bit annoying to have the individual harddisk and the raid-array
available at the same time. For example the SuSE Linux setup tool lists:

/dev/hdg
/dev/hdh

as well as

/dev/ataraid/d0

Even the old partitions

/dev/hdg1  type 83 reiserfs
/dev/hdh2  type 82 swap

and 

/dev/ataraid/d0p1  type 83 reiserfs
/dev/ataraid/d0p2  type 82 swap

are visible. I wasn't able to move the backup of my linux installation
from  hdf  back to the array. Not because is is not possible, but I
didn't try hard enough. Somewhere inside the SuSE support database I
read an entry saying "GRUB doesn't not support RAID-arrays, so use
LILO". Well what I didn't knew at this point was that they were talking
about "sofware"-RAID but I am working with "hardware"-RAID. And I wasn't
able to get LILO to do what I wanted.

So I was looking for a different approach. On the Highpoint website I
found   hpt37x2.o.  a linux module. A driver provided already in binary
form for i386 systems by Highpoint. I downloaded Version 1.33 and
started a new installation. But how do you include a hardware-vendor
provided driver in a Linux distribution which comes on a DVD? After I
learned about SuSE's neat "Driver Update Disk" (DUD) feature this
problem was gone. It automatically integrated the module in the 
init-ramdisk. GRUB was located on a bootdisk and worked perfectly.

To avoid detection of the harddisks by the kernel and automatically
loading  hptraid  and  ataraid  I have to use the following kernel
parameters:

hde=noprobe hdf=noprobe hdg=noprobe hdh=noprobe

After that you can remove the  hptraid and ataraid  modules from the
initrd they are not needed anymore. The hpt37x2.o module is loaded from
the initrd and detects the harddisks and the array and assigns new
device names:

                                        kernel ide driver      hpt37x2

VIA Chipset  ide0  Master   Toshiba DVD-ROM      /dev/hda
                   Slave    nothing              /dev/hdb
             ide1  Master   nothing              /dev/hdc
                   Slave    nothing              /dev/hdd
HPT 370      ide2  Master   IC035L090AVV2        /dev/hde     /dev/sda
                   Salve    IC035L090AVV2        /dev/hdf     /dev/sdb
             ide3  Master   IC035L060AVVA        /dev/hdg \
                                                           >  /dev/sdc
                   Slave    IC035L060AVVA        /dev/hdh /
                   
The harddisks forming the array are now "hidden" from the OS, looks a
little bit more like "hardware"-RAID to me now. ;-)

This is what I get in the interactive GRUB-shell:

> geometry (hd0)
drive 0x80: C/H/S=1024/255/63  sectors= 160836479, LBA
> geometry (hd1)
drive 0x81: C/H/S=1024/255/63  sectors= 160836479, LBA
> geometry (hd2)
drive 0x82: C/H/S=1024/255/63  sectors= 240206336, LBA
  Partition num: 0   FStype reiserfs  Partition type 0x83
  Partition num: 1   FStype unknown  Partition type 0x82

The HPT 370 is only reporting one "big" harddisk, great! This is what
the automatically (by SuSE's installer) created /etc/grub.conf looks
like:

root (hd2,0)
install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (fd0)
/boot/grub/stage2 0x8000 (hd2,0)/boot/grub/menu.lst
quit

And /boot/grub/menu.lst looks like this:

kernel (hd2,0)/boot/vmlinuz root=/dev/sdc1 apm=off acpi=off pci=noacpi
apic hde=noprobe hdf=noprobe hdg=noprobe hdh=noprobe vga=791
initrd (hd2,0)/boot/initrd

This works great!

Now I want to do the same thing with the other two harddisks and install
Win2k on them and boot Win2k or Linux with GRUB. Remember SuSE Linux 8.1
uses GRUB 0.92 per default. So we are not talking about 0.93 at the
moment. I told the HPT BIOS to create a second RAID-0-array from 
hde/sda  and  hde/sdb. 

Then the GRUB 0.92 stage 1 fails with the message:

GRUB Hard Disk Error

According to the manual this signifies some trouble with the detection
of the size and geometry of the disks. Mh, a 160 GB disk is quite big
perhaps LBA is not capable of handling this (something like the 32 GB
barrier). My first idea was: let's see if there is a newer version of
GRUB. Then I found and read grub-0.93-announcment.txt:

"* Support for booting Linux is rewritten, so GRUB ...."

Sounds good to me, let's give it a try. I downloaded the binary package
und created a GRUB boot disk by copying stage1 and stage2 to (fd0). And
taadaaaa no error msg appears on the screen.

> geometry (hd0)
drive 0x80: C/H/S=1024/255/63  sectors= 321672704, LBA
> geometry (hd1)
drive 0x81: C/H/S=1024/255/63  sectors= 240206336, LBA
  Partition num: 0   FStype reiserfs  Partition type 0x83
  Partition num: 1   FStype unknown  Partition type 0x82
> geometry (hd2)
Error 21: Selected disk does not exists

Ok, only the two RAID-0-Arrays are visible to GRUB. If I type:

kernel (hd1,0)/boot/vmlinuz root=/dev/sdb1 apm=off acpi=off pci=noacpi
apic hde=noprobe hdf=noprobe hdg=noprobe hdh=noprobe vga=791
initrd (hd1,0)/boot/initrd
boot 

I can even boot the linux system. But this fails because the  fstab 
points to the old non-exisiting /dev/sdc1 which is now /dev/sdb1.
reiserfscheck is very unhappy about this and stops the boot process.
Interestingly  mount  reports  /dev/sdc1  as  /   but there is no 
/dev/sdc1  anymore, only the wrong entry in /etc/fstab.  fdisk  only
shows  /dev/sda  and  /dev/sdb.

After changeing  /etc/fstab  booting Linux with GRUB 0.93 suceeds.

But the original GRUB 0.93 does not have the  gfxmenu  support which
SuSE included in GRUB 0.92 shipped with SuSE Linux 8.1. And the GRUB
0.92 provided by SuSE has a security bug. There is already a new .rpm
available on their website.

I must say that I am very delighted how this finally worked out! Great
Work!!

Regards,

Uli Laube




reply via email to

[Prev in Thread] Current Thread [Next in Thread]