How to boot from the ITE IT8212 raid module
by: Hendrik-Jan Heins, 15-06-2004, rev.1.41


The ITE IT8212 Raid controller has drivers for Linux available. Both in distro specific as
sourcecode form. All these are available in one package on: http://www.ite.com.tw/productInfo/Download.html
These seem to work just as wel for the on-mainboard solutions like Gigabyte provides as for the
pci raid cards containing the chip. The driver also appears to be working for the ITE IT8211 chip.
(thanks to Peter K. for this information).

Kernel 2.4

As module
You can compile it for your own distro from source as a module. To do that, download the driver source from ITE,
get the kernel source for your distro, go to the ite-directory for your distro, type "make" and copy the
file "iteraid.o" to your kernel modules directory in the scsi map. Reboot your system, and
type "modprobe iteraid" to test the module.
If it works, place the modulename "iteraid" in your "/etc/modules" file.
You can find the ITE IT8212 drivers as pre-packaged modules for several Distro's, but also the
source all in one file at:  http://www.ite.com.tw/productInfo/Download.html

In the kernel
Unpack the kernel source and the IT8212 driver source.
Copy the files "iteraid.c" and "iteraid.h" to the scsi subdir of the kernel source(-> /usr/src/linux/driver/scsi ).
Next, before configuring your kernel, you will have to modify the files "Config.in" and "Makefile" in
the directory /usr/src/linux-2.4.x/driver/scsi.

I do not pretend that the following is the only solution, or even that it is correct, but it seems to work:
In "Config.in" I added a line with:
"dep_tristate '   ITE8212F software RAID (EXPERIMENTAL)' CONFIG_SCSI_ATA_ITE $CONFIG_SCSI_IDE $CONFIG_EXPERIMENTAL"
I added this line below the line about the Via SATA module.
This line is needed for the module to be found during the config.
Now you can find it in the scsi section, in the subsection card-specific drivers.

In "Makefile" I added the following:
"obj-$(CONFIG_SCSI_ATA_ITE)     += libata.o iteraid.o"
below the line about the sata_via.o (and the other sata drivers).

Next, go to the Building and compiling section, below the Kernel 2.6 section.


Kernel 2.6

As module
The driverpackage now also contains a module for the 2.6 kernel!
Go to: http://www.ite.com.tw/productInfo/Download.html
and get it there. This module won compile correctly yet. In the file
"Makefile" there's: "KERNEL_SRC = /usr/src/linux-2.6.1". Replace "linux-2.6.1" by the
name of the directory your kernel has. Save the changes and compile the module with the
"make" command. Next, copy the file "iteraid.ko" to your kernel module dir, the scsi subdir.
type "modprobe iteraid" to test the module.
If it works, place the modulename "iteraid" in your "/etc/modprobe.preload" file.
You can find the ITE IT8212 drivers as pre-packaged modules for several Distro's, but also the
source all in one file at:  http://www.ite.com.tw/productInfo/Download.html

In the kernel
Now to integrate this module in the 2.6 kernel:
Unpack the kernel source and the IT8212 driver source.
Place the files "iteraid.c" and "iteraid.h" in the scsi directory of the kernel source
(-> /usr/src/linux-2.6.x/driver/scsi).
Next, before configuring your kernel, you will have to modify the files "Kconfig.in" and "Makefile" in
the directory /usr/src/linux-2.6.x/driver/scsi.

In "Kconfig.in" I added:
"config SCSI_ITE_RAID
        tristate "ITE IT8212 support"
        depends on SCSI && PCI && EXPERIMENTAL
        help
          For use of the ITE IT8212 RAID controller.

          If unsure, say N. "
Below the SCSI_SATA_VIA rules.
and in "Makefile" I added:
"obj-$(CONFIG_SCSI_ITE_RAID)    += iteraid.o"
Below the line about the Sata_Via module.


Building and compiling

Now compile the kernel as usual, but don't do a "make dep" when you use a 2.6 series kernel!!

You can configure the kernel: choose make config / make menuconfig or make xconfig , whichever you like.
To install with the raid module in the kernel, select the iteraid in the kernel (from the scsi card
specific subsection), and add the lowlevel drivers sg (generic scsi) and sd_mod (scsi disk support)
to the kernel. These drivers are needed for the RAID to work.
Note that if you add the flag "experimental", you should make sure "experimental" modules wil be
shown in the config. You can do so by turning on the "[*] Prompt for development and/or incomplete code/drivers"
flag in "Code maturity level options ".

Next, do a "make dep", "make bzImage" and "make modules"
Now you can install the modules to the disk: "make modules_install"
Copy the kernel image to the "/boot" directory

Next, edit your lilo.conf file (for Grub users: sorry, I don't know how you should do this, but the settings are
probably quite similar).
You will have to make an entry for your raid boot, but you will also have to change the boot order of your disks.
This is how the main section should look:
boot=/dev/sda                   <- important!
map=/boot/map
vga=791
default="raid"
keytable=/boot/us-latin1.klt
compact
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
disk=/dev/hda bios=0x81         <- important!
disk=/dev/sda bios=0x80         <- important!

Now the settings for the raid boot itself:

image=/boot/bzImage
        label="raid"
        root=/dev/sda1
        initrd=/boot/initrd-2.4.22-21mdkcustom.img
        append="devfs=mount hdc=ide-scsi"
        vga=791
        read-only


I know not all of these lilo settings are required, but this is how it works for me.
Do not forget to run "lilo -v" next, and if you use initrd, also run "mkinitrd" to activate the changes.

Now you can reboot from your raid!


If you have any comments or additional information, don't hesitate to drop me a line: hjh@.passys.nl

linux/ite-it8212.txt · Last modified: 2009/05/25 00:35 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready