How to boot from the ITE IT8212 raid module by: Hendrik-Jan Heins, 04-01-2005, rev.1.45 The ITE IT8212 Raid controller has drivers for Linux available. Both as distro specific and sourcecode format. All these are available in one package on: http://www.ite.com.tw/software_download/software_download2.asp They seem to work just as wel for the on-mainboard solutions like Gigabyte provides as for the pci raid cards containing the chip. ITE now also has a separate source package for the ITE IT8211. The procedure for installation and usage is the same as for the IT8212 drivers, so you can still use this document to build the module, just substitute IT8211 for IT8212. This document is split in an explanation for use with kernel 2.4 and an explanation for use in kernel 2.6. Kernel 2.4 As module You can compile it for your own distro from source as a module. To do so, 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 BEWARE!!! I couldn't build a working module this way! But there are probably a lot of people that don't have a problem that way, if you cannot build a module like that, the method described below also works for building modules. 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 (without the ""): "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 (without the ""): "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 WARNING!!! Linux Kernel 2.6.10 does NOT work with the standard ITE IT8212 driver that's available on ITE's website. The Linux kernel has changed from version 2.5.x/2.6.x in the way kernel modules are managed. If you still want to compile this module on Kernel 2.6.10, then use Alan Cox's kernel sources (the -ac kernel). Alan expects to have this module in the standard linux kernel from version 2.6.11. Also, in this version, the raid controller doesn't work anymore on scsi-emulation, but as a true IDE/ATA device. You can NOT use this howto for this version of the driver. 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 (without the ""): "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 (without the ""): "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! References: http://www.suse.de/~agruen/kernel-doc/ ; Suse kernel build method If you have any comments or additional information, don't hesitate to drop me a line: hjh@.passys.nl