Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1687386125.20061117121121@mail.ru>
Date: Fri, 17 Nov 2006 12:11:21 +0500
From: vlad <faktroot@...l.ru>
To: Openwall users <owl-users@...ts.openwall.com>
Subject: SATA controller

Hello Openwall,

Many thanks for desire to help!!
I shall result the description of installation of drivers for the
controller which goes with MB - ASUS P4P800-E Deluxe.

Support List

        Chipset         Adapter Name
        -------         ------------
        PDC20318        Promise SATA150 TX4
        PDC20375        Promise SATA150 TX2plus
        PDC20378        Promise SATA 378
        PDC20618        Promise Ultra 618

        OS              Kernel Version
        --              --------------
        Red Hat 8.0     kernel 2.4.18-14
        Red Hat 9       kernel 2.4.20-8
  
INSTALLATION
============
        Extract the contents of the ZIP file on to a formatted floppy disk.
        (ZIP file can be extracted by `WinZIP' in windows or `unzip' in linux)
        Label the disk "SATA150 Driver Disk".
2.1 To install the SATA150 Series Linux Driver into an EXISTING SYSTEM:

    1.) Boot linux system and login as root.
    2.) Insert SATA150 Driver Disk for install SATA150 Driver 
        by issuing commands :
        # mount /dev/fd0 /mnt/floppy
        # cd /mnt/floppy
        # sh install    (Answer Yes/No when inquire setup configuration)
        You can answer Yes to load SATA150 driver when linux booting everytime.
        # cd ..
        # umount /dev/fd0

# cat install
#!/bin/sh
patch_rc() {
   if [ ! -f /etc/rc.d/rc.sysinit.orig ] ; then
      cp -f /etc/rc.d/rc.sysinit /etc/rc.d/rc.sysinit.orig
   fi

   if ! grep 'depmod -Aq' /etc/rc.d/rc.sysinit >/dev/null 2>&1 ; then
         sed -e '/depmod -A/s/depmod -A/depmod -Aq/' /etc/rc.d/rc.sysinit >/tmp/.rc.sysinit.tmp
         mv -f /tmp/.rc.sysinit.tmp /etc/rc.d/rc.sysinit
         chmod 755 /etc/rc.d/rc.sysinit
   fi
}

ok='0'
echo -n "Promise SATA150 Driver Installation."
if [ ! -f modules.cgz ]; then
   echo "failed"
   echo "This is not SATA150 Driver Disk for RedHat Linux"
   exit 1
fi

if [ -d /tmp/.ut_mod ]; then
   rm -rf /tmp/.ut_mod
fi
mkdir -p /tmp/.ut_mod

cp modules.cgz /tmp/.ut_mod/
cd /tmp/.ut_mod
if [ ! -f modules.cgz ]; then
   echo "failed"
   echo "Runtime error..setup abort!!(disk full or no permission?)"
   exit 1
fi
echo -n "."

zcat modules.cgz |cpio -id >/dev/null 2>&1
if [ $? -ne 0 ]; then
   echo "failed"
   echo "Runtime error..setup abort!!(corrupt file)"
   exit 1
fi
echo -n "."

for i in `\ls -d *`
do
    if [ ! -d /lib/modules/${i} ]; then
       continue
    fi
    ok='1'
    
    minor=`echo ${i} | awk -F. '{print $2}'`
    if [ ${minor} -eq 2 ]; then
       cp -f ${i}/pdc-ultra.o /lib/modules/${i}/scsi/ >/dev/null 2>&1
    elif [ ${minor} -eq 4 ]; then
       cp -f ${i}/pdc-ultra.o /lib/modules/${i}/kernel/drivers/scsi/ >/dev/null 2>&1
    fi
    echo -n "."

done

if [ ${ok} -ne '1' ] ; then
   echo "failed"
   echo "No suitable driver found"
   echo "make sure driver disk or kernel version is right"
   exit 1
fi

if ! lsmod|grep pdc-ultra >/dev/null 2>&1 ; then
   dmesg -n4 >/dev/null 2>&1
   depmod -aq >/dev/null 2>&1
   modprobe pdc-ultra >/dev/null 2>&1
fi
echo -n "."

patch_rc
echo -n "."

echo "done"

RC=`grep 'rc.modules$' /etc/rc.d/rc.sysinit`
if ! grep '^insmod pdc-ultra' ${RC} >/dev/null 2>&1; then
   echo -n "Do you want to load pdc-ultra driver when linux booting everytime?(Y/N) "
   read key

   case ${key} in
       Y|y)
           echo "" >> `echo ${RC}`
           echo "#Promise SATA150 Driver" >> `echo ${RC}`
           echo -n 'if [ `uname -r |awk -F. ' >> `echo ${RC}`
           echo -n "'" >> `echo ${RC}`
           echo -n '{print $2}' >> `echo ${RC}`
           echo -n "'" >> `echo ${RC}`
           echo '` -eq 4 ]; then' >> `echo ${RC}`
           echo "   insmod scsi_mod >/dev/null 2>&1" >> `echo ${RC}`
           echo "   insmod sd_mod >/dev/null 2>&1" >> `echo ${RC}`
           echo "fi" >> `echo ${RC}`
           echo "insmod pdc-ultra >/dev/null 2>&1" >> `echo ${RC}`
           chmod 755 ${RC}
           ;;
       N|n)
           echo ""
           echo "The pdc-ultra driver module can be loaded automatically"
           echo "by appending the following command to ${RC}"
           echo ""
           echo "   insmod scsi_mod"
           echo "   insmod sd_mod"
           echo "   insmod pdc-ultra"
           ;;
       *)
         echo ""
         ;;
   esac
fi
echo ""
echo "setup is complete"
echo ""
echo "-------------------------------"
echo "Promise Technology, Inc (C)2002"
===================================================================================
2.2 To install the SATA150 Series Linux Driver into a NEW SYSTEM

    1.) Start the RedHat Linux Installation with CD ROM booting.
    2.) At the "Welcome to Red Hat linux ..." installation screen, a prompt
        labeled "boot:" will appear at the bottom of the screen.
    3.) Please type "expert" (without quotations) at the "boot:" prompt, then
        press the enter key.
    4.) At the "Devices" dialog box, insert the SATA150 Driver Disk in the 
        floppy drive and then select "OK" or "Yes".
    5.) Continue with the installation as normal.
    6.) When installation is at the "Congratulations" menu (final step).
            a.) Press Ctrl-Alt-F2 to swtich screen. 
            b.) Insert the SATA150 Driver Disk floppy, issue commands to load 
                SATA150 driver.
                # umount /tmp/fd0     (this command may fail, ignore it)
                # chroot /mnt/sysimage
                # mount /dev/fd0 /mnt
                # cd /mnt
                # sh setup-ut
                # cd /
                # umount /mnt
                # exit
            c.) Please Press Ctrl-Alt-F7 and click "Exit" button to finish 
                installation.

# cat setup-ut
#!/bin/sh
patch_rc() {
   if [ ! -f /etc/rc.d/rc.sysinit.orig ] ; then
      cp -f /etc/rc.d/rc.sysinit /etc/rc.d/rc.sysinit.orig
   fi

   if ! grep 'depmod -Aq' /etc/rc.d/rc.sysinit >/dev/null 2>&1 ; then
         sed -e '/depmod -A/s/depmod -A/depmod -Aq/' /etc/rc.d/rc.sysinit >/tmp/.rc.sysinit.tmp
         mv -f /tmp/.rc.sysinit.tmp /etc/rc.d/rc.sysinit
         chmod 755 /etc/rc.d/rc.sysinit
   fi
}

cleanup_driver() {
   find /lib/modules -name 'pdc-ultra.o' -exec rm -f {} \;
}

say_goodbye() {
   echo "done"
   echo ""
   echo "setup is complete."
   echo "unmount floppy disk and press Ctrl-Alt-F7 to return back"
   echo ""
   echo "-------------------------------"
   echo "Promise Technology, Inc (C)2002"
}

echo -n "Promise SATA150 Driver Installation."
if [ ! -f /etc/redhat-release ] ; then
   echo "failed"
   echo "have not chroot or installation not complete"
   exit 1
fi

ver=`cat /etc/redhat-release|awk '{print $5}'`

case ${ver} in
    7.3|8.0)
        patch_rc
        echo -n "."
        cleanup_driver 
        echo -n "."
        say_goodbye
        exit
        ;;
    *)
      ;;
esac

if [ ! -f modules.cgz ]; then
   echo "failed"
   echo "This is not SATA150 Driver Disk for RedHat Linux"
   exit 1
fi

if [ ! -e /etc/lilo.conf -a ! -e /boot/grub/grub.conf ]; then
   echo "failed"
   echo "RedHat Installation Not Complete"
   exit  1
fi

if [ -d /tmp/.ut_mod ]; then
   rm -rf /tmp/.ut_mod
fi
mkdir -p /tmp/.ut_mod
echo -n "."

cp modules.cgz /tmp/.ut_mod
if [ $? -ne 0 ]; then
   echo "failed"
   echo "Runtime error..setup abort!!(disk full or no permission?)"
   exit 1
fi
cd /tmp/.ut_mod
echo -n "."

zcat modules.cgz |cpio -id >/dev/null 2>&1
if [ $? -ne 0 ]; then
   echo "failed"
   echo "Runtime error..setup abort!!(corrupt file)"
   exit 1
fi
echo -n "."

#backup
if [ ! -f /etc/lilo.conf.orig ]; then
   cp -f /etc/lilo.conf /etc/lilo.conf.orig >/dev/null 2>&1
fi
if [ ! -f /boot/grub/grub.conf.orig ]; then
   cp -f /boot/grub/grub.conf /boot/grub/grub.conf.orig >/dev/null 2>&1
fi
echo -n "."

patch_rc
echo -n "."

for i in `\ls -d *`
do
   if [ ! -d /lib/modules/${i} -o ! -f /boot/vmlinuz-${i} ]; then
      continue
   fi

   minor=`echo ${i} | awk -F. '{print $2}'`
   if [ ${minor} -eq 2 ]; then
      cp -f ${i}/pdc-ultra.o /lib/modules/${i}/scsi/ >/dev/null 2>&1
   elif [ ${minor} -eq 4 ]; then
      cp -f ${i}/pdc-ultra.o /lib/modules/${i}/kernel/drivers/scsi/ >/dev/null 2>&1
   fi
   echo -n "."

   if [ ! -f /boot/initrd-${i}.ft ] ; then
      /sbin/mkinitrd -f --preload scsi_mod --preload sd_mod --with pdc-ultra /boot/initrd-${i}.ft ${i} >/dev/null 2>&1
   fi
   echo -n "."

   if [ -f /etc/lilo.conf ]; then
      if ! grep initrd-${i}.ft /etc/lilo.conf >/dev/null 2>&1 ; then
         sed -e '/vmlinuz-'${i}'$/a\' -e '        initrd=/boot/initrd-'${i}'.ft' /etc/lilo.conf > /tmp/.lilo.conf.tmp
         mv -f /tmp/.lilo.conf.tmp /etc/lilo.conf
      fi
   fi
   echo -n "."

   if [ -f /boot/grub/grub.conf ]; then
      if ! grep initrd-${i}.ft /boot/grub/grub.conf >/dev/null 2>&1 ; then
         RD=`awk '/vmlinuz-'${i}' / {print $2}' /boot/grub/grub.conf|sed -e 's/vmlinuz/initrd/'`
         sed -e '/vmlinuz-'${i}' /a\' -e '        initrd '${RD}'.ft' /boot/grub/grub.conf >/tmp/.grub.conf.tmp
         mv -f /tmp/.grub.conf.tmp /boot/grub/grub.conf
      fi
   fi
   echo -n "."

done

if [ -f /etc/lilo.conf ]; then
   /sbin/lilo >/dev/null 2>&1
fi

cleanup_driver
echo -n "."

say_goodbye
-------------------------



-- 
With best wishes,
 vlad                          mailto:faktroot@...l.ru

System/Network Administrator
TV/Video Engineer
ICQ 163227020
----------------------------------------------
Всегда прощайте ваших врагов. Ничто не злит их больше.

!DSPAM:455d60ab23999430751245!


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.