#######################################################################
#         Silicon Image SiI SATA controller                           #
#               RedHatLinux  Driver  (3114) 	                      #
#######################################################################

1. OVERVIEW
   This driver disk adds support for SiI SATA controller that is otherwise
   not supported by the RedHatLinux installation program.
   Supported RedHatLinux versions:

      * RedHatLinux 7.3/8.0/9.0 

2. INSTALLATION

2.0 For detailed information about RedHat installation visit:
    http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/install-guide
    (substitute 8.0 by the proper release version)
 
2.1 Preparing driver disk 
    
    A floppy disk is required to install into a brand new (or blank) disk drive. 
    
 Several Options:
 
  . Extract the contents of the [distribution]_sii____rhdd.tgz file on to a formatted floppy disk.
    (e.g. use tar xzf [distribution]_sii____rdhh.tgz)
    
  . If running windows: use "rawrite.exe sii____.img A:" 
    (get rawrite from RedHat installation disk #1 \dosutils directory)
  . If running linux:  "dd if=redhat_sii6514.img of=/dev/fd0"

  . Make sure BIOS reports drives as 'current' (if using RAID). Having disk on an unknown
    state may cause problems when installation the OS.


  2.1.1 IMPORTANT NOTE FOR OEM CUSTOMERS
        ADD your PCI ID to the "pcitable" file if OEM VendorId is going to be different 
        from SiI 0x1095 IDs. (End Users should ignore this step) 


2.2 Steps for first-time installation 
   
    Before you start make sure the BIOS sees your adapter card (if applicable) and
    your disk drives.
    
    If just adding Data Drives or upgrading go to sections 2.3 or 2.4
     (non-bootable SATA drives are considered Data Drives)
    
    Step1 Boot from the RedHatLinux CD 1 or a boot diskette that you have created.
          (Refer to "The Official Red Hat Linux x86 Installation Guide" see 2.1)

    *RedHatLinux9.x*
    Step2 At the "Welcome to Red Hat Linux ..." installation screen, a
          prompt labeled "boot:" will appear at the bottom of the screen.
          For installation in graphical mode:
          At the prompt type "linux dd "and press the enter key.
          For installation in text mode:
          At the prompt type "linux dd " or "dd text instead of dd" 
           
	  Sometimes mostly if you have are using drives that have partition information 
          the SATA driver may get confused and report errors at Installation time. After
	  you have installed the driver but before you format the disk(s) you may do the 
          following:  (formatting starts when doing disk partitioning)
	  . get a console window by typing CTL-ALT-F2 
	  . mke2fs /dev/sda (say 'y' to prompt)
          . fsck /dev/sda
	     type '2'
             type 'w'
            This will repartition the disk drives



    *RedHatLinux8.x*
    Step2 At the "Welcome to Red Hat Linux ..." installation screen, a
          prompt labeled "boot:" will appear at the bottom of the screen.
          For installation in graphical mode:
          At the prompt type "linux dd" or "expert" and press the enter key.
          For installation in text mode:
          At the prompt type "linux text dd" or "expert text" and press the
          enter key.


    Step3 Select "Yes" at the "Do you have a driver disk ?" .

    Step4 When the screens prompts for "Insert your driver disk and press OK to
          continue" insert the driver diskette in the floppy drive and select
          "Ok".

    Step5 The installation program will automatically load the SiI driver into
          kernel. Continue installing your system.
          Note, all ATA/ATAPI devices connected to SiI controller will be
          presented as a SCSI devices.


    *RedHat 9.0*
    Step6 

    RedHat 9.0 requires to create a BOOTABLE floppy diskette when using GRUB. You must boot
    with this diskette to continue with phase two of the installation.

    When ready to reboot type the following:

    boot: linux
    
    A Bootable diskette is not required for LILO but it is recommended.

    You still need to Add "hde=nopobre hdg=noprobe" while rebooting the second
    time. 

    Continue install. 

    Typically you should be able to get a console shell by typing CTL-ALT-F2
    or by just login into your favorite window manager.  

    Become root and execute the following script that will modify the boot loaders to work properly

    # sh "redhat_9.0_update_boot_loaders.sh"	

    This script determines which loader and loader configuration files must be
    modified / upgraded 

    At this point you are done with the installation.


    *RedHat 8.0*
    Step6 

    .  Clean Up (recommended but not necessary)

       . # 'sh cleanup-8.0' or
           'sh cleanup-9.0', etc.

       It can run before or after rebooting  

    . At this point you are done with the installation 

2.3  Adding a DATA DRIVE 
    
     If your system is already up and running then you can use execute shell scripts to modify
     the kernel or add loadable modules to access the SATA drives as follows:

     . Modify the loaders to disable the Open Source Driver  (no script yet)
       (add hde=noprobe and hdg=noprobe (3112 chipsets only))  

     . # mount /mnt/floppy
         in case of DOS formatted floppy
         . # mount -t vfat /dev/fd0 /mnt/floppy  
     
     . # 'sh /mnt/floppy/load-module-2.4.20-8-REDHAT_9.0'  (DATA DRIVES)  
         (or use the the proper script depending on your kernel)

    . run './test_module_driver' if you want to make sure you can see the
       drives. test_module_driver will bring up the driver. You may also want
       to 'mke2fs /dev/sda' and 'mount /dev/sda /test' the hard disk(s)

     . insmod sii6514. As an example add the following lines at the end
       of the script in /etc/rc.d/rc.sysinit

       'insmod scsi_mod'
       'insmod sii6514'

     . At this point you are done with the installation 
                             
2.4  Upgrading the Kernel

     If your system is already up and running then you can use execute shell scripts to modify
     the kernel or add loadable modules to access the SATA drives as follows:

     . # sh /mnt/floppy/kernel-upgrade-to-2.4.20-8 is an example to create a NEW KERNEL IMAGE  
          /etc/lilo.conf and /boot/grub/grub.conf will be saved by the setup
          script. you may back them up as you wish. Visually inspect lilo.conf and 
          grub.conf to make sure the result is what you want.   

3.0  Special Cases:

     Mixing Drives. 
     
         if you are using LABELS to define partitions, it is recommended that NO drives have duplicate
         labels. Linux gets confused when partitions have the same names. (check lilo or grub 
         configuration files)
         change from =>  append="root=LABEL=/" to  root=/dev/hda2 for example

         
         The way Linux finds disk drives also affect the booting sequence.
  
         At the prompt type 
	    "linux ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0 ide3=0 ide4=0
	           ide5=0 ide6=0 ide7=0 ide8=0 ide9=0 expert "
  
         At the "Boot Loader Configuration" installation screen specify following
          kernel parameters:
	    "ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0 ide3=0 ide4=0
	     ide5=0 ide6=0 ide7=0 ide8=0 ide9=0"
             (this may apply only to old releases)


4.0   Modifying Boot Loaders Manually  (old techniques)
  
  If using LILO boot loader:
    a) Modify /etc/lilo.conf file similar to the example

          EXAMPLE:

	(before modification)
            image=/boot/vmlinuz-2.4.7-10
            label=linux
            read-only
            root=/dev/hda1

       	(after modification)
            image=/boot/vmlinuz-2.4.7-10
            label=Red Hat Linux SiIxxx
            read-only
            root=/dev/sda1
            initrd=/boot/initrd-2.4.7-10.siixxx

    b) Update new configuration of Lilo by the next command:
        /sbin/lilo

  If using GRUB boot loader:
          Modify /boot/grub/grub.conf file similar to the example

          EXAMPLE:

	(before modification)
	   title Red Hat Linux (2.4.7-10)
           root (hd0,1)
	   kernel /boot/vmlinuz-2.4.7-10 ro root=/dev/hda2

       	(after  modification)
	   title Red Hat Linux SiIxxx
           root (hd0,1)
	   kernel /boot/vmlinuz-2.4.7-10 ro root=/dev/sda2
           initrd=/boot/initrd-2.4.7-10.siixxx

 Step2 Flush filesystem buffers 
        #sync
 Step3 Reboot the system
       #reboot

 Step4 Select in boot loader menu item "Red Hat Linux SiI680"

 Step5 If the system reports about swap failure, please,
        modify /etc/fstab file similar to the example:
		
	EXAMPLE 

        (before modification)
		/dev/hda3 swap swap defaults 0 0

        (after  modification)
		 /dev/sda3 swap swap defaults 0 0

 *RedHatLinux7.3* (old techniques)

 Step1 Get driver "siixxx.o" from SiIxxx Driver Disk by issuing commands :
       # mount /dev/fd0 /mnt/floppy
       # /mnt/floppy/load-siixxx
       The shell script "load-siixxx" will load driver in the system and
	   will create initrd image.	   

 Step2
  If using LILO boot loader:
    a) Modify /etc/lilo.conf file similar to the example

          EXAMPLE:

	  (before modification)
            image=/boot/vmlinuz-2.4.18-3
            label=linux
            read-only
            root=/dev/hda1

          (after modification)
            image=/boot/vmlinuz-2.4.18-3
            label=Red Hat Linux SiIxxx
            read-only
            root=/dev/sda1
            initrd=/boot/initrd-2.4.18-3.siixxx
            append="ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0 
			  ide3=0 ide4=0 ide5=0 ide6=0 ide7=0 ide8=0 ide9=0"

    b) Update new configuration of Lilo by the next command:
        /sbin/lilo

  If using GRUB boot loader:
          Modify /boot/grub/grub.conf file similar to the example

          EXAMPLE:

	(before modification)
	   title Red Hat Linux (2.4.18-3)
           root (hd0,1)
	   kernel /boot/vmlinuz-2.4.18-3 ro root=/dev/hda2

       	(after  modification)
           title Red Hat Linux SiIxxx
           root (hd0,1)
	   kernel /boot/vmlinuz-2.4.18-3 ro root=/dev/sda2 ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 
                                           ide2=0 ide3=0 ide4=0 ide5=0 ide6=0 ide7=0 ide8=0 ide9=0
           initrd=/boot/initrd-2.4.18-3.siixxx

 Step3 Flush filesystem buffers 
       #sync

 Step4 Reboot the system
       #reboot
