Hello,
I have been attempting to set up this webserver for a while now, but the instructions for the built in hardware RAID driver for linux is confusing to me because I have not worked with linux much. The RAID chip is a VIA VT8237R SATA. I am tryinh to install CentOS 4 on the array but it only mentions support for RedHat, Mandrake, SUSE, and a few others; but I am assuming since CentOS is built on RedHat that this will work...?
Here are the instructions pasted from the ReadMe.txt file:
--------------------------
----------
----------
----------
----------
----------
---
Copyright (c) 2002-2003 VIA Technologies Inc.
VIA RAID Linux Driver Software Package ReadMe.txt
This readme file is to provide the information of VIA RAID Linux Driver
Package. VIA Technologies assumes no responsibility for any errors in
this document and no part of this document may be reproduced, transmitted,
or translated into any language,or in any form without the prior written
permission of VIA Technologies Incorporated.
Package Version 1.00 / ReadMe Version 1.00
--------------------------
----------
----------
----------
----------
----------
---
This RAID driver can now support 3 kind of VIA RAID Controllers, include
VT6410,VT6420/8237, VT6421. It supports RAID type 0, 1, span, 0+1(needs 4 hard disk).
VIA VT6410 is a ATA RAID controller, supports up to four ATA hard disks.
VIA VT6420/8237 is a SATA RAID controller.
VIA VT6421 supports two SATA and two ATA hard disks.
This "VIA RAID Linux Driver Package" is provided for drivers installations,
which are needed when using the above VIA RAID Controllers.
CONTENTS
==========================
==========
========
1) System Requirements
2) Software Package Contents
3) Driver Installation
4) Install Operating System RedHat linux
5) Notes
==========================
==========
========
1) System Requirements
You should have at least one VIA RAID controller.
System BIOS must integrates VIA RAID BIOS if you want to install OS
on RAID Controller.
Supports up to four hard disk drives, which all support LBA address.
Supports the following Operating Systems:
Linux
2) Software Package Contents
The decompressed software package includes the following files:
/Driver
viapubraid.c viamraid open source file
viapubraid.h
viaprvdef.h
viaprvmraid.o viamraid library file
viaprvraidm64.o lib file for SuSE 64 bit
Makefile Makefile
dd.sh script to make RedHat driver disk
patch.pl patch script for Mandrake 9.2 driver disk.
PACKAGES.PY for RedHat 7.2 update disk only
driverdisk.txt A document about how do I install Linux onto the RAID
ReadMe.txt This file, provides information on this Linux Driver Package
3) Driver Installation
=========================
== Driver Installation ==
=========================
*Pre-Install
The package include source code files, so we need to compile a driver
according to your kernel version.
Before begin to compile, make sure that
1. You have installed the kernel source package
2. Kernel source default directory is /usr/src/linux, please check it.
If your default kernel source directory is not /usr/src/linux,
create a link:
# ln -s linux2.4 linux
3. Assume you have unzip this package to a diretory /tmp/viamraid
*Compile/Install
1. compile the file, viamraid.o is the driver we need
# cd /tmp/viamraid/driver
# make
2. Install the driver
# make install
3. To use the driver, type:
#modprobe viamraid
If there are no other SCSI cards on the system, /dev/sda, sdb ... are
our devices.
4. To unuse the driver, type:
#rmmod viamraid
4) Operating System RedHat
To install RedHat Linux onto the RAID controller, we must have a driver
disk.
1. Prepare a driver disk:
The dd.sh is a shell script that help users to make driver disk easier
# cd /tmp/viamraid/driver
# chmod +x dd.sh
# ./dd.sh
Now dd.sh will create a driverdisk image file: driverdisk/viamraid.img
Insert a blank floppy disk and type
# dd if=driverdisk/viamraid.img
of=/dev/fd0
Driverdisk is OK now.
2. Install OS:
Boot from redhat install CD, when it prompt "boot:", type:
linux dd
Or
Install linux expert
* Patch for RedHat 7.2
Because RedHat 7.2 need a update disk instead of driverdisk to install
we need to type "linux dd updates" instead of "linux dd"
5) Notes (TroubleShootings)
1). After I compile the driver successfully, and run "make install",
or try to install driver by "modprobe viamraid",module loading fails
and show message like this: "your kernel is 2.4.19, but the module
is compiled for 2.4.19-athlon", why?
Perhaps your CPU is Pentium 4, but you kernel source configured
CPU type as athlon, do the following
#cd /usr/src/linux
#make menuconfig ;here change the "processor type" to be the same
as your system, then recompile the driver.
2). For SuSE64bit linux, please make sure that your CPU type is 64bit.
So, its better to
#make nenuconfig
to change the CPU type to X86_64bit before compile the driver.
There is also another file, called driverdisk.txt that contains additional information:
This is the document describes how I install linux onto our RAID controller.
If you have any suggestion/questions, contact me with dolpherdu@viatech.com.cn
Here is what you should know before we can begin.
a). Kernel for installation(boot from CDROM) is not the same as the normal
kernel, so we need to compile drivers for both kernel version. For example,
for redhat9.0, the kernel from CDROM boot is 2.4.20-8BOOT, but after
installation, boot from hard disk, the kernel version is 2.4.20-8. We will
use XXXX to refer to the kernel version number.
b). Before installation, we must load the driver for BOOT kernel, to recognize
our hard disk. The method is not standard for different linux vendors.
c). After installation, we need to boot from hard disk. Because kernel is
installed on our RAID hard disk, we must load driver module before kernel
init. This is done by a image file "initrd", the initrd is a filesystem image
which should contain the driver information.
We can see this initrd file under /boot/ directory, and boot loader(both
grub and lilo) have an option "initrd = ourinitrdfile".
After installation, we should add our driver module to this initrd file,
unfortunately, the method is not standard too.
That's all. We'll discuss the details for each specific linux.
1). RedHat 9.0
There is a standard way to create RedHat driver disk, I've put it
into a script, dd.sh, which has been mentioned in the readme.txt.
a). run ./dd.sh, you will get a image file named viamraid.img
b). Insert a blank floppy, and run
#dd if=driverdisk/viamraid.img
of=/dev/fd0
the driver disk is ready.
c). Install RedHat9.0, boot from RH9.0 cd, when it prompt: "boot:",
type "linux expert", then following the install instructions.
2). Mandrake 9.1
1. modify dd.sh, search "BOOTPARA",and change it.
BOOTPARA="-e BOOT=1" --> BOOTPARA="-e NOMODVER=1"
2. ./dd.sh -->get 2 file, here XXX is version number, DO remeber to
replace it with the real version number, for mdk9.1, XXX is
2.4.21-0.13mdk
driverdisk/viamraid.o.XXXB
OOT
driverdisk/viamraid.o.XXX
3. copy the normal driver to system module path
note: If there is no directory named misc, create it yourself.
#cp viamraid.o.XXX /lib/modules/XXX/misc/viam
raid.o
4. make a initrd image file, which include our driver.
#mkinitrd initrdraid.img --preload scsi_mod --preload sd_mod --preload viamraid XXX
5. insert a floppy, ext2 format,and
mount /dev/fd0 /mnt/floppy
cp driverdisk/viamraid.o.XXXB
OOT /mnt/floppy/viamraid_BOOT.
o
cp initrdraid.img /mnt/floppy/
umount /dev/fd0
Then, driver disk OK
Install
1. when boot from install CD, press F1, and input
linux expert
2. when prompted for a "third part driver", insert the floppy,
press OK, and choose viamraid_BOOT.o to install.
3. install normally untill the last step, prompted for reboot, do NOT
reboot now, press CTRL-ALT-F2 to the second terminal
and insert the floppy disk then, replace the default initrd.img file
with the one we prepared.(here, assume your root
filesystem has been mounted on /mnt)
mount /dev/fd0 /mnt/mnt
cp /mnt/mnt/initrdraid.img /mnt/boot/initrd.img
5. press CTRL-ALT-F7 back to install screen, and press reboot.
3). SuSE 8.2
1. compile a driver for i386 CPU type, this is for BOOT kernel.
#cd /usr/src/linux
#make menuconfig ;change the CPU type here to i386
#make dep
back to our source code directory, make a driver
#make
copy viamraid.o to a floppy disk.(VFAT)
#mount /dev/fd0 /mnt/floppy
#cp viamraid.o /mnt/floppy/viamraid_BOOT.
o
2. compile a driver for your current CPU
#cd /usr/src/linux
#make menuconfig ;change the CPU type according to your CPU.
#make dep
back to our source code directory, make a driver
#make
copy viamraid.o to a floppy disk.(VFAT)
#cp viamraid.o /mnt/floppy/viamraid.o
3. boot from cdrom, when prompt to select language, press
CTRL-ALT-F2, insert the floppy, run
#mkdir aa
#mount /dev/fd0 /aa
#insmod /aa/viamraid_BOOT.o
press CTRL-ALT-F7 to continue
4. after reboot, when prompt to select language, do (3) again
when prompt where to boot from, select "Boot installed system".
5. when asked to enter password for root, press CTRL-ALT-F2,
#mount /dev/fd0 /media/floppy
#cp /media/floppy/viamraid.o /lib/modules/`uname -r`/misc/
#vi /etc/sysconfig/kernel ;change varialbe INITRD_MODULES to
;include viamraid like this: INITRD_MODULES="viamraid reiserfs"
#mkinitrd
#umount /dev/fd0
press CTRL-ALT-F7 to finish the normal install.
Note: For VIA K8 Platform, please complier the two CPU type driver all named as "viamraid.o" and copy two floppy to install OS.
4). RedFlag 4.0
Driver disk for RedFlag is the same as RedHat, but the RedFlag4.0
kernel source is strange, we cannt build a suitable driver for BOOT,
whatever compile option we use.
The kernel version for RedHat9.0 and RedFlag4.0 is the same,both
2.4.20-8. but the symbols version is not the same.
And I found that, the BOOT kernel for RedFlag4.0 and RedHat9.0 is the
same, so I use the driver made for RedHat9.0 to install.
1.compile a driver for install using RedHat9.0 source
#make clean
#make -e BOOT=1
#cp viamraid.o driverdisk/viamraid.o-2.4.
20-8BOOT
2.compile a driver for normal boot using RedFlag4.0 source
#make clean
#make
#cp viamraid.o driverdisk/viamraid.o-2.4.
20-8
3.make a driverdisk using the above 2 files, same way as RedHat.
using the following shell script. Note, the RedFlag driverdisk must
be VFAT filesystem.
#!/bin/bash
MODNAME=viamraid
BASE=`uname -r`
cd driverdisk
#make the driverdisk image
mkdir mountpoint
mkdir workdir
dd if=/dev/zero of=${MODNAME}.img bs=1k count=512
echo y |mkdosfs ${MODNAME}.img
mount -o loop ${MODNAME}.img mountpoint
cd mountpoint
echo "${MODNAME}.o:scsi_mod.o sd_mod.o" >modules.dep
echo "0x1106 0x3249 \"${MODNAME}\" \"VIATECH|VIA VT6421 RAID Controller\"" >pcitable
echo "0x1106 0x3149 \"${MODNAME}\" \"VIATECH|VIA VT6420 RAID Controller\"" >>pcitable
echo "0x1106 0x3164 \"${MODNAME}\" \"VIATECH|VIA VT6410 RAID Controller\"" >>pcitable
echo "Version 0" > modinfo
echo "${MODNAME}" >> modinfo
echo " scsi" >> modinfo
echo " \"Raid controller,VIA technologies.\"" >> modinfo
echo "1" > rhdd-6.1
cd ../workdir
mkdir ${BASE}BOOT
mkdir ${BASE}
cp ../${MODNAME}.o-${BASE}BOO
T ${BASE}BOOT/${MODNAME}.o
cp ../${MODNAME}.o-${BASE} ${BASE}/${MODNAME}.o
find -name "*.o" -type f | cpio -o --format=crc | gzip -9 > ../mountpoint/modules.cgz
cd ..
umount ${MODNAME}.img
4. viamraid.img is the image file for driver disk.
5. Insert a blank floppy, and run
#dd if=driverdisk/viamraid.img
of=/dev/fd0
the driver disk is ready.
6. Install RedHat9.0, boot from RH9.0 cd, when it prompt: "boot:",
type "linux expert", then following the install instructions.
5). Mandrake 9.2
1. prepare a blank floppy, format it to VFAT file system.
2. compile 2 driver, for BOOT and for UP, in the driver source directory
#mount /dev/fd0 /mnt/floppy
#make
#cp viamraid.o /mnt/floppy/viamraid_up.o
#make clean
#make -e NOMODVER=1
#cp viamraid.o /mnt/floppy/viamraid_BOOT.
o
3. copy the patch.pl file to the floppy
#cp patch.pl /mnt/floppy/
#umount /mnt/floppy
4. the driver disk is OK, when install, after boot from the CD,
Press "F1", insert the floppy,
type "patch", then follow the install instructions.
6). SuSE 9.0 for x86_64
1. compile a driver for "generic x86_64" CPU type
#cd /usr/src/linux
#make menuconfig ;change CPU type to "generic x86_64".
#make dep
back to our source code directory, make a driver
#make
copy viamraid.o to a floppy disk.(VFAT)
#cp viamraid.o /mnt/floppy/viamraid.o
2. boot from cdrom, when prompt to select language, press
CTRL-ALT-F2, insert the floppy, run
#mkdir aa
#mount /dev/fd0 /aa
#insmod /aa/viamraid.o
press CTRL-ALT-F7 to continue
3. after reboot, when prompt to select language, do (2) again
when prompt where to boot from, select "Boot installed system".
4. when asked to enter password for root, press CTRL-ALT-F2,
#mount /dev/fd0 /media/floppy
#cp /media/floppy/viamraid.o /lib/modules/`uname -r`/misc/
#vi /etc/sysconfig/kernel ;change varialbe INITRD_MODULES to
;include viamraid like this: INITRD_MODULES="viamraid reiserfs jbd"
#mkinitrd
press CTRL-ALT-F7 to finish the normal install.
;If system appears "Can't determine dependencies of module viamraidjgb. Is this modules.dep up to date" message. Please CTRL-ALT-F7 to finish the normal install. And run command "mkinitrd" again in terminal.
So...What do I need to do to set up CentOS 4 on the hardware RAID chipset in the motherboard? (It will be a RAID 1 mirror) I know absolutely nothing about "compiling", but do have access to another machine running Fedora 5 if this helps.
The driver downloads website is:
http://www.viaarena.com/default.aspx?PageID=420&OSID=18&CatID=2100&SubCatID=143.
MANY many thanks to whomever can help me, as I have been trying for a long time to get this working.
Thank You,
Max
Start Free Trial