[svlug] Coverting ide to scsi cd-rom's

Karl F. Larsen karl at zianet.com
Thu Apr 19 14:50:01 PDT 2001


	The other day someone asked about converting cd-rom devices using
an ide interface to a scsi interface. I gave an approximate answer that
was more wrong than right. Here is the exact poop for Red Hat 7.

	Step 1: Turn off the kernel module ide-cd. This is done in the
/ext/modules.conf file and here is mine. The last entry turns off ide-cd:

alias parport_lowlevel parport_pc
alias usb-controller usb-uhci
alias ide-cd off

	Step 2: Now turn on the module ide-scsi. I tried to do that also
in /etc/modules.conf but I missed something...:-( So I turn it on with
insmod in /etc/rc.d/rc.local as shown below:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

if [ -f /etc/redhat-release ]; then
    R=$(cat /etc/redhat-release)

    arch=$(uname -m)
    a="a"
    case "_$arch" in
	    _a*) a="an";;
	    _i*) a="an";;
    esac
    
    NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
    if [ "$NUMPROC" -gt "1" ]; then
        SMP="$NUMPROC-processor "
        if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then
            a="an"
	else
	    a="a"
        fi
    fi

    # This will overwrite /etc/issue at every boot.  So, make any changes you
    # want to make to /etc/issue here or you will lose them when you reboot.
    echo "" > /etc/issue
    echo "$R" >> /etc/issue
    echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue

    cp -f /etc/issue /etc/issue.net
    echo >> /etc/issue
fi

insmod ide-scsi

	Make sure it works by testing it with the file cdrecord. As root
type cdrecord -scanbus and you will get a result like this:

[root at cannac karl]# cdrecord -scanbus
Cdrecord 1.9 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling
Linux sg driver version: 2.1.38
Using libscg version 'schily-0.1'
scsibus0:
        0,0,0     0) 'MITSUMI ' 'CD-ROM FX600S !B' 'P01 ' Removable CD-ROM
        0,1,0     1) 'HP      ' 'CD-Writer+ 9100 ' '1.0c' Removable CD-ROM
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) *
[root at cannac karl]# 

If you get this your ready to burn cd-roms. Also you need to rewrite the
lines in fstab turning on your cd-roms to using /dev/scsi. Lots of fun and
only in Linux can you do this kind of thing...



-- 
Yours Truly,

  	 - Karl F. Larsen, k5di at arrl.net  (505) 524-3303  -






More information about the svlug mailing list