#######################################################################
#         Silicon Image SiI SATA controller                           #
#               RedHatLinux  Driver 	                              #
#######################################################################

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_sii6512.img of=/dev/fd0"
  
    (actual file names may vary slightly. ____ identifies a valid chipset for the driver)
     for example: suse_united_sii3112r.img, redhat_sii6512.img are valid names 

  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 hde=noprobe hdg=noprobe" and press the enter key.
          For installation in text mode:
          At the prompt type "linux dd hde=noprobe hdg=noprobe" or "dd text instead of dd" 
          or type "linux dd hde=noprobe hdg=noprobe hdi=noprobe hdk=noprobe"
          and then enter key.

          Typically SATA 1 has hde and hdg. If your system has more than one
	  Controller then SATA 2 will have hdi and hdk. There is no f,h,j
          because all SATA drives behave like Master Drives

	  You can actually have SATA 1 drives using this drivers and SATA 2
          using the Open Source Driver. It is probably not recommended for
          normal use.

          Note: BE CAREFUL typing the line since a typo will be ignored and
                the kernel will enable the Open Source Driver creating a
                conflict

    
          RedHat 9.0 contains a generic Open Source Driver that must be disabled at
          installation time. Typically hda hdb are on IDE0 and hdc hdd are on IDE1. Then
          the SATA disk drives start at hde. SATA disk drives are all MASTERs so their
          values are typically hde, hdg, hdi, hdk, etc. This driver will behave like a 
          SCSI device and will remap the SATA drives to sda, sdb, etc.  

	  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

	  The Open Source Code understand the Metadata and sometimes it gets
          confused


    *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 hde=noprobe hdg=noprobe	
    
    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)  

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

     . insmod sii6512. You will need to add insmod to rc.init scripts 
         
     . 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
