Koozali.org: home of the SME Server

HowTo: SME 6.0.1-1 on Bootable SATA / RAID ...

jeremy

HowTo: SME 6.0.1-1 on Bootable SATA / RAID ...
« on: August 20, 2004, 11:53:08 PM »
Below is a draft HowTo that I put together based on my experience installing SME 6.0.1-1 on a bootable SATA / RAID array.

The HowTo is not yet 100%, so any insight or advice is welcome.

It is a very good starting point for anyone who is trying to use SME with SATA / RAID, and can also be used as a guide for adding additional custom drivers when installing SME.

Code: [Select]
HowTo -- Installing SME 6.0.1-1 onto Bootable SATA hard
drive(s) connected to a VIA SATA / RAID Controller

( This HowTo is not yet 100%.  Any insight or advice is
greatly appreciated. )

August 20, 2004

Jeremy Jedynak   <Jeremy.Jedynak@NetCentricInc.com>
NetCentric Technology Inc
www.NetCentricInc.com

Table of Contents

1)  Supported Chipsets

2)  Getting Starting

a)  Select a Test System
b)  Install SME 6.0.1-1 on the Test System

3)  Obtaining SME Source and Compiling SME Kernels

a)  Downloading SME Development Tools RPMs
b)  Installing the SME Development Tools RPMs
c)  A Note on Compiling Linux Kernels
d)  Compile the Post-BOOT kernel
e)  Compile the BOOT kernel

4)  Obtaining VIA SATA / RAID Driver Source and Creating a Driver Disk

a)  Downloading VIA SATA / RAID Driver Source
b)  Compiling the Driver Disk Floppy Image
c)  Creating a Driver Disk from the Floppy Image

5)  Loading the VIA SATA / RAID Driver during SME Install

a)  Bug in SME 6.0.1-1 Installer
b)  Workaround to SME 6.0.1-1 Installer Bug

6)  Known Problems / Issues

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1)  Supported Chipsets:

VIA VT6410
VIA VT6420 / VIA VT8237
VIA VT6421

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2)  Getting Started

2a)  Select a Test System

First, find a test system onto which you can do a vanilla
install of SME 6.0.1-1 onto a bootable IDE hard drive.  Since you
will be compiling kernels on the test machine, the faster the machine
is the sooner you will finish.

Your target system is not a likely candidate for your test
system, since the goal is to install SME on a bootable SATA hard
drive.

The target system's drive will be erased during the install
process, so be sure to archive any important data first.  Also, if
you make any serious mistakes during the process, you may want wipe
the test system clean and start all over again.

2b)  Install SME 6.0.1-1 on the Test System

Follow the usual procedure for installing SME 6.0.1-1 on the
test system you have selected.  For more information on this, visit:

http://www.Contribs.org/

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

3)  Obtaining SME 6.0.1-1 Source and Compiling SME Kernels

3a)  Downloading SME Development Tools RPMs

There are 24 RPMs which make up the SME "Development Tools"
(or "DevTools") and all 24 can be found at:

http://www.Contribs.org/contribs/saco/contrib/devtools_SME6.0/

3b)  Installing the SME Development Tools RPMs

Only 22 of the 24 can be installed on a vanilla installation
of SME 6.0.1-1.  Two RPMs ( openssl-devel-0.9.6b-32.7.i386.rpm and
anaconda-7.3-7.i386.rpm ) will complain of missing dependencies,
so do not bother to download either of them.

The command for installing an RPM is:

# rpm -ivh filename.rpm

Download and install all of the other 22 RPMs.  Some of the RPMs
depend on other of the RPMs, and so require them to be installed first.
Here is an ordering of RPM installation that will work:

rpm-python-4.0.4-7x.18.i386.rpm
libattr-2.0.8-6.i386.rpm
libstdc++-devel-2.96-113.i386.rpm
libacl-2.0.11-7.i386.rpm
libacl-devel-2.0.11-7.i386.rpm
automake-1.4p5-4.noarch.rpm
m4-1.4.1-7.i386.rpm
autoconf-2.13-17.noarch.rpm
cpp-2.96-113.i386.rpm
glibc-kernheaders-2.4-7.16.i386.rpm
glibc-devel-2.2.5-43.i386.rpm
gcc-2.96-113.i386.rpm
libtool-1.4.2-7.i386.rpm
kernel-source-2.4.20-18.7.i386.rpm
readline-devel-4.2a-4.i386.rpm
zlib-devel-1.1.4-8.7x.i386.rpm
mkisofs-1.10-11.i386.rpm
ncurses-devel-5.2-26.i386.rpm
pam-devel-0.75-46.7.3.i386.rpm
gcc-c++-2.96-113.i386.rpm
apache-devel-1.3.27-2.i386.rpm
anaconda-runtime-7.3-7.i386.rpm

( Other permutations are possible as well. )

Once you have installed all of the 22 RPMs, your test system will
contain the following necessary items:

1)  SME 6.0.1-1 Kernel Source, located in:

/usr/src/linux-2.4.20-18.7/

2)  CC and GCC compilers, located in:

/usr/bin/cc
/usr/bin/gcc

3c)  A Note on Compiling Linux Kernels

Linux distrubtions use one kernel for booting, and another
kernel for post-boot operation.  Because of this, you must compile
a version of the driver for the BOOT kernel and another version of
the driver for the Post-BOOT kernel.

The Driver Disk floppy image compiler script supplied with
the VIA SATA / RAID Driver source code will compile two versions
of the driver for you.  However, before you can execute that script,
you must first compile the BOOT and Post-BOOT kernels.

3d)  Compile the Post-BOOT Kernel

To compile the Post-BOOT Kernel, perform the following steps:

1)  Change to the SME Kernel Source Directory

# cd /usr/src/linux-2.4.20-18.7/

2)  Prepare for the Compile

# make mrproper
# make clean

   This step is VERY important, as it removes any
temporary files from any previous compilation.  Do
NOT skip this step.

3)  Select Configuration for Post-BOOT Kernel

# cp configs/kernel-2.4.20-i386.config .config

4)  Edit Makefile to change EXTRAVERSION variable

# mcedit Makefile

   After Change:  EXTRAVERSION = -18.7

5)  Configure Compile

# make config

   Since you are not planning to install the kernel,
and only seek to compile the modules, just accept all
of the defaults by holding down the [ENTER] key until
you are returned to the linux prompt.

6)  Compile the Post-BOOT Kernel

# make dep modules modules_install

   Depending on the speed of your test system, the
compile may easily take 30 minutes or more.  This might
be a good time to take a break.

After compiling, the Post-BOOT kernel modules will be located
in:
/lib/modules/2.4.20-18.7/

3e)  Compile the BOOT Kernel

To compile the BOOT Kernel, perform the following steps:

1)  Change to the SME Kernel Source Directory

# cd /usr/src/linux-2.4.20-18.7/

2)  Prepare for the Compile

# make mrproper
# make clean

   This step is VERY important, as it removes any
temporary files from any previous compilation.  Do
NOT skip this step.

3)  Select Configuration for BOOT Kernel

# cp configs/kernel-2.4.20-i386-BOOT.config .config

4)  Edit Makefile to change EXTRAVERSION variable

# mcedit Makefile

   After Change:  EXTRAVERSION = -18.7BOOT

5)  Configure Compile

# make config

   Since you are not planning to install the kernel,
and only seek to compile the modules, just accept all
of the defaults by holding down the [ENTER] key until
you are returned to the linux prompt.

6)  Compile the BOOT Kernel

# make dep modules modules_install

   Depending on the speed of your test system, the
compile may easily take 30 minutes or more.  This might
be a good time to take a break.

After compiling, the BOOT kernel modules will be located in:

/lib/modules/2.4.20-18.7BOOT/

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

4)  Obtaining VIA SATA / RAID Driver Source and Creating a Driver Disk

4a)  Downloading VIA SATA / RAID Driver Source

Download the VIA SATA / RAID Driver Source from:

http://downloads.VIAarena.com/LinuxApplicationNotes/Apr04/via_raid_linux_v100_20040412.zip

If the location of the driver has changed, visit VIA's website
( www.VIAarena.com ) and look for a Linux Driver for the following
SATA / RAID Controllers:

VT6410, VT6420, VT6421, VT8237

4b)  Compiling the Driver Disk Floppy Image

To compile the Driver Disk floppy image, perform the following
steps:
1)  Unpack the Driver Source

# unzip via_raid_linux_v100_20040412.zip -d /tmp/

2)  Change to the Driver Source Directory

# cd /tmp/VIA_RAID_Linux_V100/driver/

3)  Create a Symbolic Link to the SME Kernel Source

# ln -s /usr/src/linux-2.4.20-18.7 /usr/src/linux

   The driver disk floppy image compiler script looks
for the kernel source in /usr/src/linux/, so creating
this symbolic link is critical.

4)  Run the Driver Disk Floppy Image Compiler Script

# ./dd.sh

After compiling, a floppy image of the Driver Disk will be
located in:
./driverdisk/viamraid.img

/tmp/VIA_RAID_Linux_V100/driver/driverdisk/viamraid.img

4c)  Creating a Driver Disk from the Floppy Image

To create a Driver Disk from the floppy immage, perform the
following steps:

1)  Insert a new floppy

2)  Change to the Driver Source Directory

# cd /tmp/VIA_RAID_Linux_V100/driver/

3)  Imprint the floppy image onto the inserted floppy:

# dd if=./driverdisk/viamraid.img of=/dev/fd0

4)  Ensure that the floppy image has been completely
written to the floppy

# sync

The inserted floppy is now a Driver Disk containing the VIA SATA
/ RAID drivers for both the BOOT kernel and the Post-BOOT kernel.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

5)  Loading the VIA SATA / RAID Driver during SME Install

5a)  Bug in SME 6.0.1-1 Installer

Upon booting the SME 6.0.1-1 installation CD on the target
system, you will likely receive the following dialog box from the
installer:

"No hard drives have been found.  You probably need
to manually choose device drivers for the installation
to succeed.  Would you like to select drivers now?"

"Yes" "No"

This message appears because the installer does not have the
VIA SATA / RAID Driver to load, and therefore cannot see your SATA
hard drive(s).

Selecting "Yes" on any other linux distribution will cause a
secondary dialog box to appear, which will allow you to select from
a set of drivers included on the installation CD, as well as insert
floppies to load additional drivers.

Unfortunately, there is a bug in the SME 6.0.1-1 installer,
and the secondary dialog never box appears.  Instead, the installer
continues with the usual dialog boxes that allow you to configure
the installation options, and then just before you would expect the
installation to begin, the following dialog box appears:

"An error has occured - no valid devices were found on
which to create new file systems.  Please check your
hardware for the cause of this problem."

"Ok"

Upon selecting "Ok", the installer ejects the installation
CD and proceeds to reboot the system.  See the next section for a
workaround to this bug.

5b)  Workaround to SME 6.0.1-1 Installer Bug

To workaround the SME installer bug described in the previous
section, perform the following steps:

1)  Boot the target system from the SME 6.0.1-1 installation CD.

2)  As the target system is booting, hold down the left [SHIFT]
key until a "boot:" prompt appears.

3)  At the "boot:" prompt, type "accept dd" and hit the [ENTER]
key.  This instructs the installer to prompt you for a Driver
Disk.  A dialog box will appear asking if you have any Driver
Disks from which to load drivers.

4)  Insert the VIA SATA / RAID Driver Disk and select "OK".
You should notice that the installer appears to load the same
driver twice.  This may take a few moments.  The installer is
actually loading the two different versions of the driver
(BOOT and Post-BOOT) from the driver disk.

5)  Hit [F12] to continue with the normal installation screens.
The installer will now be able to see your SATA-connected hard
drive(s) and will install SME 6.0.1-1.

6)  After the installer copies all of the necessary files to the
hard drive(s), a dialog box will appear that asks if you would
like to create a Recovery Disk.

You should select "Yes" at this dialog box, and insert a new
floppy.  The Recovery Disk that the installer will create for
you will include the VIA SATA / RAID Driver on it.  This disk
may come in handy in the future, if you experience any problems.

The installer will then eject the SME installation CD and reboot
the system.  Your machine will  boot from the new installation of SME
6.0.1-1 on your SATA hard drive(s).

Congratulations!!!

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

6)  Known Problems / Issues

As great as everything above sounds, it will not yet result in a
usable system.

The procedures described above works, but upon reboot and booting
from the SATA hard drive(s), a kernel panic will occur.  "depmod" will
complain of "unresolved symbols" and "insmod" will fail.  The following
is an excerpt of the messages that appear:

...

depmod: *** Unresolved symbols in /lib/modules/2.4.20-18.7/misc/viamraid.o
modprobe viamraid
/lib/modules/2.4.20-18.7/misc/viamraid.o: kernel-module version mismatch
      /lib/modules/2.4.20-18.7/misc/viamraid.o was compiled for kernel version 2.4.20-18.7BOOT
        while this kernel is version 2.4.20-18.7.
/lib/modules/2.4.20-18.7/misc/viamraid.o: insmod /lib/modules/2.4.20-18.7/misc/viamraid.o failed
/lib/modules/2.4.20-18.7/misc/viamraid.o: insmod viamraid failed

If steps 3d and 3e are reversed, so that the BOOT kernel is
compiled first and the Post-BOOT kernel is compiled second, the
resulting driver disk will NOT enable the SME installer to see
the SATA hard drive(s) and so no installation will take place at
all.

However, if you try to install the resulting drivers on the
test system ( using "make install" ) a similar failure occurs.
"depmod" will complain of "unresolved symbols" and "insmod" will
fail, but with a different message.  The following is an excerpt
of the messages that appear:

...

modprobe viamraid
/lib/modules/2.4.20-18.7/misc/viamraid.o: unresolved symbol scsi_unregister_Rf37834db
/lib/modules/2.4.20-18.7/misc/viamraid.o: unresolved symbol scsi_register_R4c9bd6ad
/lib/modules/2.4.20-18.7/misc/viamraid.o:
Hint: You are trying to load a module without a GPL compatible license
     and it has unresolved symbols.  Contact the module supplier for
     assistance, only they can help you.

/lib/modules/2.4.20-18.7/misc/viamraid.o: insmod /lib/modules/2.4.20-18.7/misc/viamraid.o failed
/lib/modules/2.4.20-18.7/misc/viamraid.o: insmod viamraid failed

Having looked into the supplied source, the VIA SATA / RAID
driver has been released under the GPL.

This issue is still unresolved, and it is not clear what steps
might be missing that would correct them.  Any insight or advice is
greatly appreciated.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -