CD Rip and Burn From the Linux Command Line
From Free Knowledge Base- The DUCK Project: information for everyone
__ -o)/ / (_)__ __ ____ __ Derek Winterstien /\\ /__/ / _ \/ // /\ \/ / r.o.a.c.h.@.r.o.b.o.t.z...c.o.m _\_v __/_/_//_/\_,_/ /_/\_\ ` Creation Date: Thu Sep 2 14:38:14 CDT 2004 current ver 0.10 ------------------------------------------------------------------------------ This is a companion guide to the disk-archiving notes. This guide focuses on duplicating cdrom media, audio cdrom, cd recording and archiving. ------------------------------------------------------------------------------
Contents
Create, Verify, and Burn a data cdrom disc
- (a). Create a directory to place your data in. Place all directories and data files you wish to burn to a cd into this directory. Perhaps you create the directory 'burnme' under /tmp
- (b). Create an ISO image from this data.
command: mkisofs -o datacollection.iso -R -J -r /tmp/burnme
- (c). You may browse this ISO image to ensure data integrity prior to deletion of your archive folder 'burnme'.
command: isoinfo -i datacollection.iso -f -R -J | less
- (d). Now that you have deleted 'burnme' all you have is your ISO file. Burn the ISO image to a cdrom disc using cdrecord.
command: cdrecord -v speed=8 dev=0,0,0 -data datacollection.iso
- (e). It is also possible to mount your ISO file to access directly. First, create a directory under /mnt called 'isoimage' to use for this.
command: mount datacollection.iso /mnt/isoimage -t iso9660 -o ro,loop
.
Burning Audio cdrom discs
- (a). Using cdrecord, stereo wav files can be burned to audio cd tracks. Create a directory to place all your audio files in, perhaps /tmp/audio
command: cdrecord -v speed=8 dev=0,0,0 driveropts=burnproof -audio -pad -eject /tmp/audio/*.wav
- You can also control the order either by filename leading character or by listing each file individually file1.wav file2.wav file3.wav etc.
- Avoid using wav files shorter than 4 seconds as the -shorttrack switch is necessary.
- (b). Also, with cdrecord it is possible to record an audio cd with no gaps between songs. This is important for some cd's artistic value, such as preserving the way Pink Floyd's The Wall should seamlessly move from one track to the next.
command: cdrecord -v -dao speed=8 dev=0,0,0 driveropts=burnproof -audio -pad -eject /tmp/audio/*.wav
- dao = Disk-At-Once, not supported by all cdrom writers. The default is
- tao = Track-At-Once, which produces a 2sec gap between songs but is widely supported by cdrom writers.
- (c). Direct cdrom copying on-the-fly from one drive to another is possible using cdrdao. This is not recommended if both of your IDE cdrom drives are attached to the same ide (both on secondary for example) cable.
command: cdrdao copy --device 0,0,0 --source-device 0,1,0 --source-driver generic-mmc --eject --reload -v 1 -n --datafile /media/tmp/cdrdao.bin
.
Create and Burn an MP3 cdrom for your mp3 player
- (a). You may download your mp3 files or create them yourself by ripping an audio cd. To rip an audio cd you may use LAME, the mp3 audio compressor. The program lame can be used to create mp3 audio files.
command: lame -q 0 -V 0 --vbr-new -m s -c -p --strictly-enforce-ISO --tt 'song name' song.wav song.mp3 -m switch is 'mode', possible modes are s, j, f, d, m. Use 's' for typical stereo. man lame for complete options information.
- (b). Place the mp3 files into a folder, perhaps /tmp/mp3files and write them to a data cdrom.
command:
[IV. Rip a data cdrom to an ISO image on your filesystem]
Taken directly from (disk-archiving notes)
- (a) create an ISO image file from a cdrom disc with dd (be sure the cdrom is NOT MOUNTED. If it is mounted, then umount the device.)
command: dd if=/dev/cdrom of=cdimage.iso <- for ide cdrom dd if=/dev/scd0 of=cdimage.iso <- scsi cdrom dd if=/dev/dvd of=dvdimage.iso <- ide dvd
See also: Create an ISO Disc Image With Linux