[root@~]# cdrecord fs=16m speed=4 dev=/dev/cdrom -dao driveropts=burnfree -v -data -nopad file.iso Burn iso into CD using cdrecord.Burn data to CD Creating an .iso file Once you've selected the files you want to copy, writing to a CD consists of two steps: creating an .iso with mkisofs, then burning to disk with cdrecord. Use the following to create the .iso file: mkisofs -o test.iso -J -r -v -V test_disk /home/carla/ In this example:* -o names the new .iso image file (test.iso) * -J uses Joliet naming records, for Windows compatibility * -r uses Rock Ridge naming conventions for UNIX/Linux compatibility, and makes all files publicly readable * -v sets verbose mode, for a running commentary as the image is created * -V provides a volume ID (test_disk); this is the disk name that shows up in Windows Explorer * Last in the list are the files selected for packaging into the .iso (everything in /home/carla/) Now, mount the .iso for verification / Checking: $ mkdir /test_iso $ mount -t iso9660 -o ro,loop=/dev/loop0 test.iso /test_iso Look at the directory contents; all your files should be there and readable. If they are not, the image is bad, and if you burn it onto a disk, you'll end up creating a coaster. Burning the disk Writing the image to disk is easy as pie. First find the SCSI address of your CD-R/RW: cdrecord -scanbus Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jrg SchillingLinux sg driver version: 3.1.24 Using libscg version 'schily-0.5' scsibus0: 0,0,0 0) 'TOSHIBA ' 'DVD-ROM SD-M1202' '1020' Removable CD-ROM 0,1,0 1) 'LITE-ON ' 'LTR-24102B ' '5S54' Removable CD-ROM 0,2,0 2) * 0,3,0 3) * 0,4,0 4) * 0,5,0 5) * 0,6,0 6) * 0,7,0 7) * Now write to disk: cdrecord -v -eject speed=8 dev=0,1,0 test.iso In this example:* -v is verbose * -eject ejects the disk when finished * -speed specifies write speed (8) * -dev is the device number (0,1,0) obtained from cdrecord -scanbus * Last is the name of the image being burned (test.iso) Copy disk To directly copy from the source disk to the recordable disk, use this command: cdrecord -v dev=0,1,0 speed=4 -isosize /dev/scd0 ORThis command directly streams the contents of the CD-ROM, /dev/scd0, to the CD recorder, dev=0,1,0. Don't do this on an old, slow machine. Direct copying is fast, but more error-prone. It is better to first copy the source disk to a hard drive, then copy from the hard drive to the CD recorder:
mount /cdrom -dummy is a marvelous option for doing a dry run before risking an actual disk. The recorder does everything with the laser turned off, giving the user a chance to catch errors before committing them to disk. Multisession The first time you record a session on a disk, use the -multi switch in cdrecord: cdrecord -v -eject speed=8 dev=0,1,0 -multi test.iso The disk will be fixated in a manner that makes it readable and open for adding more data. To add more sessions to this disk, mkisofs needs to know the starting and ending sector numbers, which you can find like this:cdrecord dev=0,1,0 -msinfo mkisofs -o test2.iso -J -r -V Session2 -C 0,27139 -M 0,1,0 /files/path/ Or better, let the command shell do the work:$ mkisofs -o test2.iso -J -r -V Session2 -C `cdrecord dev=0,1,0 -msinfo` -M 0,1,0 /files/path/ Multisession CD drives read the last session written. This command takes the TOC from the last session and combines it into the new TOC. For the last session on the disk, omit the -multi option.Resource : http://www.ibm.com/developerworks/linux/library/l-cdburn.html Server is hosted by Alanstudio Linux Operating System Recommend screen resolution 1024 x 768 / IE / FireFox Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved. |