How to use cdrecord: burn it! ;)

Copy/paste from: http://www.mepis.org/node/1326. All the credits go to bhobjj

I agree. The command line is the easiest way to burn an iso.

Here is a short how-to I put together:
This is an attempt to convey a basic understanding of how cdrecord and mkisofs can be used. Please let me know of errors, omissions, &tc.



All of the graphical CD burning programs you use on your Libranet box are front ends to cdrecord. The quickest way to burn CDs is with cdrecord. Burning CDs with cdrecord is easy and fun. Blank CDs are cheap!
If you have downloaded an .iso file. The basic command to burn to a CD it is simply:

$ cdrecord dev=(address) /path/to/iso/file

If you enter the command:

$ cdrecord --help

You will see several pages of options go flying by. Some of these options are worth noting:
-v verbose mode
-eject opens your cup holder when the CD is finished
-dummy does a test run without burning
speed=xx sets the speed of the recorder. Without this set, cdrecord will burn at the highest usable speed. Unless there is a configuration entry limiting the speed.

The first step in using cdrecord, is to find the address of your CDR-RW device.
Enter the following command:

$ cdrecord -scanbus

On my computer, I got this output:

bob@Naylux:~$ cdrecord -scanbus
Cdrecord 2.01a07 (i686-pc-linux-gnu) Copyright (C) 1995-2003 J???rg Schilling

Linux sg driver version: 3.1.25
Using libscg version 'schily-0.7'
0,0,0 0) 'CD-RW ' 'CDR-5W48 ' 'VSG3' 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) *
1,0,0 100) 'ADAPTEC ' 'ACB-5500 ' 'FAKE' NON CCS Removable Disk 1,1,0 101) *
1,2,0 102) *
1,3,0 103) *
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *
1,7,0 107) *
Note that my CD burner address is 0,0,0
(I also have a removable media card reader that showed up at 1,0,0)

--> remember that CD burning is a hardware-intensive task for you
computer. While the CD is burning it is not a good time to start up
other programs.

I have downloaded BBC-Linux to my home directory.
The name of the file is bbc-2.1.iso
To burn this to a CD, I enter the command:

$ cdrecord -eject dev=0,0,0 -v /home/bob/bbc_2.1.iso

Or, I can do a test run with:

$ cdrecord -eject -dummy dev=0,0,0 -v /home/bob/bbc_2.1.iso

With a little bit of work, we can make things even simpler.
Edit the file /etc/defaults/cdrecord
Add the following 2 lines (with the address of your CD-RW):

cdrw=0,0,0 -1 -1 ""

Save the file.
Now you can burn with:

$ cdrecord -eject -v /path/to/iso


mkisofs command is used to create an iso9660 filesystem image to burn to a CD that can be read on most operating systems.
The basic command is:

$ mkisofs -o name.iso -options /path/_to/_where/_the/_files/_are/

If you enter the command:

$ mkisofs --help

You will see several pages of options go flying by.

Some of these options are commonly used
-o name of the .iso file
-J uses Joliet naming for Windows readability
-r uses Rock Ridge naming for UNIX readability
-v verbose mode
-V volume_name writes volume ID


I have a video that I want to burn to a CD that is in my home directory
The name of this video is vacation2000.avi
To make an iso, the command is

$ mkisofs -o vacation.iso -Jvr -V Bobs_Vacation /home/bob/vacation2000.avi

Then to burn the CD:

$ cdrecord -eject -v vacation.iso

When someone puts the CD in a windows machine, the CD icon has the label "Bobs_Vacation"


I want to make an iso of a CD so I can make lots of copies.

$ mount /cdrom

$ mkisofs -o WhateverYouWantToNameIt.iso -Jvr /cdrom/


As root, you can mount an .iso file as a loop back device to examine the contents.

If you do not already have a temporary mount directory, create one:

# mkdir /mnt/temp

Mount the iso file in the /mnt/temp directory:

# mount -t iso9660 -o ro,loop=/dev/loop0 /home/bob/vacation.iso /mnt/temp

No comments: