Notes on IDE CD Burning under Debian

These are some tips on using an IDE cd burner under debian linux 2.2r3 without having to reboot your system when going between cd burning mode and listening to audio CDs.

Table of Contents

Background

Most of the documentation for cd burning under debian (e.g.,
the CD Writing HOWTO) either assumes you always want to be burning CDs, or that you're happy to be rebooting your machine between modes, since (at least on my machine) audio CDs don't work with the ide-scsi module. Rebooting offends me. This document describes my solution. It's inelegant, but it works.

My Machine

This information applies to my office machine: UNC users may recognize this as the "technology driven" CCI model, purchased in summer of 2001.

Theory and Requirements

The theory behind this method is simply to insert and remove the appropriate kernel modules, in the right order, to switch modes. It could certainly be written into a script, but I don't really have the time right now. You'll need the following bits of software to make this work:

To write a cd

First, fiddle with the modules:
  1. rmmod ide-cd
  2. rmmod cdrom
  3. insmod scsi_mod
  4. insmod sg
  5. insmod ide-scsi
  6. insmod cdrom
  7. insmod sr_mod Optionally, to compress data in the data directory:
    1. cd directory
    2. gzip -r *
    3. cd ..
    • To make the filesystem with the data:

      mkisofs -r -J -o tmpfile directory

    • Optionally, to blank a CD-RW:

      cdrecord -v speed=2 dev=0,1,0 blank=fast

    • To write the filesystem to the disc:

      cdrecord -v speed=2 dev=0,1,0 -data tmpfile

    To return to ide mode for audio playing

    1. rmmod sr_mod
    2. rmmod cdrom
    3. rmmod ide-scsi
    4. rmmod sg
    5. rmmod scsi_mod
    6. insmod cdrom
    7. insmod ide-cd