Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: DVD-cd usage
Date: Sat, 23 Jul 2005 06:20:11
Message-Id: 20050723061325.GB12583@waltdnes.org
In Reply to: [gentoo-user] Re: DVD-cd usage by James
1 On Fri, Jul 22, 2005 at 06:13:46PM +0000, James wrote
2
3 > I need to learn how to use any simple cdrecording commands (syntax
4 > challeged user here) first. Then I can worry about all sorts of fancy
5 > file types/formats. I'd be better off downloading a know file to
6 > write to the device (ascii text?) or something on the gentoo system,
7 > just to build a little confidence. I need a newbie 'how to cd burn'
8 > before I worry about the intricacies of audio recording files on CDs.
9 >
10 > > 3) (Thanks for the idea, Dave Nebinger) Have you tried making an ISO
11 > > of all the audio files (unaltered) that you want to burn to CD, using
12 > > mkisofs, and then burning the ISO instead of the files?
13 >
14 >
15 > I'm going to read the cdrecord man pages. simple syntax examples
16 > or a link to a document to any cd burning software is what
17 > I need.
18
19 A quick rundown...
20
21 - audio CDs are generated by writing WAV files directly to CD. The
22 player reads them directly from the CD. You do not mount audio CDs.
23
24 - to get regular files onto CDs in a readable form, you first need to
25 create an ISO9660 filesystem image file, using mkisofs (man mkisofs).
26 Then burn the image file to a CD. You can usually get away with
27 piping output from mkisofs stdout to cdrecord stdin.
28
29 - you need root privileges to properly use cdrecord; deal with it. If
30 you're scared of logging in as root, you can use sudoers.conf to give
31 a regular user permission to run specific command and parameters. I
32 need root-level access in order to read system files for my bi-weekly
33 backups, so cdrecord's need to be root was never an issue for me.
34
35 Note; The following is all done as root (or root equivalent).
36
37 The first thing you have to do is figure out your device numbers.
38 *YOUR SYSTEM CAN BE DIFFERENT FROM MINE*, so read the instructions
39 carefully. Execute the command "cdrecord dev=ATAPI: -scanbus". It can
40 take a few seconds to scan the system. Ignore the warnings/disclaimers
41 The important part is at the end. Here's that output for my system...
42
43 0,0,0 0) 'SONY ' 'CD-RW CRX195E1 ' 'ZYS5' Removable CD-ROM
44 0,1,0 1) 'SONY ' 'DVD-ROM DDU1621 ' 'S1.5' Removable CD-ROM
45 0,2,0 2) *
46 0,3,0 3) *
47 0,4,0 4) *
48 0,5,0 5) *
49 0,6,0 6) *
50 0,7,0 7) *
51
52 This indicates that my CD-RW is device 0,0,0. mkisofs creates an
53 image of a specified directory, including subdirectories. Soft links do
54 *NOT* work. To save time, and avoid cluttering up my drive with temp
55 files, I pipe directly from mkisofs to cdrecord. I make a tar.bz2 of
56 the files I want backed up, and move the file to directory "xfer". The
57 following script does it all-in-one...
58
59 #!/bin/sh
60 mkisofs -R -J xfer | cdrecord speed=8 -tao -v fs=8m -data dev=ATAPI:0,0,0 -
61
62 The "-R -J" parameters should result in mkisofs output that's readable
63 by all linux and Windows machines. The cdrecord parameters are...
64
65 speed=8 ...the burner on this machine can go up to 48x. But my emergency
66 backup system is a 6-year-old Dell that can only read up to 12x.
67 Oops. This parameter slows down the burner so that the older
68 machine can read its output.
69
70 -tao "track at once". This allows you to do multi-session CDs.
71
72 -v I prefer some verbosity in the output.
73
74 fs=8m The fifo buffer size. The default is 4 megabytes, but I specify
75 8 megabytes to play safe against under-runs.
76
77 -data Straight out of the man page...
78 -data is the default, if no other flag is present and the file
79 does not appear to be of one of the well known audio file types.
80
81 If neither -data nor -audio have been specified, cdrecord
82 defaults to -audio for all filenames that end in .au or .wav and
83 to -data for all other files.
84
85 dev=ATAPI:0,0,0 This specifies the device. The 3 numbers can be found
86 by running "cdrecord dev=ATAPI: -scanbus"
87
88 - The hyphen at the end specifies to use stdin as the source file.
89 You will get a standard warning from cdrecord, because it can't
90 know ahead of time whether the piped input will fit onto the CD.
91
92 --
93 Walter Dnes <waltdnes@××××××××.org>
94 My musings on technology and security at http://tech_sec.blog.ca
95 --
96 gentoo-user@g.o mailing list