Old page: AudioVideo (transitional).

Using a CD or DVD burner in Debian has very different requirements based on whether you are using Linux 2.2-2.4, or Linux 2.6.

Setting Up Drivers

Linux 2.4 and earlier

In Linux 2.4 and earlier, you should use the ide-scsi driver, which means you generally have to tell the kernel not to let the CD-ROM be recognized by the normal IDE driver, and instead, be seen as a SCSI device. This is typically done by adding a line like


to your /etc/lilo.conf file and re-running lilo and rebooting.

If you use Linux 2.4.x with GRUB (the sarge default), then what you do is:

  1. Open the /boot/grub/menu.lst file in a text editor.

  2. Find the line that says
    •   # kopt=root=....
  3. Edit that line and put hdc=ide-scsi on the end of it (after a space). Do not remove the # from the start of the line. Yes, this is a comment line. Leave it as a comment.

  4. Run update-grub to apply that comment line to all the GRUB boot stanzas.

Each time you install a new kernel image package, Debian will re-run update-grub for you, so you only have to do it by hand one time.

After updating your boot loader, reboot.

You can verify that your IDE-SCSI is working by running cdrecord -scanbus; your CD burner should be detected as a SCSI device with a numeric-triplet designation (often 0,0,0). For example:


Then you can burn ISO images to this device using a command such as

cdrecord dev=0,0,0 driveropts=burnfree image.iso

If you are not burning as root, you may have to ensure that your user account has write permissions on the proper devices. For SCSI devices (including emulated IDE-SCSI), you need write permission on both the SCSI CD device (/dev/scd0 or /dev/sr0) and the "generic" SCSI device (/dev/sg0). Add users to the cdrom group and, if necessary, ensure that the cdrom group owns the appropriate device nodes.

Linux 2.6

For Linux 2.6, ide-scsi is no longer supported; instead, you are expected to use the "normal" ide-cd driver if you have an IDE device. Newer versions of cdrecord have been modified to support this use. You detect the drive with:

cdrecord -scanbus dev=ATA:

And then burn with something like:

cdrecord dev=ATA:0,0,0 driveropts=burnfree image.iso

For DVD burning, you basically have two choices: cdrecord-ProDVD (non-free software, not packaged), or the dvd+rw-tools package. For details on using dvd+rw-tools, see the documentation in /usr/share/doc/dvd+rw-tools and the growisofs man page. There are also some patched versions of cdrecord that "support" DVD burning, but these tend to be flaky and not well supported.

Permissions on /dev/hdc (etc.) in sarge should be set up such that the cdrom group has read and write permissions on the CD devices. Add users to the cdrom group to let them burn CDs, or just do your burning as root. (If you run Linux 2.6.8 you may have to do it as root due to bugs introduced in that version of Linux.)

(Note: some people use the dev=ATAPI: driver instead of the dev=ATA: driver. ATAPI: is officially deprecated, but there is much confusion among Linux users as to which is the correct device. Also, alarmingly, some users have reported that for their particular needs, the ATAPI: driver actually works better. If you have problems, it's worth trying it.)

There is also a nice GUI program called k3b which can be used to burn CD/DVDs. It is very easy to use and I always had good results with it --- Added by KamarajuKusumanchi

How do I burn a bunch of MP3s to a CD?

Most people seem to take the lazy route and use a graphical front-end to manage this for them.

If you're doing this by hand, then the steps are really quite simple:

  1. Decode the MP3s (or Oggs, or whatever) to raw CD data.
    •   /myalbum$ i=1; for f in *.mp3; do mpg321 --cdr /tmp/$(printf %02d.cdr $i) "$f"; let i++; done

    For Oggs, you'd use an ogg123 command instead of mpg321.

  2. Burn the CD data to disc.
    •   /tmp$ cdrecord -pad -audio dev=0,0,0 driveropts=burnfree *.cdr

Don't forget to remove the CD data files when you're done.

Here's another sample command which extracts the MP3 file names from a *.m3u file, which is written in MS-DOS mode (CR-LF line endings, such that the CRs need to be stripped away).

This command requires Bash (see ShellTricks or the #bash FAQ for explanations).

Creating an iso image on your own

 mkisofs -J -r -o the.iso /the/directory/ 

How do I create an iso image of an existing CD?

cdrecord comes with a tool called readcd, here's an example

readcd dev=0,0,0 -f=the.iso -v 

Loopback mounting an iso image

If you want to check the contents of an iso image you can loopback mount it like this

 mount -o loop the.iso /mnt/point 

Checking the md5 sum of an iso image

You can use openssl or md5sum to check the integrity of the download

 openssl md5 the.iso 
 md5sum the.iso 

How to burn a .cue/.bin image?

If you have a os42-dev.cue like this

FILE "os42-dev.bin" BINARY

and a .bin you can burn them using cdrdao:

 cdrdao write --speed 4 --device 0,1,0 os42-dev.cue