Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown    


( WARNING: for the new 2.6 kernel, see the remark in the NOTE at the end !! )

CDrecord is the default commandline cd burning tool in Linux . . . simple and effective
For burning ISO´s it's pretty straightforward:

$ cdrecord dev=0,0,0 distro.iso

But if you want to burn files and directories to CD it requires a bit more: first we will have to use the “mkisofs” command to make an iso of the files.
If you want to use the CD in linux, the following arguments are recommended:

$ mkisofs -R -r -v -o filename.iso file1 file2 file2 dir1 dir2

-R is for Rock Ridge extensions
-r is to preserve the UID/GID info
-v is more output so you can see what is going on
-o is to set the name of the outputfile ( filename.iso )

After making the ISO you can check the content of the ISO with:

$ isoinfo -f -R -i filename.iso

Now we can burn the ISO to CD, first we have to know the “dev=” numbers:

$ cdrecord --scanbus

( NOT with 2.6 kernel !! )

The output will end like this:

QUOTE (Text @ Screen)
       0,0,0     0) 'LITE-ON ' 'LTR-16102C      ' 'US52' 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) *

And in this case it will show you the numbers are 0,0,0

Now we can burn:

$ cdrecord -v dev=0,0,0 filename.iso

Or we can give a few extra arguments:
$ cdrecord -v -multi -eject speed=16 dev=0,0,0 filename.iso

This will allow a multisession disk that will be ejected after burning at speed x16

Sure, I know, this all seems complicated, and K3b ( the GUI front-end for cdrecord ) looks simpler to use . . . but once you have learned to do it this way you will see that the commandline is better and puts all your computer power in the burning and not in the fancy GUI

More about CD and DVD commandline burning, read Here


NOTE: For the new 2.6 kernel things have changed for CDrecord . . no more "--scanbus" but now we do "dmesg | grep CD" to determine the device:
In Mandrake 10, and probably soon in other distro's with the 2.6 kernel, first do:

# dmesg | grep CD

to see what /dev/hd?? your burner is located . . and then:

# cdrecord  dev=/dev/hdc  filename.iso

That is all . . . .

See also: Next Tip for the reason why this change is.

-- Jan 20 2004 ( Revised Apr 30 2006 ) --

Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown