One Aging Geek

Thursday, November 13, 2003

Adding an IDE CD-RW to Red Hat after install is done

Over the weekend I plunked my old 4X HP CD writer into the Red Hat 9 system I just built.

Getting it to work (*note 1) took longer than it should have because of too much outdated information on the 'Net.

Here's all it came down to:

  1. Kernel: Do nothing. Most online info starts you off reconfiguring and building a kernel. This is almost certainly unnecessary with a current distro. And it is definitely unnecessary with Red Hat 9. Everything you need is already defined as modules.
  2. Boot params: It's necessary to add "hdx=ide-cd" (where "x" is dependent on where your CDRW is attached, for me it's the second drive on the second IDE controller so it's "hdd") to the kernel parameters. For GRUB that meant editing /boot/grub/grub.conf and adding that to the "kernel" line.
  3. Modules config: I added the following lines to /etc/modules.conf
    alias scd0 sr_mod           # load sr_mod upon access of scd0
    pre-install sg     modprobe ide-scsi # load ide-scsi before sg
    pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod
    pre-install ide-scsi modprobe ide-cd # load ide-cd   before ide-scsi
    
  4. Reboot.

I don't know if Red Hat would have figured this all out if the drive had been present at install. I do know that Mandrake 9.1 did config it all "by magic" in that situation.

Note 1: "Working" isn't totally verified as I have yet to actually burn a CD. But the command "cdrecord -scanbus" shows the drive.