Difference between revisions of "User talk:Scdbackup"

From ArchWiki
Jump to navigation Jump to search
Line 330: Line 330:
If you use a GUI program and experience problems which the program's log blames to some backend program, then try whether you can reproduce the problem by the logged backend program arguments.
If you use a GUI program and experience problems which the program's log blames to some backend program, then try whether you can reproduce the problem by the logged backend program arguments.
Whether you succeed with reproducing or not, you may report the logged lines and your own findings to the places mentioned in [https://wiki.archlinux.org/index.php/User_talk:Scdbackup#Burn_Backend_problems].
Whether you succeed with reproducing or not, you may report the logged lines and your own findings to the places mentioned in [https://wiki.archlinux.org/index.php/User_talk:Scdbackup#Burn_Backend_Problems section Burn Backend Problems].

Revision as of 11:51, 30 July 2013

About the changes on the wiki

Hello. I appreciate your great interest and I agree with some of your requests, especially on clarity. Do not use the main page for experience any changes, because it is a reference page for the entire community. You have to follow a path, discuss the changes, what to change and how to change, apply a "template" to signal to the whole community of possible changes etc. .. Also, any changes must be described on the main page, and in the event of major changes effettualri step by step. Other users can't understand all the changes made. This procedure may seem slow, but considering that it is not a personal wiki, but Community. good weekend.Veleno (talk) 11:00, 27 July 2013 (UTC)

It is well understood that i need approval. Especially since i am an interested party in the field of optical media. The proposed changes are listed at the talk page. What kind of approval do i have to wait for ?
How do i apply a "template" ? (I guess it is a way to expose an implemented proposal for approval.)
Your proposed changes are wide margin, reflecting a possible reorganization of the entire page. You rightly point out that there are gaps and that it can improve the whole. I answered you on the talk. I think you can from your proposal to amend the best across the page, for example, by combining the relative sections of CD and DVD in one section. does not exist a body that approves, you expect a few days, if no one dissenting opinions, you can operate to change. What you propose is not a small change, but I think a broader change that, in my opinion, it should be well organized. that's all. I apply a template that links to the discussion. ;) Veleno (talk) 11:37, 27 July 2013 (UTC)

Test area


<!ex CD burning , replacing section 1>

The burning process of optical disc drives consists of creating or obtaining an image and writing it to an optical medium. The image may in principle be any data file. If you want to mount the resulting medium, then it is usually an ISO 9660 filesystem image file. Audio and multi-media CDs are often burned from a BIN file, under control of a TOC file or a CUE file which tell the desired track layout.

Install burning utilities

<! ex Install programs for ISO 9660 and burning of CD, DVD, or BD - replacing section 1.1>

If you want to use programs with graphical user interface, then follow this link to the list of GUI programs.

The programs listed here are the back ends which are used by most free GUI programs for CD, DVD, and BD. They are command line oriented. GUI users might get to them when it comes to troubleshooting or to scripting of burn activities.

You need at least one program for creation of filesystem images and one program that is able to burn data onto your desired media type.

Available programs for ISO 9660 image creation are:

The traditional choice is genisoimage.

Available programs for burning to media are:

  • cdrdao from package cdrdao (CD only, TOC/CUE/BIN only)
  • cdrecord from package cdrtools
  • cdrskin from package libburn
  • growisofs from package dvd+rw-tools (DVD and BD only)
  • wodim from package cdrkit (CD only, DVD deprecated)
  • xorriso and xorrecord from package libisoburn

The traditional choices are wodim for CD and growisofs for DVD and Blu-ray Disk. For growisofs and BD-R see the bug workaround below. For writing TOC/CUE/BIN files to CD, install cdrdao.

The free GUI programs for CD, DVD, and BD burning depend on at least one of the above packages.

The programs genisoimage, mkisofs, and xorrisofs all three support the genisoimage options which are shown in this document.

The programs cdrecord, cdrskin, and wodim all three support the shown wodim options. Program xorrecord supports those which do not deal with audio CD.


The installed files of packages cdrkit and cdrtools are in conflict. If you want to install cdrtools, make sure that you build a package using makepkg and install with pacman. Pacman wrappers may resolve to cdrkit instead.

Making an ISO image from existing files on hard disk

<!ex Making an ISO image from existing files on hard disk, replacing section 1.9> <!ex Example (DVD burning), replacing section 2.2.2> (moved before sections about burning media)

The most simple way to create an ISO image by help of genisoimage is to copy the needed files to one folder ./for_iso and to do:

$ genisoimage -V "ARCHIVE_2013_07_27" -J -r -o isoimage.iso ./for_iso

The meaning of the options is:

Gives the filesystem a name which will probably show up as mount point if the medium is mounted automatically. The ISO specs allow only "A" to "Z", "0" to "9", and "_". 32 characters at most.
Prepares names of up to 64 UTF-16 characters for MS-Windows readers. Aka "Joliet".
Would allow 103 UTF-16 characters for MS-Windows readers. Not conformant to Joliet specs.
Prepares names of up to 255 characters for Unix readers and gives read permission for everybody. Aka "Rock Ridge".
Sets the file path for the resulting ISO image.

You can let genisoimage collect files and directories from various paths

$ genisoimage -V "BACKUP_2013_07_27" -J -r -o backup_2013_07_27.iso \
  -graft-points \
  /photos=/home/me/photos \
  /mail=/home/me/mail \
Enables the recognition of "pathspecs" which consist of a target address in the ISO filesystem (e.g. "/photos") and a source address on hard disk (e.g. "/home/me/photos"). Both are separated by a = character.

So this example puts disk directory /home/me/photos into ISO as directory /photos, disk directory /home/me/mail into ISO as /mail, and /home/me/holidays/photos into ISO as /photos/holidays.

Programs mkisofs and xorrisofs accept the same options. For sincere backups consider to use xorrisofs with option --for_backup, which records eventual ACLs and stores an MD5 checksum for each data file.

See the manuals of the ISO 9660 programs for more info about their options: http://linux.die.net/man/1/genisoimage http://cdrecord.berlios.de/private/man/cdrecord/mkisofs.8.html http://www.gnu.org/software/xorriso/man_1_xorrisofs.html

Learning the name of your optical drive

<!ex Modifying the CD-RW , replacing section 1.2>

For the remainder of this section the name of your recording device is assumed to be /dev/cdrw.

Check this by

$ wodim dev=/dev/cdrw -checkdrive

which should report "Vendor_info" and "Identification" of the drive. The next guess could be /dev/sr0.

If no drive is found, check whether any /dev/sr* exist and whether they offer rw-permission to you or your group. If no /dev/sr* exists then try

$ modprobe sr_mod

Reading an ISO image from a CD, DVD, or BD

<!ex Making an ISO image from an existing CD, replacing section 1.8> (moved before sections about burning)

Unless it is a factory pressed ROM medium you will have to determine the size of the ISO filesystem before copying it to hard disk. Most media types deliver more data than was written to them with the most recent burn run.

Use program isosize out of package util-linux to obtain the image size

 $ blocks=$(expr $(isosize /dev/cdrw) / 2048)

Have a look whether the obtained number of blocks is plausible

$ echo "That would be $(expr $blocks / 512) MB"
That would be 589 MB

Then copy the determined amount of data from medium to hard disk

 $ dd if=/dev/cdrw of=isoimage.iso bs=2048 count=$blocks

Omit count=$blocks if you did not determine the size. You will probably get more data than needed. The resulting file will nevertheless be mountable. It should still fit onto a medium of the same type as the medium from which the image was copied.

If the original medium was bootable, then the copy will be a bootable image. You may use it as pseudo CD for a virtual machine or burn it onto optical media which should then become bootable.

Erasing CD-RW and DVD-RW

<!ex Erasing CD-RW , replacing section 1.3> <ex! Re-writable DVDs , replacing section 2.3>

Used CD-RW media need to be erased before you can write over the previously recorded data. This is done by

 $ wodim -v dev=/dev/cdrw blank=fast

Unformatted DVD-RW media need the same treatment before re-use. But fast blanking deprives them of the capability for multi-session and recording of streams of unpredicted length. So one should apply

 $ dvd+rw-format -blank=full /dev/cdrw

dvd+rw-format is part of package dvd+rw-tools. Alternative commands are

 $ cdrecord -v dev=/dev/cdrw blank=all
 $ cdrskin -v dev=/dev/cdrw blank=all
 $ xorriso -outdev /dev/cdrw -blank as_needed

Formatted DVD-RW media can be overwritten without such erasure. So consider to apply once in their life time

 $ dvd+rw-format -force /dev/cdrw

Alternative commands are

 $ cdrskin -v dev=/dev/cdrw blank=format_overwrite
 $ xorriso -outdev /dev/cdrw -format as_needed

All other media are either write-once (CD-R, DVD-R, DVD+R, BD-R) or are overwritable without the need for erasing (DVD-RAM, DVD+RW, BD-RE).

Burning an ISO image

<!ex Burning an ISO image , replacing section 1.4> <!ex Overview (DVD burning), replacing in part section 2.2.1>

To burn a readily prepared ISO image file isoimage.iso onto an optical medium, run for CD:

$ wodim -v -sao dev=/dev/cdrw isoimage.iso

and for DVD or BD:

$ growisofs -dvd-compat -Z /dev/cdrw=isoimage.iso

The programs cdrecord, cdrskin, and xorrecord may be used on all kinds of media with the options shown with wodim.


Make sure that the medium is not mounted when you begin to write to it. Mounting may happen automatically if the medium contains a readable filesystem. In best case it will prevent the burn programs from using the burner device. In worst case there will be misburns because read operations disturbed the drive. So if in doubt, do:

# umount /dev/cdrw

growisofs has a small bug with blank BD-R media. It issues an error message after the burning is complete. Programs like k3b then believe the whole burn run failed. To prevent this, either

  • format the blank BD-R by dvd+rw-format /dev/cdrw before submitting it to growisofs
  • or use growisofs option -use-the-force-luke=spare:none

Verifying the burnt ISO image

<!ex Verify the burnt ISO image , replacing section 1.5>

You can verify the integrity of the burnt medium to make sure it contains no errors. Always eject the medium and reinsert it before verifying. The kernel will learn about the new content only by that reinsertion.

First calculate the md5sum of the original ISO image:

$ md5sum isoimage.iso
 e5643e18e05f5646046bb2e4236986d8 isoimage.iso

Next calculate the md5sum of the ISO filesystem on the medium. Although some media types deliver exactly the same amount of data as have been submitted to the burn program, many others append trailing garbage when being read. So you should restrict reading to the size of the ISO image file.

$ blocks=$(expr $(ls -l isoimage.iso | awk '{print $5}') / 2048)
$ dd if=/dev/cdrw bs=2048 count=$blocks | md5sum
 43992+0 records in
 43992+0 records out
 90095616 bytes (90 MB) copied, 0.359539 s, 251 MB/s
 e5643e18e05f5646046bb2e4236986d8  -

Both runs should yield the same MD5 sum (here: e5643e18e05f5646046bb2e4236986d8). If they do not, you will propbably also get an i/o error message from the dd run. dmesg might then tell about SCSI errors and block numbers, if you are interested.

ISO 9660 and Burning On-The-Fly

(new section)

It is not necessary to store an emerging ISO filesystem on hard disk before writing it to optical media. Only very old CD drives at very old computers could suffer misburns due to empty drive buffer.

If you omit option -o from genisoimage then it writes the ISO image to standard output. This can be piped into the standard input of burn programs.

$ genisoimage -V "ARCHIVE_2013_07_27" -J -r ./for_iso | \
  wodim -v dev=/dev/cdrw -waiti -

Option -waiti is not really needed here. It prevents wodim from writing to the medium before genisoimage starts its output. This would allow genisoimage to read the medium without disturbing an already started burn run. See next section about multi-session.

On DVD and BD you may letgrowisofs operate genisoimage for you and burn its output on-the-fly

$ export MKISOFS="genisoimage"
$ growisofs -Z /dev/cdrw -V "ARCHIVE_2013_07_27" -r -J ./for_iso


(new section, in part from remaindings of "DVD burning")

ISO 9660 multi-session means that a medium with readable filesystem is still writable at its first unused block address, and that a new ISO directory tree gets written to this unused part. The new tree is accompanied by the content blocks of newly added or overwritten data files. The blocks of data files, which shall stay as in the old ISO tree, will not be written again.

Linux and many other operating systems will mount the directory tree in the last session on the medium. This youngest tree will normally show the files of the older sessions, too.

CD-R and CD-RW stay writable (aka "appendable") if wodim option -multi was used

$ wodim -v -multi dev=/dev/cdrw isoimage.iso

Then the medium can be inquired for the parameters of the next session

$ m=$(wodim dev=/dev/cdrw -msinfo)

By help of these parameters and of the readable medium in the drive you can produce the add-on ISO session

$ genisoimage -M /dev/cdrw -C "$m" \
   -V "ARCHIVE_2013_07_28" -J -r -o session2.iso ./more_for_iso

Finally append the session to the medium and keep it appendable again

$ wodim -v -multi dev=/dev/cdrw session2.iso

Programs cdrskin and xorrecord do this too with DVD-R, DVD+R, BD-R and unformatted DVD-RW. Program cdrecord does multi-session with at least DVD-R and DVD-RW.

Most re-usable media types do not record a session history that would be recognizable for a mounting kernel. But with ISO 9660 it is possible to achieve the multi-session effect even on those media.

growisofs and xorriso can do this and hide most of the complexity.

Using growisofs

growisofs forwards most of its program arguments to a program that is compatible to mkisofs. See above examples of genisoimage. It bans option -o and deprecates option -C. By default it uses the installed program named "mkisofs". You may let it choose one of the others by setting environment variable MKISOFS

$ export MKISOFS="genisoimage"
$ export MKISOFS="xorrisofs"

The wish to begin with a new ISO filesystem on the optical medium is expressed by option -Z

$ growisofs -Z /dev/cdrw -V "ARCHIVE_2013_07_27" -r -J ./for_iso

The wish to append more files as new session to an existing ISO filesystem is expressed by option -M

$ growisofs -M /dev/cdrw -V "ARCHIVE_2013_07_28" -r -J ./more_for_iso

For details see the manual http://linux.die.net/man/1/growisofs and the manuals of genisoimage, mkisofs, xorrisofs.

Using xorriso

xorriso learns the wish to begin with a new ISO filesystem from the blank state of the medium. So it is appropriate to blank it if it contains data.

$ xorriso -outdev /dev/cdrw -blank as_needed \
          -volid "ARCHIVE_2013_07_27" -joliet on -add ./for_iso --

On non-blank writable media it appends the newly given disk files if command -dev is used rather than -outdev. Of course, no command -blank should be given here

$ xorriso -dev /dev/cdrw \
          -volid "ARCHIVE_2013_07_28" -joliet on -add ./more_for_iso --

For details see the manual page and especially its examples http://www.gnu.org/software/xorriso/man_1_xorriso.html http://www.gnu.org/software/xorriso/man_1_xorriso.html#EXAMPLES

BD Defect Management

(new section)

BD-RE and formatted BD-R media are normally written with enabled Defect Management. This feature reads the written blocks while they are still stored in the drive buffer. In case of poor read quality the blocks get written again or redirected to the Spare Area where the data get stored in replacement blocks.

This checkreading reduces write speed to at most half of the nominal speed of drive and BD medium. Sometimes it is even worse. Heavy use of the Spare Area causes long delays during read operations. So Defect Management is not always desirable.

cdrecord does not format BD-R. It has no means to prevent Defect Management on BD-RE media, though.

growisofs formats BD-R by default. This can be prevented by option -use-the-force-luke=spare:none. It has no means to prevent Defect Management on BD-RE media, though.

cdrskin, xorriso, and xorrecord do not format BD-R by default. They do with cdrskin blank=format_if_needed, resp. xorriso -format as_needed, resp. xorrecord blank=format_overwrite. These three programs can disable Defect Management with BD-RE and already formatted BD-R by cdrskin stream_recording=on, resp. xorriso -stream_recording on, resp. xorrecord stream_recording=on.

Additions to the list of GUI tools

(temporary section, to be merged with section 4)

http://littlesvr.ca/isomaster || isomasterAUR

Burn Backend Problems

(new section)

If you use the backend programs as listed in section Install burning utilities, and experience problems, you may ask for advise at mailing list cdwrite@other.debian.org . Or ask for advise at the support mail addresses if some are listed near the end of the program's man page.

Tell the command lines you tried, the medium type (e.g. CD-R, DVD+RW, ...), and the symptoms of failure (program messages, disappointed user expectation, ...). You will possibly get asked to obtain the newest release or development version of the affected program and to make test runs. But the answer might as well be, that your drive dislikes the particular medium.

>>> What advise do we have for people who cannot communicate in english language ?

GUI program log indicates problems with backend program

(new section for section 6 "Troubleshooting")

If you use a GUI program and experience problems which the program's log blames to some backend program, then try whether you can reproduce the problem by the logged backend program arguments. Whether you succeed with reproducing or not, you may report the logged lines and your own findings to the places mentioned in section Burn Backend Problems.