Home   Profile   Fun
#96 Linux  03.04.2007

Burn CDs and DVDs from the command line


Install the necessary package (Gentoo)
emerge dvd+rw-tools

Create an image with the name data.iso from the directory /home/backup
mkisofs -o data.iso -R -J /home/backup

If you like you can mount this image and check that everything is as it should be
mount -t iso9660 -o ro,loop=/dev/loop0 data.iso /mnt
ls /mnt
umount /mnt

Now the image can be written to a CD. You have to set the --dev parameter according to the device. The following command helps to find the name of the device.
cdrecord --devices --scanbus

Use the name displayed with the --dev paramter and write the CD.
cdrecord --dev=/dev/hdc --driveropts=burnfree --speed=12 --dao --overburn -v data.iso


Write /home/backup to a DVD
growisofs -Z /dev/cdrom -R -J /home/backup