This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / Documentation / cdrom / packet-writing.txt
1 Getting started quick
2 ---------------------
3
4 - Select packet support in the block device section and UDF support in
5   the file system section.
6
7 - Compile and install kernel and modules, reboot.
8
9 - You need the udftools package (pktsetup, mkudffs, cdrwtool).
10   Download from http://sourceforge.net/projects/linux-udf/
11
12 - Grab a new CD-RW disc and format it (assuming CD-RW is hdc, substitute
13   as appropriate):
14         # cdrwtool -d /dev/hdc -q
15
16 - Setup your writer
17         # pktsetup dev_name /dev/hdc
18
19 - Now you can mount /dev/pktcdvd/dev_name and copy files to it. Enjoy!
20         # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
21
22
23 Packet writing for DVD-RW media
24 -------------------------------
25
26 DVD-RW discs can be written to much like CD-RW discs if they are in
27 the so called "restricted overwrite" mode. To put a disc in restricted
28 overwrite mode, run:
29
30         # dvd+rw-format /dev/hdc
31
32 You can then use the disc the same way you would use a CD-RW disc:
33
34         # pktsetup dev_name /dev/hdc
35         # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
36
37
38 Packet writing for DVD+RW media
39 -------------------------------
40
41 According to the DVD+RW specification, a drive supporting DVD+RW discs
42 shall implement "true random writes with 2KB granularity", which means
43 that it should be possible to put any filesystem with a block size >=
44 2KB on such a disc. For example, it should be possible to do:
45
46         # mkudffs /dev/hdc
47         # mount /dev/hdc /cdrom -t udf -o rw,noatime
48
49 However, some drives don't follow the specification and expect the
50 host to perform aligned writes at 32KB boundaries. Other drives do
51 follow the specification, but suffer bad performance problems if the
52 writes are not 32KB aligned.
53
54 Both problems can be solved by using the pktcdvd driver, which always
55 generates aligned writes.
56
57         # pktsetup dev_name /dev/hdc
58         # mkudffs /dev/pktcdvd/dev_name
59         # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
60
61
62 Notes
63 -----
64
65 - CD-RW media can usually not be overwritten more than about 1000
66   times, so to avoid unnecessary wear on the media, you should always
67   use the noatime mount option.
68
69 - Defect management (ie automatic remapping of bad sectors) has not
70   been implemented yet, so you are likely to get at least some
71   filesystem corruption if the disc wears out.
72
73 - Since the pktcdvd driver makes the disc appear as a regular block
74   device with a 2KB block size, you can put any filesystem you like on
75   the disc. For example, run:
76
77         # /sbin/mke2fs /dev/pktcdvd/dev_name
78
79   to create an ext2 filesystem on the disc.
80
81
82 Links
83 -----
84
85 See http://fy.chalmers.se/~appro/linux/DVD+RW/ for more information
86 about DVD writing.