Writing data to write-able and re-write-able CDs and DVDs and Blu-Ray media is commonly referred to as "burning". This tutorial covers the default burning software provided with Ubuntu as well as command line burning. There are also alternative burning programs to consider such as xcdroast or k3b.
For better results try the slowest burn speed reasonably possible. Most Gui tools have a "Properties" button to select speed but with Brasero those sorts of options appear after pressing the 1st "burn" button. Slower speeds ensure greater accuracy.
Graphical User Interface(GUI)
This section covers using a GUI for burning.
Burning ISO images
For burning ISO images like the Ubuntu LiveCD using a GUI, please refer to the BurningIsoHowto page.
Burning Files to CD or DVD
- Insert a blank CD or DVD into your drive
- Wait for the pop-up and choose Data or Music CD (older versions may offer a Photo CD option, and is identical to the Data CD option)
To burn a Music CD, see AudioCDCreation
To burn a Data CD, drag the data over to the window and click Burn
Copying Discs and Other Advanced Operations
You can copy CDs and DVDs, erase (blank) rewritable media and more with Brasero or GnomeBaker. Both are traditional dedicated CD burning programs which are part of the GNOME project. Brasero is include by default in a standard Ubuntu release. GnomeBaker is faster and lighter but doesn't do as many different things, it would need to be installed to use it.
Click Applications -> Sound and Video -> Brasero
- Create a new project when prompted.
Click Help -> Contents if further help is needed.
Brasero and K3B can't burn Blu-ray out of the box. In order to do so you have to install the cdrecord package from this PPA https://launchpad.net/~brandonsnider/+archive/cdrtools and in doing so you will be uninstalling wodim which is used by default and does not support BD-R media. See how to add a PPA.
Once you added the PPA, simply install cdrecord package as any other package.
Then you have to install K3b if you did not have it already installed and enable "Show advanced GUI elements" in the advanced settings.
Make sure in the "Programs" setting that cdrecord is being used. Use the "search" button to make K3b find cdrecord is necessary.
Once Show advanced GUI elements is enabled, the burn dialog will let you select cdrecord as the "Writting app" and in the "Misc" tab you have to select "No multisession".
Command Line (Terminal)
Burning a CD or DVD using Command Line tools
This section details the use of the command line(terminal) to burn either a CD or DVD disk.
Creating an ISO image
A command called mkisofs can make an .ISO image to be burned or mounted.
genisoimage -r -J -o cd_image.iso /directory
The -r and -J ensures long file names work for Unix (using Rock Ridge) and Windows (using Joliet extensions) respectively.
Checking CD Images Before Burning
It's possible to check CD images before burning. The easiest way is to simply double-click on it from the file browser, which will view the image with the Archive Manager.
- If you have sudo access, you can also mount the image, and explore its contents
sudo modprobe loop sudo mount -t iso9660 -o ro,loop=/dev/loop0 cd_image.iso /media/cdromRemember to unmount an image after checking:
sudo umount /media/cdrom
Burning a CD on the Command Line with wodim
cdrecord can burn an ISO(.iso) disk image or other data onto a CD. To burn a data CD (using image prepared earlier):
First see where the CDROM/DVDROM is located. Something like this
$ wodim --devices wodim: Overview of accessible drives (1 found) : ------------------------------------------------------------------------- 0 dev='/dev/scd0' rwrw-- : 'LITE-ON' 'DVDRW SOHW-1633S' -------------------------------------------------------------------------
After finding the info. from device scanning, take the appropriate target. This is important if there are more than one device on the system.
In my case /dev/cdrw and /dev/dvdrw both point to /dev/scd0
$ ls -l /dev/cdrw lrwxrwxrwx 1 root root 4 2009-01-26 21:56 /dev/cdrw -> scd0
$ ls -l /dev/dvdrw lrwxrwxrwx 1 root root 4 2009-01-26 21:56 /dev/dvdrw -> scd0
Hence one can use the following notation :-
wodim dev=/dev/cdrw -v -data cd_image.isoTo burn an audio cd from wav files:
wodim dev=/dev/cdrw -v -audio [wav files...]
Replace /dev/cdrw as needed if this is not your CD-Writer
-v (verbose) lets you track the recording progress
Blanking a CD/RW
To reuse a rewritable CD or DVD you first need to 'blank' the disk. This erases the old data and prepares the disk for new data. First of all, make sure the CD has been unmounted.
Then, type the following command, which will erase all the content inside the disk. Operation might take a while and executing the below command as is will only give you a 'Blanking entire disk' message with no progress bar or percentage display.
wodim -vv dev=/dev/cdrw blank=all
As stated before, replace /dev/cdrw as needed if this is not your CD-Writer when it applies.
Using wodim on "unsupported" drives
Sometimes Ubuntu fails to detect and configure your Burner. This results in "no media found" if you use 'wodim dev=/dev/cdrw'. Even 'wodim -scanbus' does not work - so you just don't know, how to address the drive. You can work around this by looking into the boot messages with dmesg, to identify the devicepath to your burner.
$ dmesg hda: PIONEER DVD RW DVR-108, ATAPI CD/DVD-ROM drive hdb: IDE DVD-ROM 16X, ATAPI CD/DVD-ROM drive [...] hda: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2000kB Cache
Ok so we know, it is hda.
- Now you can burn on this drive using:
wodim dev=ATAPI:/dev/hda -data -v -eject your_data.iso
Burning a DVD or Blu-Ray Disc
Install the dvd+rw-tools package. See [InstallingSoftware].
Use the packages growisofs application to burn a DVD or Blu-Ray disc.
growisofs -Z /dev/dvdrw -R -J /some/files
growisofs -speed=2 -dvd-compat -Z /dev/dvdrw=dvd_image.iso
Note that -dvd-compat closes the disk in write-once context (DVD+R or DVD-R).
Add additional sessions by using
growisofs -M /dev/dvdwriter additionaldata
Blanking DVD+RW discs
dvd+rw-format -blank /dev/cdrw