How to Burn CDs Under Linux 08/23/2004 I wanted to burn the images/boot.iso image from the first RHEL CD so I could use it to install. Basically, one uses cdrecord to burn an image. First, determine the address of your CD writer. cdrecord -scanbus On jenny, this returned Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling Linux sg driver version: 3.1.25 Using libscg version 'schily-0.7' cdrecord: Warning: using inofficial libscg transport code version ... scsibus0: 0,0,0 0) 'FUJITSU ' 'MAJ3091MP ' '5508' Disk 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) * scsibus1: 1,0,0 100) * 1,1,0 101) * 1,2,0 102) 'PLEXTOR ' 'CD-R PX-W8220T' '1.05' Removable CD-ROM 1,3,0 103) * 1,4,0 104) * 1,5,0 105) * 1,6,0 106) * 1,7,0 107) * The Plextor CD/RW is address "1,2,0", so my cdrecord command will be cdrecord -eject -dummy dev=1,2,0 -v /mnt/cdrom/images/boot.iso to do a test (i.e. "dummy") run, or cdrecord -eject dev=1,2,0 -v /mnt/cdrom/images/boot.iso to really write it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To burn a whole directory tree to a CD, you first must create a CD image file from that directory, then you can feed that CD image file to the cdrecord command. To create an image for a ISO 9660 filesystem with Rock Ridge extensions, mkisofs -R -o cdimage.raw /master/tree then you would cdrecord -eject dev=1,2,0 cdimage.raw And of course, you can combine these two steps into one with pipe, like what we did to write Sandy's data on jenny, mkisofs -R weekly_backups/pct | cdrecord -eject dev=1,2,0 - But this was 3.5GB, so wouldn't fit on a simple CD. It failed with ... 18.56% done, estimate finish Tue Feb 15 18:15:24 2005 18.83% done, estimate finish Tue Feb 15 18:15:21 2005 19.10% done, estimate finish Tue Feb 15 18:15:18 2005 19.37% done, estimate finish Tue Feb 15 18:15:15 2005 19.65% done, estimate finish Tue Feb 15 18:15:18 2005 cdrecord: Input/output error. write_g1: scsi sendcmd: no error CDB: 2A 00 00 05 7D 89 00 00 1F 00 status: 0x2 (CHECK CONDITION) Sense Bytes: 70 00 09 00 00 00 00 0A 00 00 00 00 80 0A 00 00 Sense Key: 0x9 Vendor Unique, Segment 0 Sense Code: 0x80 Qual 0x0A (vendor unique sense code 0x80) [No matching qualifier] Fru 0x0 Sense flags: Blk 0 (not valid) resid: 63488 cmd finished after 0.001s timeout 40s write track data: error after 736905216 bytes Sense Bytes: 70 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 cdrecord: Input/output error. close track/session: scsi sendcmd: no error CDB: 5B 00 02 00 00 00 00 00 00 00 status: 0x2 (CHECK CONDITION) Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 2C 04 00 00 Sense Key: 0x5 Illegal Request, Segment 0 Sense Code: 0x2C Qual 0x04 (current program area is empty) Fru 0x0 Sense flags: Blk 0 (not valid) cmd finished after 0.001s timeout 480s cmd finished after 0.001s timeout 480s This worked, though mkisofs -R weekly_backups/pct/SPIDI_042005.tar.gz | cdrecord -eject dev=1,2,0 - since that one file was only 591MB. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -