http://www.linux-sxs.org/hardware/ide.html
AUTHORS: Jordan (original version, unknown Caldera system) Kevin O'Gorman (for RedHat 6.1 and Caldera 2.4) Jon Kosbab (for step 8 and some updating tips)
Updated Dec. 28, 2001 Tested on:
2.4, 3.1 6.x, 7.x
Caldera 2.4, 3.1; RedHat 6.1. 7.0
These Steps assume you have only one CD device, and that's your cdr or cdrw CD burner, and that if it is known by a symbolic link, that link is /dev/cdrom. If you have more, it should not be too hard to determine how to modify these Steps. For instance, I (Kevin O'Gorman) have two on the machine where I tested these steps; they are known by the symbolic links /dev/cdrom and /dev/cdrw, and I followed these steps replacing /dev/cdrom with /dev/cdrw.
Edit your configuration file. This will depend on how you boot Linux.
If you use LILO, edit /etc/lilo.conf so that under your present boot section you have
append = "hd?=ide-scsi"
(where the question mark is replaced with the drive designation of the CD-R or CD-RW drive, for example for the common arrangement where it's the secondary master ide device you would have hdc=ide-scsi). If there's already an append line there, just add this to it. Save the lilo.conf you just edited and then type: /sbin/lilo (on a root command line).
On the other hand, if you use GRUB (which is what COL2.4 & RH7.2 and higher uses by default), you add
hd?=ide-scsi
to the kernel line in your menu.lst file. Note that there are no quotation marks, and the word "append" does not appear. You do not need to run GRUB for this to take effect; GRUB knows where this file is and reads it every time it boots.
Either way, your loader is now set up to pass that hd?=ide-scsi string to the kernel, which is where it is interpreted.
Identify the device you will be using for the SCSI device. If you are using Caldera, or are using a recent version of the xcdroast program, it will be of the form /dev/sr?, probably /dev/sr0. That's because the DEV package of Caldera creates these devices and so does xcdroast. On the other hand, if you're using RedHat without xcdroast, you'll find devices of the form /dev/scd?, and you'll probably use /dev/scd0. These are created by the dev (not uppercase) package of Redhat. Aren't distributions wonderful? In any case, these instructions are written as if you're using xcdroast, so they assume you're using /dev/sr0.
All of this is different if you're running DEVFS, so beware, however…
Whatever your system uses, you'll find that the device number (shown by ls -lad /dev) is 11,0. If you're on a RedHat system and you want to follow along, you can create the device yourself by the command:
# mknod /dev/sr0 b 11 0 # mknod /dev/sr1 b 11 1 etc...
If your /dev is bare of these device entries for some reason, you can make them wholesale by executing the script
test `whoami` = 'root' || echo "Only root can execute the commands." cd /dev/ umask -S u=rwx,g=rwx,o-rwx [ -f loop0 ] \ || ./MAKEDEV loop \ || for i in 0 1 2 3 4 5 6 7; do mknod loop$i b 7 $i; done [ -f sg0 -o -f sga ] \ || ./MAKEDEV sg \ || for i in 0 1 2 3 4 5 6 7; do mknod sg$i c 21 $i; done
Examine your /etc/fstab, finding the line for /mnt/cdrom. If this line contains /dev/hd?, where the ? mark is a digit, change this hd? to sr?, where sr? represents the scsi cdrom number. On a computer where the cdr is /dev/hdc and there is no other scsi cdrom or cdr, you would change the /dev/hdc to /dev/sr0. Use any text editor to make this change.
If instead the line contains /dev/cdrom, you should find that /dev/cdrom is a symbolic link to an IDE device. Change the link to point to the appropriate scsi cdrom device. On a computer where the cdr is /dev/hdc and there is no other scsi cdrom or cdr, you would enter the following commands (as root):
# rm /dev/cdrom # ln -s /dev/sr0 /dev/cdrom
Ensure the following modules are either built into the kernel, or else loaded and set to load at startup.
scsi_mod sg sr_mod ide-scsi
For Caldera systems, you can load the modules using COAS and set them to load at startup, or else edit /etc/modules/default so that it includes these modules.
For RedHat 6.1, only modules sg and ide-scsi need to be loaded; the others are built into the default kernel. Also for RH 6.1, to have these modules loaded at startup, create or edit the file /etc/rc.d/rc.modules so that it contains the lines
#!/bin/sh /sbin/modprobe sg /sbin/modprobe ide-scsi
and make this file executable (mode 755); it will be called automatically by the script /etc/rc.d/rc.sysinit.
RedHat 7.0 is similar, but the file is /etc/rc.modules, i.e. it's been promoted up in the directory tree.
Instructions on creating a desktop icon so that it can be auto-mounted One thing I had to do was edit /etc/am.d/localdev and insert this line:
cdrw addopts:=utimeout=10
I had installed my burner under Webmin as an additional ISO9660 cd-rom that wouldn't be mounted at bootup (and not a read-only device). By doing this and adding the above line to localdev, the time to boot up is reduced. If you just create the icon without editing the file then an error comes up saying something like "could not access /auto/cdrw. File does not exist or access denied." If the cd you insert has an autorun.sh file it will still auto-mount.