Difference between revisions of "DVD Burning"

From ArchWiki
Jump to: navigation, search
m (moved DVD writing to DVD Writing: proper capitalization; matches DVD Ripping)
(rewrite)
Line 1: Line 1:
 
[[Category:Utilities (English)]]
 
[[Category:Utilities (English)]]
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
{{i18n_links_start}}
+
{{Article summary start}}
{{i18n_entry|English|:DVD writing}}
+
{{Article summary text|An overview of DVD writing tools and methods.}}
{{i18n_entry|Français|:DVD writing(Français)}}
+
{{Article summary heading|Available in languages}}
{{i18n_links_end}}
+
{{i18n entry|English|DVD Writing}}
 +
{{Article summary heading|Related articles}}
 +
{{Article summary wiki|DVD}}
 +
{{Article summary wiki|CD Burning Tips}}
 +
{{Article summary end}}
  
==Introduction==
+
Writing (or "burning") DVDs requires a different approach than burning CDs. DVDs offer much higher capacities, and the standard CD writing tools will not suffice.
Writing (or "Burning") DVDs is different from CDs. DVDs can contain much more data (I use 4.7GB single-layer discs), and the standard CD writing tools don't suffice anymore.
+
  
This howto only covers a very simple part for now: writing data onto DVDs using the command line.
+
This HOWTO covers a narrow scope for now: writing data onto DVDs using the command line.
  
==Tools for the job==
+
==Required packages==
#You still need the standard CD writing tools known as '''cdrtools''' (which can be replaced by '''cdrkit''').
+
# You still need the standard CD writing tools known as {{Package AUR|cdrtools}} (which can be replaced by {{Package Official|cdrkit}}, if desired).
#You also need the new DVD writing tools known as '''dvd+rw-tools''', found in the '''extra''' repository.
+
# You also need the new DVD writing tools known as [http://www.archlinux.org/packages/extra/i686/dvd+rw-tools/ <tt>dvd+rw-tools</tt>], found in the [extra] repository.
  
'''Note 1''': Do not install the package known as '''dvdrtools'''. It conflicts with cdrtools, and dvd+rw-tools is a better DVD writing package than dvdrtools.<br>
+
{{Note|Do not install the package known as {{Package Official|dvdrtools}}. It conflicts with {{Package AUR|cdrtools}}, and [http://www.archlinux.org/packages/extra/i686/dvd+rw-tools/ <tt>dvd+rw-tools</tt>] is the superior DVD writing package.}}
'''Note 2''': If you wish to use a graphical frontend, install '''k3b''' and you need to read no further.<br>
+
'''Note 3''': I used to use '''xcdroast''' for my CD writing needs, but I found it to have grown buggy and outdated. I also don't trust its method for writing DVDs. However, if you can reconcile my view on xcdroast, feel free.
+
  
''Update 2006-07: I have found '''graveman''' to be an excellent replacement for xcdroast, so you can also use that instead.''
+
{{Tip|If you wish to use a graphical front-end, install {{Package Official|k3b}} or {{Package Official|brasero}} and you need to read no further.}}
  
==Getting the job done==
+
==Procedure==
Your new friend to burning DVDs will be the command ''''growisofs'''' from the DVD+RW-tools package. If you've ever written CDs from the command line before, you'll know the process of first creating an iso9660 file ('''mkisofs'''), and then burning it to CD ('''cdrecord'''). growisofs merges these steps for you, so you don't need extra storage space for the ISO file anymore. Another advantage is that multisession[http://www.google.com/search?hl=en&lr=&oi=defmore&q=define:Multisession ?] writing has been simplified. I won't explain how it ''used'' to be done, but I will explain how it works with growisofs.
+
This HOWTO will use the command {{Codeline|growisofs}} from the [http://www.archlinux.org/packages/extra/i686/dvd+rw-tools/ <tt>dvd+rw-tools</tt>] package. If you've ever written CDs from the command line before, you'll know the process of first creating an iso9660 file ({{Codeline|mkisofs}}), and then burning it to CD ({{Codeline|cdrecord}}). {{Codeline|growisofs}} merges these steps, so you don't need extra storage space for the ISO file anymore. Another advantage is that multisession writing has been simplified.
  
===basics===
+
===Overview===
In basics, writing a '''new''' DVD goes like this:
+
Essentially, writing a '''new''' DVD follows this procedure:
  growisofs -Z ''/dev/cdrw'' -r -J /path/to/files
+
  $ growisofs -Z /dev/cdrw -r -J /path/to/files
Where /dev/cdrw is your DVD writer device.
+
  
To '''continue''' a DVD (write an additional session) you use:
+
where {{Filename|/dev/cdrw}} is your DVD writer device.
growisofs -M ''/dev/cdrw'' -r -J /path/to/files
+
  
'''-Z''': start at the beginning of the DVD using the following device,<br>
+
To '''continue''' a DVD (write an additional session) you use:
'''-M''': start after the last session on the disc using the following device,<br>
+
$ growisofs -M /dev/cdrw -r -J /path/to/files
'''-r''': Rockridge support with sane permission settings (Recommended, extended UNIX info.  Note that <tt>'''-r'''</tt> will choose a different permissions than the real ones, to use the exact permissions use <tt>'''-R'''</tt> instead, see the manual page of <tt>''mkisofs''</tt> for more information),<br>
+
'''-J''': Joliet support (Recommended, extended info for Win NT and Win95).
+
  
 +
To burn an ISO '''image''' to disc use:
 +
$ growisofs -Z /dev/cdrw=/path/to/iso
  
'''Burning DVDs from ISO Image Files'''
+
; {{Codeline|-Z}}: start at the beginning of the DVD using the following device
 +
; {{Codeline|-M}}: start after the last session on the disc using the following device
 +
; {{Codeline|-r}}: [[Wikipedia:Rock Ridge|Rock Ridge]] support with sane permission settings (recommended, extended UNIX info)
 +
; {{Codeline|-J}}: [[Wikipedia:Joliet (file system)|Joliet]] support (recommended, extended info for Windows NT and Windows 95)
  
To burn a DVD from an ISO image use:
+
{{Note|{{Codeline|-r}} will choose different permissions than the real ones; to use the exact permissions use {{Codeline|-R}} instead. See the man page of {{Codeline|mkisofs}} for more information.}}
growisofs -Z /dev/cdrw=/path/to/iso
+
  
If you want to copy an existing DVD one way that works is to make an iso using readcd:
+
{{Tip|1=If you want to copy an existing DVD, one way that works is to make an ISO using {{Codeline|readcd}}:
 +
$ readcd -v dev=/dev/cdrw -f image.iso
  
readcd -v dev=/dev/cdrw -f isoimage.iso
+
as per [[CD Burning Tips]], then use the {{Codeline|growisofs}} example above to burn the ISO to a new blank disc.}}
  
as per the CD burning tips in the CD burning howto in this wiki, then use the growisofs example above to burn the iso to a new blank disc.
+
===Example===
  
===Better examples===
+
Although the above might suffice for you, some users require extra settings to successfully write DVDs.
  
Although the above might suffice for you, I myself needed some extra settings to successfully write my DVD (I hope I didn't scare you off yet).
+
A simple DVD writing template:
 +
$ growisofs -Z /dev/cdrw -v -l -dry-run -iso-level 3 -R -J -speed=2 -joliet-long -graft-points /files/=/path/to/files/
  
The template that I use to start off my DVD writing:
+
; {{Codeline|-Z}}: as seen above, this starts a new DVD; to continue a multisession DVD, use {{Codeline|-M}}
growisofs -Z /dev/cdrw -v -l -dry-run -iso-level 3 -R -J -speed=2 -joliet-long -graft-points /Magazines/=/home/citral/books/mags/
+
; {{Codeline|-v}}: increase verbosity level (more output)
 +
; {{Codeline|-l}}: breaks DOS compatibility but allows for longer filenames
 +
; {{Codeline|-dry-run}}: simulate writing (remove this flag if you are sure that everything is set up correctly)
 +
; {{Codeline|-iso-level 3}}: defines how strict you want to adhere to the iso9660 standard ({{Codeline|-iso-level 1}} is very strict while {{Codeline|-iso-level 4}} is very loose)
 +
; {{Codeline|-R}}: see above
 +
; {{Codeline|-J}}: see above
 +
; {{Codeline|1=-speed=2}}: start burning at 2X speed
 +
; {{Codeline|-joliet-long}}: allows longer Joliet file names
  
Don't worry. I'll explain what everything does:
+
The final part needs more explanation:
*'''-Z''': As seen above, this tells to start off a new DVD. If I wanted to continue a multisession DVD, I'd use -M.
+
-graft-points /files/=/path/to/files/
*'''-v''': Increase verbosity level (more output).
+
*'''-l''': Breaks DOS compatibility but allows for longer filenames.
+
*'''-dry-run''': Important flag: Simulate writing. Remove this flag if you are sure that everything is set up correctly.
+
*'''-iso-level 3''': Basically this flag just defines how strict you want to adhere to the iso9660 standard. -iso-level 1 is very strict; while -iso-level 4 is very loose. I use level 3 because I don't want to be limited (length of filenames for example), and so far I haven't ran into problems.
+
*'''-R/-J''': see above.
+
*'''-speed=2''': Just to be sure, I start burning at 2x speed.
+
*'''-joliet-long''': Allows longer joliet filenames. The manual advices caution, but so far I had no problems.
+
  
The final part needs some more explanation:
+
This specifies that files will be stored in the subdirectory {{Filename|/files}} rather than the DVD root. See the {{Codeline|mkisofs}} manual for details.
-graft-points /Magazines/=/home/citral/books/mags/
+
This specifies that I don't want the files at the root of my DVD, but in the subdirectory 'Magazines'.
+
  
From the mkisofs manual:
+
{{Note|{{Codeline|growisofs}} is basically just a front-end to {{Codeline|mkisofs}}. That means that any option for {{Codeline|mkisofs}} also works with {{Codeline|growisofs}}. See the {{Codeline|mkisofs}} man page for details.}}
<tt>
+
:This  is easiest  to illustrate  with a couple of examples. Let's start by assuming that a local file ../old.lis exists, and you wish to include it in the cdrom image.
+
::foo/bar/=../old.lis
+
:will  include  the file old.lis in the cdrom image at /foo/bar/old.lis, while
+
::foo/bar/xxx=../old.lis
+
:will include the file old.lis in the cdrom image at /foo/bar/xxx. The same sort of syntax can be used with directories as well. mkisofs will create any directories required such that the graft points exist on the cdrom  image  -  the  directories  do  not need to appear in one of the paths.</tt>
+
  
''As a last note'': growisofs is basically just a frontend to mkisofs. That means that any option to mkisofs also works to growisofs. You can check the mkisofs manpage for options you want to add.
+
==Re-writable DVDs==
  
==DVD Rewritables==
+
The process for burning re-writable discs is almost the same as for normal DVDs. However, keep in mind that virgin DVD+RW media needs to be initially formatted ("blanked") prior to usage. Blanking can be done using the program {{Codeline|dvd+rw-format}} like this:
 +
$ dvd+rw-format /dev/cdrw
  
The process for burning rewritables is practically the same as normal DVDs. However, keep in mind that virgin DVD+RW media needs to be initially formatted ("blanked") prior to usage. Blanking can be done using the program '''dvd+rw-format''', like this:
+
where {{Filename|/dev/cdrw}} is your DVD writer device.
dvd+rw-format ''/dev/cdrw''
+
Where /dev/cdrw is your DVD writer device.
+
  
==Trouble Shooting==
+
==Troubleshooting==
  
 
===Permission denied===
 
===Permission denied===
  
If you encounter the permmission denied error as show below:
+
If you encounter the a permission error, ensure you are a member of the [[Groups|group]] "optical":
:-( unable to open64("/dev/sr0",O_RDONLY): Permission denied
+
  # usermod -aG optical username
You have to put your user name into the group "optical" like this:
+
  $ sudo usermod -aG optical username
+
Please, note that growisofs doesn't allow sudoed run.
+
  
==Further Readings==
+
{{Note|{{Codeline|growisofs}} will not run via sudo.}}
*[http://fy.chalmers.se/~appro/linux/DVD+RW/ DVD+RW-tools site]
+
*[http://www.jdrowell.com/archives/2005/03/backup_to_dvd_u.html Backup to DVD script] (404 as of 2009-05-23)
+
*[http://www.students.cs.uu.nl/people/wbeekhui/ Usage examples] (404 as of 2009-05-23)
+
* The growisofs, mkisofs and cdrtools man pages.
+
*[http://bbs.archlinux.org/viewtopic.php?pid=320276#p320276 Solving the permission denied error]
+

Revision as of 19:02, 28 November 2009

Template:Article summary start Template:Article summary text Template:Article summary heading Template:I18n entry Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

Writing (or "burning") DVDs requires a different approach than burning CDs. DVDs offer much higher capacities, and the standard CD writing tools will not suffice.

This HOWTO covers a narrow scope for now: writing data onto DVDs using the command line.

Required packages

  1. You still need the standard CD writing tools known as Template:Package AUR (which can be replaced by Template:Package Official, if desired).
  2. You also need the new DVD writing tools known as dvd+rw-tools, found in the [extra] repository.
Note: Do not install the package known as Template:Package Official. It conflicts with Template:Package AUR, and dvd+rw-tools is the superior DVD writing package.
Tip: If you wish to use a graphical front-end, install Template:Package Official or Template:Package Official and you need to read no further.

Procedure

This HOWTO will use the command Template:Codeline from the dvd+rw-tools package. If you've ever written CDs from the command line before, you'll know the process of first creating an iso9660 file (Template:Codeline), and then burning it to CD (Template:Codeline). Template:Codeline merges these steps, so you don't need extra storage space for the ISO file anymore. Another advantage is that multisession writing has been simplified.

Overview

Essentially, writing a new DVD follows this procedure:

$ growisofs -Z /dev/cdrw -r -J /path/to/files

where Template:Filename is your DVD writer device.

To continue a DVD (write an additional session) you use:

$ growisofs -M /dev/cdrw -r -J /path/to/files

To burn an ISO image to disc use:

$ growisofs -Z /dev/cdrw=/path/to/iso
Template:Codeline
start at the beginning of the DVD using the following device
Template:Codeline
start after the last session on the disc using the following device
Template:Codeline
Rock Ridge support with sane permission settings (recommended, extended UNIX info)
Template:Codeline
Joliet support (recommended, extended info for Windows NT and Windows 95)
Note: Template:Codeline will choose different permissions than the real ones; to use the exact permissions use Template:Codeline instead. See the man page of Template:Codeline for more information.
Tip: If you want to copy an existing DVD, one way that works is to make an ISO using Template:Codeline:
$ readcd -v dev=/dev/cdrw -f image.iso
as per CD Burning Tips, then use the Template:Codeline example above to burn the ISO to a new blank disc.

Example

Although the above might suffice for you, some users require extra settings to successfully write DVDs.

A simple DVD writing template:

$ growisofs -Z /dev/cdrw -v -l -dry-run -iso-level 3 -R -J -speed=2 -joliet-long -graft-points /files/=/path/to/files/
Template:Codeline
as seen above, this starts a new DVD; to continue a multisession DVD, use Template:Codeline
Template:Codeline
increase verbosity level (more output)
Template:Codeline
breaks DOS compatibility but allows for longer filenames
Template:Codeline
simulate writing (remove this flag if you are sure that everything is set up correctly)
Template:Codeline
defines how strict you want to adhere to the iso9660 standard (Template:Codeline is very strict while Template:Codeline is very loose)
Template:Codeline
see above
Template:Codeline
see above
Template:Codeline
start burning at 2X speed
Template:Codeline
allows longer Joliet file names

The final part needs more explanation:

-graft-points /files/=/path/to/files/

This specifies that files will be stored in the subdirectory Template:Filename rather than the DVD root. See the Template:Codeline manual for details.

Note: Template:Codeline is basically just a front-end to Template:Codeline. That means that any option for Template:Codeline also works with Template:Codeline. See the Template:Codeline man page for details.

Re-writable DVDs

The process for burning re-writable discs is almost the same as for normal DVDs. However, keep in mind that virgin DVD+RW media needs to be initially formatted ("blanked") prior to usage. Blanking can be done using the program Template:Codeline like this:

$ dvd+rw-format /dev/cdrw

where Template:Filename is your DVD writer device.

Troubleshooting

Permission denied

If you encounter the a permission error, ensure you are a member of the group "optical":

# usermod -aG optical username
Note: Template:Codeline will not run via sudo.