CD Burning in Linux

Our machines (Dell gx270 and HP dc7700) have cdrw drives built in. These machines no longer have floppy or zip drives. If you don't want to use a flash drive, becoming familiar with how to burn is very important.

Burning from the shell

With so many GUIs out there one might wonder, "Why use anything command line?" I think the answer is fairly simple: its easier. There may not be any 3d penguins or raised status bars, but sometimes there are some nice ASCII spinners. I think the quickest way to burn a CD is the CLI way.

Making an ISO

Instead of taking data and throwing it directly onto a CD, we first make an iso image to burn later. This is advantageous for several reasons which I will not elaborate. So, lets say that all the data that we want is in a certain directory called directory. Here is the command that we issue to make an iso of this directory:

$ mkisofs -r -v -o myNewIso.iso directory/

I'll explain a couple of those command line arguments. The -r is to enable Rock Ridge Extensions, the -v stands for verbose, the -o lets you specify the output file, and directory/ is the directory containing the files that will be in the ISO image. Another thing you might want to do if you want to be Windoze friendly is add a -J this enables Microsoft Joliet Extensions which are very Microsofty and tend to help less fortunate operating systems read CD's.

Ok, that was easy enough now lets say you want to take multiple directories and stick them in the root directory of a CD. Well, the command would look like this:

$ mkisofs -r -v -o myNewIso.iso -graft-points "/=./directory1/" "/=./directory2/"

Burning using cdrecord

Now that we've made our image we need to burn it onto the CD. This is a very simple process:

$ cdrecord dev=/dev/hdc --eject myNewIso.iso

That's it, now we just sit back and watch the magic. When we are done burning the CD will be ejected.

Burning with k3b

k3b is a cd burning program that has been optimized for kde (uses qt for gui rather than gtk). It works as both a front end for various programs: cdrecord, cddao, mkisofs, readcd, and others. It provides an easy way to create cds. Featuring an intuitive drag-and-drop interface, and built in audio format conversion handling, it has everything you'll need for making cds.

k3b basics

When you first startup k3b (either by typing k3b, or opening it in the menus) you'll be presented with this:

Starting.png

Now you should just pick what type of project you need to burn (usually just a data cd) by clicking on its icon.

NOTE:

We do not have DVD burners, do not select this as an option.

Burning a data cd

Datafirst.png

At this screen all you need to do is drag-and-drop the files the files you want to burn. The contents of the directory you're in is the upper-right box. Your home directory, and sub-directories are in the upper-left hand box. You can drag-and-drop from both of these. Below the "Current Projects" banner is where you want to drag the files to. As you do the guage on the bottom will fill up. The bar will be green while the data still fits a 700 MB (80 min) CD. Here's an example of me backing up my home directory:

Homeback.png

Now if you decide to stuff too much onto a cd, the guage's colors will change, like this:

Toofull.png

Yellow is when you're close to what k3b considers the CDs limit. CDs tend to be somewhere in this yellow area. Red means you're too far, and it'll never work.

Now that we have a cd that is fills the proper size, we can start burning. You can click the "Burn..." button at the bottom right, the burn button on the toolbar, open up "Project" "Burn CD" in the menu, or just hit ctrl-b. This will open up the burning dialog.

Databurn.png

In this you have the options to set before you burn. The important items are:

  • tab: Settings: Multisession. If you'd like a cd to be used multiple times until is is full, pick start multisession. If you have a multisession disc in to burn to, pick continue multisession. And if this is going to be the last track on the multisession disc, pick Finish Multisession.
  • tab: Volume Desc. This lets you name the CD, make it part of the set, etc.
  • tab: Filesystem. Setting Joliet extensions will allow for Windows' fancy naming scheme, though barely palpetable in linux.

The default settings will be fine for both linux and windows, so just clicking burn here will be fine.

Burnstatus.png Burndone.png

And now the CD ejects, and you're done burning a data CD!