The default linux kernel that comes with RedHat 7.0 (v2.2.16) is higly modularized, kitchen sink kenrel. This makes the kernel useful for installing on a wide range of hardware, but can make it tricky if you have an IDE/ATAPI CD-RW drive that you want to use for burning CD-ROMs. If you've read the CD-Wrinting HOWTO, you know that you have to convince your machine to treat your IDE CD-RW drive like it is a SCSI device. The main problem is that the default RedHat 7 kernel will, by default, treat all of your CD-ROM and CD-RW drives as if they are native IDe device. Below is a description of the changes that I made to get this working. It did not require recompilation of the kernel.
To begin, here is a short description of my IDE devices as reported in the /var/log/messages file during boot time:
Jan 26 16:44:02 taylor kernel: hda: IBM-DJNA-370910, ATA DISK drive
Jan 26 16:44:02 taylor kernel: hdb: IBM-DJNA-370910, ATA DISK drive
Jan 26 16:44:02 taylor kernel: hdc: CD-ROM CDU4011, ATAPI CDROM drive
Jan 26 16:44:02 taylor kernel: hdd: CR-4804TE, ATAPI CDROM drive
iIn the listing above, /dev/hdd is the CD-RW drive that I want to configure. Thie first thing I did was modify (as root) my /etc/lilo.conf file. The old version was:
The new version looks like this (changes in bold):boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
linear
default=linux
image=/boot/vmlinuz-2.2.16-22smp
label=linux
read-only
root=/dev/hda7
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
linear
default=linux
image=/boot/vmlinuz-2.2.16-22smp
label=linux
read-only
root=/dev/hda7
append="hdd=ide-scsi"Once you've finished editing the /etc/lilo.conf file, you'll have to re-run the lilo command to make the changes effective:
/sbin/liloThe next file we'll have to mofidy is the /etc/modules.conf file. In this file, we'll put a few lines to further convince the kernel to treat the CDRW drive like a SCSI device instead of an IDE device. The parts in bold are what I added. The most interesting part is the 'alias scd0 sr_mod' line. This means that when your machine reboots, the IDE CD-RW drive will be assigned to device /dev/scd0.
alias eth0 eepro100
options ide-cd ignore=hdb
alias scd0 sr_mod
pre-install sg modprobe ide-scsi
pre-install sr_mod modprobe ide-scsi
pre-install ide-scsi modprobe ide-cd
alias parport_lowlevel parport_pc
alias sound-slot-0 es1371
alias usb-controller usb-uhci
Once I had saved the changes to that file, I then restarted the computer. Although this sounds suspiciously like something you have to do with Windows computers, I am fairly sure it's necessary becuase of the added boot-time parameter we added in the /etc/lilo.conf file.
/sbin/shutdown -r nowOnce the machine rebooted, I ran (as root) the 'cdrecord -scanbus' command. See my previous doc on CD-RW for more information on where to get the cdrecord package if you don't already have it. This is the output that was generated:
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 ' 'CR-4804TE ' '2.2C' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
Once you see this output, you should be ready to burn CDs using your CD-RW drive. Again, see my previous doc on CD-RW for details on how to use mksisofs and cdrecord to actually burn CDs. The last two things that I would do to make the use of your CD-RW drive more convenient are (as root):
cd /dev ln -s scd0 cdrw
This will setup a symlink called
/dev/cdrwthat you can now use to refer to your CDRW drive. Lastly, you should put an entry into your /etc/fstab file that looks like this (changes in bold):LABEL=/ / ext2 defaults 1 1
LABEL=/boot /boot ext2 defaults 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/cdrw /mnt/cdrw iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
If you don't already have one, you should also 'mkdir /mnt/cdrw'. Once you've done that, you should be able to mount CD-ROMs using your CD-RW drive using the command 'mount /mnt/cdrw'.