Burning a CD
mkisofs -J -hide-joliet-trans-tbl -r -o cdimage.iso cddata/ cdrecord -v -dummy cdimage.iso cdrecord -v cdimage.iso
Copying a CD
dd if=/dev/cdrom of=cdimage.iso ibs=10000
Burning ext2fs to CD
mkdir /root/cdburn dd if=/dev/zero of=/root/cdburn/archive-CD.iso bs=2048 count=260000 mke2fs -b 2048 /root/cdburn/archive-CD.iso mkdir /root/mount mount /root/cdburn/archive-CD.iso /root/mount/ -t ext2 -o loop cp /opt/stuff-to-back-up/* /root/mount/ umount /root/archive-CD.iso cdrecord -v archive-CD.iso mount /dev/cdrom -t ext2 /mnt/cdrom/ ls -l /mnt/cdrom/
Burning a multisession CD
The first session
$ mkisofs -r -J -hide-joliet-trans-tbl -o <name>.iso <cdrootdir><br>
To test the image
$ mount -t iso9660 -loop <name>.iso /tmp/mnt
Check out what you have under /tmp/mnt.
$ umount /tmp/mnt
To test the cdrecord settings
$ cdrecord -v -multi -data -dummy <name>.iso
To write
$ cdrecord -v -multi -data <name>.iso
The second session
$ cdrecord -msinfo <last_sess_start>,<next_sess_start> $ mkisofs -M 0,0,0 -C <last_sess_start>,<next_sess_start> -r -J -hide-joliet-trans-tbl -o <name2>.iso <cdrootdir2> $ cdrecord -v -multi -data <namex>.iso
Nasty trap: The new directories/new track are not seen until the CD-ROM has been ejected and remounted.
The last session
$ cdrecord -msinfo <last_sess_start>,<next_sess_start> $ mkisofs -M /dev/cdrom -C <last_sess_start>,<next_sess_start> -r -J -hide-joliet-trans-tbl -o <namex>.iso <cdrootdirx> $ cdrecord -v <namex>.iso
Note: Linux treats the CD writer as a SCSI device, so pass a "hdX=ide-scsi" to the kernel line in your grub.conf, where hdX is your ide CD writer. (The upcoming 2.6 kernels do not need this; it can send the ATAPI commands to the CD writer via the usual /dev/hdX IDE interface; no need for ide-scsi.)
Links...
