Difference between revisions of "CD Burning"

From ArchWiki
Jump to navigation Jump to search
m (wikipedia fits better another section)
(10 intermediate revisions by 8 users not shown)
Line 1: Line 1:
#REDIRECT [[Optical_Disc_Drive#CD_burning]]
[[it:CD Burning]]
[[zh-CN:CD Burning]]
{{Article summary start}}
{{Article summary text|This document outlines various methods of burning CDs.}}
{{Article summary heading|Related}}
{{Article summary wiki|DVD Burning}}
{{Article summary end}}
== Command-line CD-burning ==
=== Install CD-burning utilities ===
From http://www.cdrkit.org/:
:''{{ic|cdrkit}} is a suite of programs for recording CDs and DVDs, blanking CD-RW media, creating ISO-9660 filesystem images, extracting audio CD data, and more. The programs included in the {{ic|cdrkit}} package were originally derived from several sources, most notably {{ic|mkisofs}} by Eric Youngdale and others, {{ic|cdda2wav}} by Heiko Eissfeldt, and {{ic|cdrecord}} by Jörg Schilling. However, {{ic|cdrkit}} is not affiliated with any of these authors; it is now an independent project.
The {{Pkg|cdrkit}} package is available in the [[official repositories]].
If you intend to use {{Pkg|cdrdao}} (for writing {{ic|cue}}/{{ic|bin}} files to CD), install that package instead.
* If you face any issues with {{ic|cdrkit}}, it is recommended to install {{Pkg|cdrtools}} from the community repository ({{ic|cdrkit}} is a fork of {{ic|cdrtools}}). {{ic|cdrtools}} is being actively developed and supports CD, DVD and Blu-ray burning along with complete CDRWIN {{ic|cue}}/{{ic|bin}} support. {{ic|cdrtools}} does not depend on {{ic|cdrdao}}. For more information, see [http://cdrecord.berlios.de/private/linux-dist.html this page] from the cdrtools site
* Make sure that you build a package using [[makepkg]] and install with pacman. Pacman wrappers may resolve to cdrkit instead
=== Modifying the CD-RW ===
For the remainder of this section the name of your recording device is assumed to be {{ic|/dev/cdrw}}. If that is not the case, modify the commands accordingly. In order to write to the CD it needs to be unmounted. If it is not, {{ic|wodim}} will give you an error message.
You can try to let wodim locate your burning device with this command:
$ wodim -checkdrive
=== Erasing CD-RW ===
CD-RW media usually need to be erased before you can write new data on it. To blank CD-RW medium use this command:
$ wodim -v dev=/dev/cdrw -blank=fast
As you might have guessed, this blanks your medium really fast, but you can also use some other options, just replace the word ''fast'' with one of the following:
;all: blank the entire disk
;disc: blank the entire disk
;disk: blank the entire disk
;fast: minimally blank the entire disk (PMA, TOC, pregap)
;minimal: minimally blank the entire disk (PMA, TOC, pregap)
;track: blank a track
;unreserve: unreserve a track
;trtail: blank a track tail
;unclose: unclose last session
;session: blank last session
=== Burning an ISO image ===
To burn an ISO image run:
$ cdrecord -v dev=/dev/sr0 isoimage.iso
=== Verify the burnt ISO image ===
You can verify the integrity of the burnt CD to make sure it contains no errors. Always eject the CD and reinsert it before verifying.
First calculate the md5sum of the original ISO image:
{{hc|$ md5sum isoimage.iso|
e5643e18e05f5646046bb2e4236986d8 isoimage.iso
If the CD was burnt in DAO (Disc At Once) mode by passing the -dao option to cdrecord you can calculate the md5sum of the burnt CD as follows:
{{hc|$ md5sum /dev/sr0|
e5643e18e05f5646046bb2e4236986d8 /dev/sr0
If the CD was burnt in TAO (Track At Once) mode it can be verified with dd and md5sum. You need to know the number of sectors to check. You can calculate this by dividing the size of the ISO file by 2048, but for your convenience this is included in the output of cdrecord:
Track 01: Total bytes read/written: 90095616/90095616 (43992 sectors).
Then check if this matches the md5sum of the burnt image, replacing "count" with the number of sectors:
{{hc|<nowiki>$ dd if=/dev/sr0 bs=2048 count=43992 | md5sum</nowiki>|
43992+0 records in
43992+0 records out
90095616 bytes (90 MB) copied, 0.359539 s, 251 MB/s
e5643e18e05f5646046bb2e4236986d8  -
=== Burning an audio CD ===
Create your audio tracks and store them as uncompressed, 16-bit stereo WAV files. To convert MP3 to WAV, ensure {{Pkg|lame}} is installed, {{ic|cd}} to the directoy with your MP3 files, and run:
$ for i in *.mp3; do lame --decode "$i" "$(basename "$i" .mp3)".wav; done
In case you get an error when trying to burn WAV files converted with lame try decoding with {{Pkg|mpg123}}:
$ for i in *.mp3; do mpg123 --rate 44100 --stereo --buffer 3072 --resync -w $(basename $i .mp3).wav $i; done
Name the audio files in a manner that will cause them to be listed in the desired track order when listed alphabetically, such as {{ic|01.wav}}, {{ic|02.wav}}, {{ic|03.wav}}, etc.
Use the following command to simulate burning the wav files as an audio CD:
$ wodim -dummy -v -pad speed=1 dev=/dev/cdrw -dao -swab *.wav
In case you detect errors or empty tracks like:
Track 01: audio    0 MB (00:00.00) no preemp pad
try another decoder (e.g. mpg123) or try using cdrecord from the {{Pkg|cdrtools}} package.
Note that {{Pkg|cdrkit}} also contains a cdrecord command but it is just a softlink to wodim.
If anything worked you can remove the dummy flag to really burn the CD
To test the new audio CD, use [[MPlayer]]:
$ mplayer cdda://
=== Burning a bin/cue ===
To burn a bin/cue image run:
$ cdrdao write --device /dev/cdrw image.cue
=== Making an ISO image from an existing CD ===
To copy an existing CD just type:
$ readom -v dev=/dev/cdrw f=isoimage.iso
You do not want to use dd or cat as they provide no error checking, but for reference here are those commands:
$ dd if=/dev/cdrw of=/home/user/isoimage.iso
or with cat:
$ cat /dev/cdrw > isoimage.iso
Or use the {{ic|readcd}} program (which is now a symlink to readom), also in the {{ic|cdrkit}} package:
$ readcd -v dev=/dev/cdrw -f isoimage.iso
If the original CD was bootable it will be a bootable image.
==== TOC/CUE/BIN for mixed-mode disks ====
ISO images only store a single data track. If you want to create an image of a mixed-mode disk (data track with multiple audio tracks) then you need to make a TOC/BIN pair:
$ cdrdao read-cd --read-raw --datafile IMAGE.bin --driver generic-mmc:0x20000 --device /dev/cdrom IMAGE.toc
Some software only likes CUE/BIN pair, you can make a CUE sheet with {{ic|toc2cue}} (part of {{ic|cdrdao}}):
$ toc2cue IMAGE.toc IMAGE.cue
=== Making an ISO image from existing files on hard disk ===
To make an iso image just copy the needed files to one folder, then do:
$ mkisofs -V volume_name -J -r -o isoimage.iso ~/folder
=== Mounting an ISO image ===
To test if the ISO image is proper, you can mount it (as root):
# mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom
You have to first load the loop module:
# modprobe loop
=== Converting to an ISO image ===
To convert an {{ic|img}}/{{ic|ccd}} image, you can use {{Pkg|ccd2iso}}:
$ ccd2iso ~/image.img ~/image.iso
== Burning CDs with a GUI ==
{{Wikipedia|Comparison of disc authoring software|Wikipedia - Comparison of disc authoring software}}
There are several applications available to burn CDs in a graphical environment.
* {{App|[[Wikipedia:AcetoneISO|AcetoneISO]]|All in one ISO tool (supports BIN, MDF, NRG, IMG, DAA, DMG, CDI, B5I, BWI, PDI and ISO)|http://sourceforge.net/projects/acetoneiso|{{Pkg|acetoneiso2}}}}
* {{App|BashBurn|Lightweight terminal based menu frontend for CD/DVD burning tools|http://bashburn.dose.se/|{{Pkg|bashburn}}}}
* {{App|[[Wikipedia:Brasero (software)|Brasero]]|Disc burning application for the GNOME desktop that is designed to be as simple as possible. Part of {{Grp|gnome-extra}}|http://projects.gnome.org/brasero/|{{Pkg|brasero}}}}
* {{App|cdw|Ncurses frontend to cdrecord, mkisofs, growisofs, dvd+rw-mediainfo, dvd+rw-format, xorriso|http://cdw.sourceforge.net/|{{AUR|cdw}}}}
* {{App|[[Wikipedia:GnomeBaker|GnomeBaker]]|Full featured CD/DVD burning application for the GNOME desktop|http://gnomebaker.sourceforge.net/|{{AUR|gnomebaker}}}}
* {{App|Graveman|GTK-based CD/DVD burning application. It requires configuration to point to correct devices|http://graveman.tuxfamily.org/|{{AUR|graveman}}}}
* {{App|[[Wikipedia:K3b|K3b]]|Feature-rich and easy to handle CD burning application based on Kdelibs|http://www.k3b.org/|{{Pkg|k3b}}}}
* {{App|Recorder|Outdated and buggy ({{Bug|31673}}) frontend to cdrkit/cdrtools, cdrdao, mkisofs and growisofs with limited options and preferences|http://code.google.com/p/recorder/|{{Pkg|recorder}}}}
* {{App|Silicon empire|Qt-based set of tools to manage and organize your optical discs like CDs, DVDs and Blu-rays|http://getsilicon.org/|{{AUR|silicon-empire}}}}
* {{App|[[Wikipedia:X-CD-Roast|X-CD-Roast]]|Lightweight cdrtools front-end for CD and DVD writing|http://www.xcdroast.org/|{{AUR|xcdroast}}}}
* {{App|Xfburn|Simple frontend to the libburnia libraries with support for CD/DVD(-RW), ISO images and BurnFree|http://goodies.xfce.org/projects/applications/xfburn|{{Pkg|xfburn}}}}
== Nero Linux ==
Nero Linux is a commercial burning suite from makers of Nero for Windows - Nero AG. The biggest advantage of Nero linux is its interface which similar to window version. Hence, users migrating from windows might find it easy to operate. The Linux version now includes Nero Express, a wizard which takes users through the process of burning CDs and DVDs step-by-step, which users will be familiar with from the Windows version. Also new in version 4 is Blu-ray Disc defect management, integration of Isolinux for creating bootable media and support for Musepack and AIFF audio formats...
Nero Linux 4 retails at £17.99 with a free trial version also available.
* [http://www.nero.com/enu/linux4.html Nero Linux 4]
* {{AUR|nerolinux}} [[AUR]] package
=== Features ===
* Easy, wizard-style user interface for guided burning with Nero Linux Express 4
* Full Blu-ray Burning Support
* Supports Burning of Audio CD (CD-DA), ISO 9660 (Joliet support), CD-Text, ISOLINUX Bootable, Multi-session Discs, DVD-Video and miniDVD, DVD double layer support.
* Advanced burning with Nero Burning ROM and command line client
=== Note ===
For Nero Linux you need to load {{ic|sg}} module at boot time. Put a namesake file in {{ic|/etc/modules-load.d}}:
Some updates ago the sg module wasn't auto loaded any more and Nero needs it.
== Troubleshooting ==
=== K3b locale error ===
When running K3B, if the following message appears:
System locale charset is ANSI_X3.4-1968
Your system's locale charset (i.e. the charset used to encode file names) is
set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally.
Most likely the locale is not set at all. An invalid setting will result in
problems when creating data projects.Solution: To properly set the locale
charset make sure the LC_* environment variables are set. Normally the distribution
setup tools take care of this.
It means that your locale is not set well.
To fix it,
* Remove {{ic|/etc/locale.gen}}
* Re-install {{Pkg|glibc}}
* Edit {{ic|/etc/locale.gen}}, uncommenting all lines lines that corresponds to your language AND the {{ic|en_US}} options, for compatibility:
en_US.UTF-8 UTF-8
en_US ISO-8859-1
* Re-generate the profiles with {{ic|locale-gen}}:
{{hc|# locale-gen|
Generating locales...
en_US.UTF-8... done
en_US.ISO-8859-1... done
pt_BR.UTF-8... done
pt_BR.ISO-8859-1... done
Generation complete.
More info [https://bbs.archlinux.org/viewtopic.php?pid=251512%29; here].
=== Brasero fails to find blank discs ===
Brasero uses {{Pkg|gvfs}} to manage CD/DVD burning devices.

Revision as of 18:11, 22 July 2013