| 1 |
<HTML> |
| 2 |
|
| 3 |
<HEAD> |
| 4 |
<BASE HREF="http://fy.chalmers.se/~appro/linux/DVD+RW/"> |
| 5 |
<TITLE>Blu-ray Disc/DVD+RW/+R/-R[W] for Linux</TITLE> |
| 6 |
<META NAME="keywords" CONTENT="dvd, recording, burning, rewritable, mmc, |
| 7 |
dvd+rw, dvd+r, dvdplusrw, dvd-rw, dvd-r, dvd-ram, |
| 8 |
dvd+r double layer, dvd+r dl, dvd-r dl, |
| 9 |
blu-ray, blu-ray disc, bd, bd-r, bd-re, |
| 10 |
linux, netbsd, openbsd, solaris, freebsd, hp-ux, irix, unix, |
| 11 |
mac os x, windows, mingw, win32, win64, |
| 12 |
hp, ricoh, philips, sony, nec, plextor, benq, |
| 13 |
optorite, lite-on, pioneer, lg, panasonic, matshita, |
| 14 |
multisession, growisofs"> |
| 15 |
<META NAME="description" CONTENT="Blu-ray Disc/DVD+RW/+R/-R[W] support for Unix: |
| 16 |
user-land utilities and optional Linux |
| 17 |
kernel patch"> |
| 18 |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
| 19 |
<LINK REL="icon" HREF="dvdplusrw.ico" TYPE="image/x-icon"> |
| 20 |
<LINK REL="shortcut icon" HREF="dvdplusrw.ico" TYPE="image/x-icon"> |
| 21 |
</HEAD> |
| 22 |
|
| 23 |
<BODY BGCOLOR="#C0C0C0" TEXT="#000000" |
| 24 |
LINK="#0000D0" VLINK="#502090" ALINK="#FF0000"> |
| 25 |
|
| 26 |
<P><HR> |
| 27 |
<TABLE><TR> |
| 28 |
<TD WIDTH="100%"> |
| 29 |
<H1 ALIGN="CENTER"><A HREF="Blu-ray/">Blu-ray Disc</A>/ |
| 30 |
<A HREF="http://www.dvdrw.com/">DVD+RW</A>/+R/ |
| 31 |
<A HREF="-RW/">-R[W]</A> for Linux</H1> |
| 32 |
<H5 ALIGN="CENTER">by <[email protected]>, |
| 33 |
March 2008</H5> |
| 34 |
<TD VALIGN="top"><A |
| 35 |
HREF="http://www.ioss.jp/sohodiy/vol02-part01.html"><IMG |
| 36 |
SRC="japanese.gif" WIDTH=48 HEIGHT=19 BORDER=0 ALT="Japanese"></A> |
| 37 |
</TR></TABLE> |
| 38 |
<P><HR> |
| 39 |
|
| 40 |
<P><TABLE CELLPADDING=4> |
| 41 |
<TR VALIGN="top" ALIGN="justify"> |
| 42 |
<TH>Q. <TH ALIGN="left">What is this page (not) about?</TR> |
| 43 |
<TR VALIGN="top" ALIGN="justify"> |
| 44 |
<TD>A.<SUP> </SUP> |
| 45 |
<TD>Maybe to your disappointment it is <B>not</B> about |
| 46 |
video<SUP>(*)</SUP>. The scope of this page is primarily |
| 47 |
computer storage applications of Blu-ray Disc and |
| 48 |
DVD±RW/±R, things like backup, archiving, data |
| 49 |
exchange... The downloadable files are an <I>optional</I> [and |
| 50 |
essentially historical] <A HREF="linux-2.4.patch">Linux 2.4 |
| 51 |
kernel DVD+RW patch</A> and a couple of user-land utilities |
| 52 |
dubbed as <NOBR><A HREF="tools/?M=D">dvd+rw-tools</A></NOBR>. |
| 53 |
|
| 54 |
<P><TABLE BORDER="0" ALIGN="LEFT"> |
| 55 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 56 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 57 |
<TD><FONT SIZE="-1">Though it doesn't mean that you can't burn |
| 58 |
DVD-Video discs with dvd+rw-tools. [Unlike Video-CD] DVD-Video |
| 59 |
is "molded" in an ordinary data file system and |
| 60 |
therefore no explicit support by the burning program is |
| 61 |
actually required. In other words it is the DVD-Video |
| 62 |
<I>content preparation</I> which is beyond the scope of this |
| 63 |
page.</FONT></TR> |
| 64 |
</TABLE> |
| 65 |
</TR> |
| 66 |
</TABLE> |
| 67 |
|
| 68 |
<P><TABLE CELLPADDING=4> |
| 69 |
<TR VALIGN="top" ALIGN="justify"> |
| 70 |
<TH>Q. <TH ALIGN="left">Kernel patch? What would it be good for? |
| 71 |
|
| 72 |
</TR> |
| 73 |
<TR VALIGN="top" ALIGN="justify"> |
| 74 |
<TD>A. <TD>It should be explicitly noted that the <B>user-land |
| 75 |
utilities, dvd+rw-tools,</B> do suffice for BD/DVD recording |
| 76 |
without explicit kernel support. So if they <A |
| 77 |
HREF="#tutorial">fulfill your requirements</A>, <I>then</I> |
| 78 |
<B>patching the kernel is</B> by all means <B>optional.</B> |
| 79 |
Kernel support would make it possible to house a read-write |
| 80 |
file system, e.g. <B>udf,</B> vfat, ext2, etc. and accomodate |
| 81 |
"live" data on suitable optical media. <I>However,</I> I have |
| 82 |
to recommend to <B>deploy it with caution</B>, see <A |
| 83 |
HREF="#udf">tutorial</A> for further details. Above mentioned |
| 84 |
2.4 patch is provided mostly for historical reasons. Linux |
| 85 |
kernel version 2.6>=10 is equipped with <A |
| 86 |
HREF="http://web.telia.com/~u89404340/packet.html">packet |
| 87 |
writing driver</A> which supports even DVD rewritable media, |
| 88 |
but I haven't tested it myself, so don't ask:-)</TR> |
| 89 |
</TABLE> |
| 90 |
|
| 91 |
<P><TABLE CELLPADDING=4> |
| 92 |
<TR VALIGN="top" ALIGN="justify"> |
| 93 |
<TH>Q. <TH ALIGN="left">What are the dvd+rw-tools for?</TR> |
| 94 |
<TR VALIGN="top" ALIGN="justify"> |
| 95 |
<TD>A. <TD>As implied/already mentioned - <B>to master the <A |
| 96 |
HREF="Blu-ray/">Blu-ray Disc</A> and DVD media, both +RW/+R and |
| 97 |
<A HREF="-RW/">-R[W]</A>.</B> I could simply refer to the |
| 98 |
tutorial below, but figured that couple of words about the |
| 99 |
[original] design ideas behind <B>growisofs, the principal |
| 100 |
burning utility,</B> wouldn't harm. Even though a modified |
| 101 |
kernel can let you put for example an ext2 file system on |
| 102 |
DVD+RW, it's probably not very practical, because you most |
| 103 |
likely want to access the data on an <I>arbitrary</I> computer. |
| 104 |
Or in other words you most likely want ISO9660. The trouble is |
| 105 |
that you might as well want to <I>add</I> data now and then. |
| 106 |
And what options do you have in the lack of multiple sessions |
| 107 |
(no, DVD+RW has no notion of multiple sessions)? Complete |
| 108 |
re-mastering which takes more and more time as data set grows? |
| 109 |
Well, yes, <I>unless</I> you employ growisofs! Growisofs |
| 110 |
provides the way to both lay down <I>and</I> grow an ISO9660 |
| 111 |
file system on (as well as to burn an arbitrary pre-mastered |
| 112 |
image to) all supported optical media.</TR> |
| 113 |
</TABLE> |
| 114 |
|
| 115 |
<P><TABLE CELLPADDING=4> |
| 116 |
<TR VALIGN="top" ALIGN="justify"> |
| 117 |
<TH>Q. <TH ALIGN="left">But if they support both + and - recording |
| 118 |
strategies, why are they called dvd+rw-tools?</TR> |
| 119 |
<TR VALIGN="top" ALIGN="justify"> |
| 120 |
<TD>A. <TD>For historical/nostalgical reasons, as originally they did |
| 121 |
support exclusively DVD+plus. On the other hand now, when the |
| 122 |
vast majority of DVD burners that are being introduced to the |
| 123 |
market today are DVD+capable, the name most likely refers to |
| 124 |
your unit in either case. And you can always consider the plus |
| 125 |
in the name as notion of a unique quality, such as |
| 126 |
"seamless" multisessioning, not as reference to some |
| 127 |
particular format:-)</TR> |
| 128 |
</TABLE> |
| 129 |
|
| 130 |
<P><TABLE CELLPADDING=4> |
| 131 |
<TR VALIGN="top" ALIGN="justify"> |
| 132 |
<TH>Q. <TH ALIGN="left">Do I still need <A |
| 133 |
HREF="http://cdrecord.berlios.de/old/private/cdrecord.html">cdrtools</A>? |
| 134 |
</TR> |
| 135 |
<TR VALIGN="top" ALIGN="justify"> |
| 136 |
<TD>A. <TD>Yes. It should be explicitly noted that <B>growisofs is a |
| 137 |
front-end to mkisofs,</B> i.e. invokes mkisofs to perform the |
| 138 |
actual ISO9660 file system layout. Secondly, the DVD burners |
| 139 |
available on the market can burn even CD-R[W] media and |
| •140 |
cdrecord is the tool for this job [and this job only]. |
| 141 |
Note that mkisofs is replaced with its successor genisoimage from |
| 142 |
<A HREF="http://www.cdrkit.org/">cdrkit</a>.</TR> |
| 143 |
</TABLE> |
| 144 |
|
| 145 |
<!-- |
| 146 |
<P><TABLE CELLPADDING=4> |
| 147 |
<TR VALIGN="top" ALIGN="justify"> |
| 148 |
<TH>Q. <TH ALIGN="left">There are dual-format DVD+RW/-RW units |
| 149 |
available on the market, e.g. SONY DRU500. Can I use |
| 150 |
dvd+rw-tools with it/them? |
| 151 |
</TR> |
| 152 |
<TR VALIGN="top" ALIGN="justify"> |
| 153 |
<TD>A. <TD>If the question is if you can use dvd+rw-tools to master the |
| 154 |
DVD+RW/+R media in a ±RW drive, then the answer always |
| 155 |
was "definitely yes." If the question really is if |
| 156 |
<B>you can use dvd+rw-tools to burn even DVD-R[W] media,</B> |
| 157 |
then I have the pleasure to inform you that as of version 5.0 |
| 158 |
dvd+rw-tools provide <I>experimental</I> support even for |
| 159 |
recording of DVD-R[W] media and refer you to <A HREF="-RW/">a |
| 160 |
dedicated page</A> for further details.</TR> |
| 161 |
</TABLE> |
| 162 |
--> |
| 163 |
|
| 164 |
<P><TABLE CELLPADDING=4> |
| 165 |
<TR VALIGN="top" ALIGN="justify"> |
| 166 |
<TH>Q. <TH ALIGN="left">Does it work with <I>my</I> recorder unit? |
| 167 |
</TR> |
| 168 |
<TR VALIGN="top" ALIGN="justify"> |
| 169 |
<TD>A. <TD>If your unit is <A |
| 170 |
HREF="http://www.t10.org/drafts.htm#mmc3">MMC</A> compliant, |
| 171 |
then the answer is "<A HREF="hcn.html">most likely</A> it |
| 172 |
just does." Well, as the probability of your unit being |
| 173 |
non-MMC compliant is virtually zero, the answer in practice is |
| 174 |
unconditionally "<A HREF="hcn.html">most likely</A>." |
| 175 |
The [core] tools were reported to work with a wide range of |
| 176 |
drives, including <I>[but not limited to]</I> <NOBR>HP |
| 177 |
dvd[12345]x0i,</NOBR> <NOBR>Ricoh MP512x,</NOBR> <NOBR>Philips |
| 178 |
DVDRW[248]xx,</NOBR> <NOBR>SONY DRU-[157]x0,</NOBR> <NOBR>NEC |
| 179 |
ND-[1234]xx0,</NOBR> <NOBR>TDK indiDVD 4x0N,</NOBR> |
| 180 |
<NOBR>Plextor PX-[57]xx,</NOBR> <NOBR>Benq DW[48]00A,</NOBR> |
| 181 |
<NOBR>OptoRite DD0[24]0x,</NOBR> <NOBR>Lite-On |
| 182 |
LDW-[4816]xxS,</NOBR> as well as <A HREF="-RW/">nonplus</A> |
| 183 |
units such as <NOBR>Pioneer DVR-x0[45679],</NOBR> <NOBR>LG |
| 184 |
GxA-40[248]x,</NOBR> <NOBR>Toshiba SD-R[56]112,</NOBR> |
| 185 |
<NOBR>Panasonic UJ-811</NOBR>, <NOBR>LF-D[35]1x,</NOBR> and not |
| 186 |
the least <A HREF="Blu-ray/">all-mighty</A> |
| 187 |
<NOBR>SW-5582...</NOBR></TR> |
| 188 |
</TABLE> |
| 189 |
|
| 190 |
<P><TABLE CELLPADDING=4> |
| 191 |
<TR VALIGN="top" ALIGN="justify"> |
| 192 |
<TH>Q. <TH ALIGN="left">Is there a GUI front-end available for |
| 193 |
dvd+rw-tools? |
| 194 |
</TR> |
| 195 |
<TR VALIGN="top" ALIGN="justify"> |
| 196 |
<TD>A. <TD><A HREF="http://www.k3b.org/">K3b,</A> version 0.10 |
| 197 |
and later, and <A |
| 198 |
HREF="http://ftp.gnome.org/pub/GNOME/sources/nautilus-cd-burner/">nautilus-cd-burner,</A> |
| 199 |
version 0.5.1 and later, are both hiding growisofs behind their |
| 200 |
pretty buttons and menus:-) Keep in mind that those are not |
| 201 |
directly related to <NOBR>dvd+rw-tools</NOBR> development |
| 202 |
effort and GUI users should turn elsewhere for <I>end-user</I> |
| 203 |
support. Oh! dvd+rw-tools 5.10.x is a minimum requirement for |
| 204 |
GUI frontends...</TR> |
| 205 |
</TABLE> |
| 206 |
|
| 207 |
<P><TABLE CELLPADDING=4> |
| 208 |
<TR VALIGN="top" ALIGN="justify"> |
| 209 |
<TH>Q. <TH ALIGN="left">I don't run Linux. What are my options? |
| 210 |
</TR> |
| 211 |
<TR VALIGN="top" ALIGN="justify"> |
| 212 |
<TD>A. <TD>Version 5.4 adds support for <B><A |
| 213 |
HREF="http://www.mosha.net/05-dvdrw/dvdrw.shtml">OpenBSD</A>/NetBSD.</B> |
| 214 |
Version 5.6 adds support for <B>Solaris 2.x</B> <FONT |
| 215 |
SIZE=-1>[<A HREF="solaris.com.html">commercial licensing</A> |
| 216 |
terms for distribution on Solaris are to be settled with <A |
| 217 |
HREF="http://www.inserve.se/">Inserve Technology</A>]</FONT>. |
| 218 |
Version 5.8 features <A |
| 219 |
HREF="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/creating-dvds.html"><B>FreeBSD</B></A> |
| 220 |
port contributed by Matthew Dillon, FreeBSD Development Team |
| 221 |
alumnus. <NOBR>Hewlett-Packard</NOBR> Company has donated |
| 222 |
<B><NOBR>HP-UX 11</NOBR></B> support for |
| 223 |
5.14<SUP>(*)</SUP>. <B>IRIX 6.x</B> support appears in |
| 224 |
5.19, <B><A HREF="tools/win32/">Win32</A></B> one - in 6.0, |
| 225 |
while <NOBR>Mac OS X</NOBR> - in 7.0... |
| 226 |
|
| 227 |
<P><TABLE BORDER="0" ALIGN="LEFT"> |
| 228 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 229 |
<TD><I>¡</I> |
| 230 |
<TD><I>Common usage tip!</I><SUP> </SUP>Whenever |
| 231 |
separately available [and unless stated otherwise], do <B>use |
| 232 |
character-type device entry with <NOBR>dvd+rw-tools,</NOBR></B> |
| 233 |
e.g. OpenBSD/NetBSD users should stick to <TT>/dev/<FONT |
| 234 |
COLOR="red">r</FONT>cdXc</TT>.</TR> |
| 235 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 236 |
<!-- <TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 237 |
<TD><FONT SIZE="-1">FreeBSD tip! If you have an IDE unit, <A |
| 238 |
HREF="http://www.cuivre.fr.eu.org/~thomas/atapicam/">atapicam</A> |
| 239 |
is your mantra! Secondly, if you have <TT>devfs</TT> mounted, |
| 240 |
you might have to <A HREF="fdescfs.sh">mount</A> |
| 241 |
<TT>fdescfs</TT> as well.</FONT></TR> --> |
| 242 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 243 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 244 |
<TD><FONT SIZE="-1">As of 5.14 HP-UX support was classified as |
| 245 |
"initial." Version 5.18 in turn is the one which has |
| 246 |
undergone <A HREF="tools/HP/">HP quality assurance</A> testing |
| 247 |
and is delivered on <A HREF="http://www.software.hp.com/">HP |
| 248 |
software depot</A>.</FONT></TR> |
| 249 |
</TABLE> |
| 250 |
</TR> |
| 251 |
</TABLE> |
| 252 |
|
| 253 |
<P><HR> |
| 254 |
|
| 255 |
<H3>Foreword</H3> |
| 256 |
|
| 257 |
<P ALIGN="JUSTIFY">As of May 2003 I've decided to advise users to |
| 258 |
<B>turn to <<A |
| 259 |
HREF="mailto:[email protected]">[email protected]</A>> |
| 260 |
on support matters.</B> It's an open list, meaning that you don't have |
| 261 |
to be <A HREF="http://lists.debian.org/cdwrite/">subscribed</A> to post |
| 262 |
a problem report. List archives can be found at both <A |
| 263 |
HREF="http://lists.debian.org/cdwrite/">subscribe page</A> and <A |
| 264 |
HREF="http://www.mail-archive.com/cdwrite%40other.debian.org/">mail-archive.com</A>. |
| 265 |
<B>When submitting report, provide versioning information, exact |
| 266 |
command line, <I>exact output</I> generated by the program and |
| 267 |
complement it with <NOBR>dvd+rw-mediainfo</NOBR> output for |
| 268 |
<I>resulting</I> recording.</B> Do check couple of last <A |
| 269 |
HREF="http://lists.debian.org/cdwrite/">archived months</A>, as the |
| 270 |
issue might have been discussed <I>recently</I>. If you've chosen to |
| 271 |
contact me personally and haven't heard back within a week or so, then |
| 272 |
you most likely overlooked something on this page. Please read it more |
| 273 |
attentively<A HREF="keys.txt">...</A> |
| 274 |
|
| 275 |
<P ALIGN="JUSTIFY">Special thanks for hardware donations [in |
| 276 |
chronological order]:<BR> |
| 277 |
|
| 278 |
<A HREF="http://www.inserve.se/"><IMG SRC="inserve.gif" |
| 279 |
ALT="Inserve Technology" BORDER=0></A> |
| 280 |
|
| 281 |
<A HREF="http://www.hp.com/"><IMG SRC="hp.gif" |
| 282 |
ALT="HP" BORDER=0></A> |
| 283 |
|
| 284 |
<A HREF="http://www.linuxfund.org/"><IMG SRC="linuxfund.gif" |
| 285 |
ALT="LinuxFund" BORDER=0></A> |
| 286 |
|
| 287 |
<A HREF="http://dmu.commtech-fastcom.com/"><IMG |
| 288 |
SRC="commtech.gif" ALT="comm*tech" BORDER=0></A> |
| 289 |
|
| 290 |
<A NAME="tutorial"><P><HR></A> |
| 291 |
|
| 292 |
<H3>Tutorial</H3> |
| 293 |
|
| 294 |
<P><HR WIDTH="50%" ALIGN="LEFT"> |
| 295 |
|
| 296 |
<UL> |
| 297 |
|
| 298 |
<P><LI><P ALIGN="JUSTIFY">If your burner unit is managed by some |
| 299 |
<NOBR><B>Linux<SUP>(*)</SUP></NOBR> removable media |
| 300 |
automounting/autoplaying facility</B>, such as autofs, supermount, |
| 301 |
subfs/submount, magicdev, autorun or similar, take it <B>out</B> of its |
| 302 |
control! I can't help you with the latter, check your system |
| 303 |
documentation (such as google perhaps:-) for specific instructions. |
| 304 |
<FONT COLOR="brown"><B>Failure to take your unit out of |
| 305 |
<NOBR>Linux<SUP>(*)</SUP></NOBR> automounting/autoplaying facility |
| 306 |
control can result in busted recording, a coaster!</B></FONT> At the |
| 307 |
very least you have to make sure your unit is not automounted during |
| 308 |
recordings. <!-- Linux kernel should have/implement "open for |
| 309 |
exclusive use," but it doesn't. Therefore the trouble... ---> |
| 310 |
|
| 311 |
<TABLE BORDER="0"> |
| 312 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 313 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 314 |
<TD><FONT SIZE="-1">dvd+rw-tools support Solaris volume manager and |
| 315 |
IRIX mediad in more gracious manner and it's safe to leave recorder |
| 316 |
under <I>their</I> control.</FONT></TR> |
| 317 |
</TABLE> |
| 318 |
|
| 319 |
<P><LI><P ALIGN="JUSTIFY">Remember to <B>consult <A |
| 320 |
HREF="hcn.html">Hardware Compatibility Notes</A></B> for possible |
| 321 |
caveats or vendor-specific instructions for your unit. Well, such |
| 322 |
reminder belongs at the end of tutorial, but I consider it important |
| 323 |
enough to bring it up already here:-) |
| 324 |
|
| 325 |
<P><LI><P ALIGN="JUSTIFY"><B>If you have an IDE unit and run 2.4.x |
| 326 |
kernel,</B> you most likely want to "route" it through ide-scsi |
| 327 |
emulation layer by either: |
| 328 |
|
| 329 |
<P><UL> |
| 330 |
<LI>passing "<TT>hd<FONT COLOR="red">X</FONT>=ide-scsi</TT>" |
| 331 |
argument to kernel; |
| 332 |
<LI>appending following lines to your /etc/modules.conf: |
| 333 |
<BLOCKQUOTE> |
| 334 |
<PRE>options ide-cd ignore=hd<FONT COLOR="red">X</FONT> |
| 335 |
pre-install sg modprobe ide-scsi |
| 336 |
pre-install sr_mod modprobe ide-scsi |
| 337 |
pre-install ide-scsi modprobe ide-cd |
| 338 |
</PRE></BLOCKQUOTE> |
| 339 |
</UL> |
| 340 |
|
| 341 |
<P ALIGN="JUSTIFY">Keep in mind that once hd<FONT COLOR="red">X</FONT> |
| 342 |
is routed through ide-scsi, you can no longer refer to <TT>/dev/hd<FONT |
| 343 |
COLOR="red">X</FONT></TT><SUP>(*)</SUP>, but to corresponding |
| 344 |
<TT>/dev/scd<FONT COLOR="red">N</FONT></TT> only. |
| 345 |
|
| 346 |
<P><TABLE BORDER="0" WIDTH="95%" ALIGN="CENTER"> |
| 347 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 348 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 349 |
<TD><FONT SIZE="-1">well, except as in <TT>hdparm -d [0|1] /dev/hd<FONT |
| 350 |
COLOR="red">X</FONT></TT>. <B>As for DMA settings.</B> Several users of |
| 351 |
NEC[-based] units have reported that their systems crash during DVD |
| 352 |
recording. The problem appears to be related to DMA settings, at least |
| 353 |
switching it off reportedly helps. The problem appears to be specific to |
| 354 |
some IDE chipsets...</FONT> |
| 355 |
</TR> |
| 356 |
</TABLE> |
| 357 |
|
| 358 |
<P><LI><P ALIGN="JUSTIFY"><B>If you have an external unit,</B> just get |
| 359 |
it working as CD-ROM first. I myself have limited experience with <A |
| 360 |
HREF="http://www.linux-usb.org/">USB</A> or <A |
| 361 |
HREF="http://www.linux1394.org/">IEEE1394/Firewire</A> optical storage |
| 362 |
devices and have to direct you elsewhere for specific instructions. I |
| 363 |
however am confident that if you manage to get your drive working |
| 364 |
<I>reliably</I> as <NOBR>CD-ROM</NOBR> <I>and</I> <NOBR>CD-R[W]</NOBR> |
| 365 |
burner, then you won't have any troubles with dvd+rw-tools either. USB |
| 366 |
connected drives were reported to be working fine since eternity. |
| 367 |
Firewire connected drives in turn were reported to fail miserably under |
| 368 |
2.4.18. The failure didn't seem to be DVD recording related as it |
| 369 |
reportedly failed burning even CD-R media. Firewire support was |
| 370 |
substantially revamped in 2.4.19, and dvd+rw-tools were reported to |
| 371 |
work with this and later kernels. |
| 372 |
|
| 373 |
<P><LI><P ALIGN="JUSTIFY">If you're running 2.4.19 or .20, consider |
| 374 |
applying <A HREF="sg-2.4.19.patch">this drivers/scsi/sg.c patch</A>. |
| 375 |
The bug is fixed in .21. I write "consider" and not |
| 376 |
"do" for the following reasons: |
| 377 |
|
| 378 |
<P><UL> |
| 379 |
<LI>dvd+rw-tools are not affected by this bug (as they don't use SG_IO |
| 380 |
interface), cdrecord [potentially] is; |
| 381 |
<LI>I however haven't actually experienced the problem with cdrecord |
| 382 |
(maybe yet, kernel could have managed to keep buffers neatly aligned |
| 383 |
while talking to cdrecord those times I tried), it was VMware that has |
| 384 |
failed miserably on me; |
| 385 |
</UL> |
| 386 |
|
| 387 |
<P ALIGN="JUSTIFY">As of version 5.6 dvd+rw-tools add support for SG_IO |
| 388 |
pass-through or in other words support for Linux 2>=5[.43], |
| 389 |
where "generic" SCSI interface can be bypassed by issuing |
| 390 |
SG_IO ioctl directly against block device, such as <TT>/dev/hd<FONT |
| 391 |
COLOR="red">X</FONT></TT>. I wish it worked without need for <A |
| 392 |
HREF="http://marc.theaimsgroup.com/?t=105410790500005&r=1&w=2">interim</A> |
| 393 |
patches <A HREF="ide-cd-2.5.69.patch">#1</A> and <A |
| 394 |
HREF="ide-cd-2.5.69.+patch">#2</A>, (the latter is relative to |
| 395 |
2.5.69-75, the 1st problem is addressed in .71, 2nd one - .75-bk3 in |
| 396 |
"<A |
| 397 |
HREF="http://marc.theaimsgroup.com/?l=linux-kernel&m=105787192005635&w=2">last |
| 398 |
minute</A>" prior first 2.6 cut. As for 2.6 in more general sense. |
| 399 |
As you can imagine this new interface renders ide-scsi layer |
| 400 |
superfluous and "the[ir] official plan™" is to scrap |
| 401 |
it. I'm not really fond of the idea, but not for /dev/sg* account. I |
| 402 |
mean I [personally] would prefer to keep ide-scsi and use SG_IO |
| 403 |
pass-through with <TT>/dev/scdN</TT>, rather than with |
| 404 |
<TT>/dev/hdX</TT>:-) |
| 405 |
|
| 406 |
<P ALIGN="JUSTIFY">If you have to make dvd+rw-tools work under Linux |
| 407 |
kernel 2.6.8, then upgrade the tool-chain to 5.21.x or later and |
| 408 |
manually reward the installed binaries with set-root-uid flag. But the |
| 409 |
"supported" recommendation is to just stay away from this |
| 410 |
particular kernel version. <B>As for 2.6>8, dvd+rw-tools 5.21.x is |
| 411 |
requirement.</B> Oh! dvd+rw-booktype utility would require set-root-uid |
| 412 |
privilege then. Given its semi-official status and the fact that this |
| 413 |
utility works only with limited number of units, installation procedure |
| 414 |
<I>abstains</I> from installing dvd+rw-booktype set-root-uid, leaving |
| 415 |
this security sensitive choice to the end-user. |
| 416 |
|
| 417 |
<P><LI><P ALIGN="JUSTIFY"><B>Download, unpack and compile the <A |
| 418 |
HREF="tools/?M=D">the tool-chain</A>.</B> To build the thing do pick the |
| 419 |
.tar.gz archive, which contains Makefile as well as .spec file. You |
| 420 |
will <B>need both C and C++ compilers</B> installed. Separate |
| 421 |
source code files found in the <A HREF="tools/?M=D">download catalog</A> |
| 422 |
are provided mainly for on-line reference purposes (such as <A |
| 423 |
HREF="tools/growisofs.c">revision history</A>:-). |
| 424 |
|
| 425 |
<P ALIGN="JUSTIFY">If your Linux kernel supports multiple ABIs (e.g. |
| 426 |
Linux-sparc64 can run even 32-bit Linux-sparc applications, as well as |
| 427 |
Linux-x86_64 can execute legacy 32-bit i386 binaries), make sure you |
| 428 |
compile for <I>native</I> 64-bit ABI (which can normally be done with |
| 429 |
'<TT>make TARGET_ARCH=-m64</TT>'). The problem here is that 64-bit |
| 430 |
kernel has to explicitly convert ioctl structures passed by 32-bit |
| 431 |
applications and apparently it does really lousy job when it comes to |
| 432 |
CDROM_SEND_PACKET ioctl deployed by dvd+rw-tools. |
| 433 |
|
| 434 |
<P><LI><P ALIGN="JUSTIFY">As new media products and brands are being |
| 435 |
introduced to the market all the time, it apparently pays off to |
| 436 |
<B><I>periodically</I> check for firmware updates.</B> For elder units |
| 437 |
firmware update might even be an <B>absolute requirement</B> for using |
| 438 |
new media. Special note for HP users. HP no longer posts firmware |
| 439 |
updates on a web-page. Instead they let some Windows auto-update gizmo |
| 440 |
to pick firmware updates among <NOBR><TT>dvd[1-6]00*.exe</TT></NOBR> |
| 441 |
files in <A |
| 442 |
HREF="ftp://ftp.hp.com/pub/information_storage/software/">their FTP |
| 443 |
directory</A>, so that readers of this page tend to miss them... |
| 444 |
|
| 445 |
<P><LI><P ALIGN="JUSTIFY"><B>Formatting the BD and DVD+RW media.</B> |
| 446 |
Virgin BD and DVD+RW media needs to be initally formatted prior usage. |
| 447 |
Once again, <B>only virgin BD and DVD+RW media needs to be |
| 448 |
formatted.</B> As of version 5.10 growisofs detects blanks and applies |
| 449 |
initial formatting procedure automatically. Otherwise same effect can |
| 450 |
be achieved by passing the device name, e.g. <TT>/dev/scd0</TT>, as an |
| 451 |
argument to <A HREF="tools/dvd+rw-format.cpp">dvd+rw-format</A>. Though |
| 452 |
in <A HREF="Blu-ray">BD case</A> it does offer more flexibility than |
| 453 |
growisofs. To make formatting process reasonably fast, less than 1 |
| 454 |
minute, the media gets formatted only partially, as you can notice by |
| 455 |
observing progress indicator displayed by dvd+rw-format. The final |
| 456 |
indicator value varies from firmware to firmware, values as low as 1.6% |
| 457 |
were observed. But it does not mean that you can only write that |
| 458 |
little. The unit keeps formatting <I>transparently</I>, as you add more |
| 459 |
data. Oh! Do keep in mind that DVD capacity of 4.7GB is expressed in |
| 460 |
salesman's GB, i.e. 1000<SUP>3</SUP> and not 1024<SUP>3</SUP>. And |
| 461 |
so is one of BD. |
| 462 |
|
| 463 |
<P ALIGN="JUSTIFY">It was observed that excessive reformats can render |
| 464 |
DVD+RW media unusable already after 10-20 reformats. It appears to be a |
| 465 |
firmware deficiency, not some common media defect [at least it was |
| 466 |
perfectly possible to salvage the media in a unit of different brand], |
| 467 |
but I don't recommend [enforced] reformat in either case. |
| 468 |
|
| 469 |
<P ALIGN="JUSTIFY">Note that <B>re-formatting procedure does not |
| 470 |
substitute for blanking.</B> If you want to nullify the media, e.g. for |
| 471 |
privacy reasons, do it explicitly with '<TT>growisofs <NOBR>-Z</NOBR> |
| 472 |
/dev/scd<FONT COLOR="red">N</FONT>=/dev/zero</TT>'. Otherwise just |
| 473 |
write over previous recording as it simply wasn't there, no |
| 474 |
re-formatting is required. |
| 475 |
|
| 476 |
<!--- |
| 477 |
<P ALIGN="JUSTIFY">DVD+R media does not require any formatting |
| 478 |
procedure applied and is ready to use out-of-the-box. Apparently, a |
| 479 |
reminder that 1st generation units (Ricoh MP5120A and derivatives) |
| 480 |
are not capable of burning DVD+R is needed.---> |
| 481 |
|
| 482 |
<A NAME="growisofs"><P></A><LI><P ALIGN="JUSTIFY"><B>Burning with <A |
| 483 |
HREF="tools/growisofs.c">growisofs</A>.</B> There is hardly a need for |
| 484 |
manual for growisofs. In a nutshell growisofs just passes all command |
| •485 |
line arguments to genisoimage and dumps its output directly onto the media. |
| 486 |
The first part means that you basically can [well, <I>should</I>] |
| •487 |
consult <A HREF="genisoimage.8.html">genisoimage manual page</A> and |
| 488 |
accompanying reference documentation (including multisession related |
| 489 |
section[s]) and the second part means that you shouldn't expect an |
| 490 |
ISO-image on the standard output (nor make sure you have enough free |
| •491 |
temporary storage<TT>:-)</TT>. Differences from genisoimage command line |
| 492 |
are: |
| 493 |
|
| 494 |
<P><UL> |
| 495 |
<LI>you may not use -o option; |
| 496 |
<LI>you don't have to specify -C option, growisofs will construct one |
| 497 |
for you; |
| 498 |
<LI>there is internal -Z option for initial session recording, this |
| •499 |
substitutes for originally suggested 'genisoimage | dd of=/dev/scd0'; |
| 500 |
</UL> |
| 501 |
|
| 502 |
<P ALIGN="JUSTIFY">Otherwise <I>everything</I> that applies to |
| •503 |
[multisession] mastering with genisoimage applies to growisofs as well. For |
| 504 |
example just like with genisoimage you should make a note on which options |
| 505 |
you used to master the initial "session" with and stick to |
| 506 |
them, e.g.: |
| 507 |
|
| 508 |
<P><BLOCKQUOTE><PRE> |
| 509 |
growisofs -Z /dev/scd0 <FONT COLOR="red">-R -J</FONT> /some/files |
| 510 |
growisofs -M /dev/scd0 <FONT COLOR="red">-R -J</FONT> /more/files |
| 511 |
</PRE></BLOCKQUOTE> |
| 512 |
|
| •513 |
<P ALIGN="JUSTIFY">Oh! Do make sure you have genisoimage on your $PATH |
| 514 |
(genisoimage is part of <A HREF="http://www.cdrkit.org/">cdrkit</A>, |
| 515 |
or at least mkisofs <FONT COLOR="red">1.14</FONT> (mkisofs 1.14 is part of |
| 516 |
cdrtools 1.10). If you consider passing <TT>/same/files</TT> as argument, or in |
| 517 |
other words consider deploying growisofs for <I>incremental</I> |
| 518 |
multisession backups, then you shall find <A |
| 519 |
HREF="mkisofs-2.01a16-root.diff">this '-old-root' extension</A> to |
| 520 |
mkisofs <FONT COLOR="red">2<A |
| 521 |
HREF="mkisofs-2.0-root.diff">.</A>0-2.01</FONT> simply indispensable. |
| 522 |
The idea and implementation by Patrick Ohly is to "graft" |
| 523 |
recording sessions as separate directories. Each backup |
| 524 |
increment/directory is ment to contain both updated files and |
| 525 |
<I>references</I> to previously backed up ones, which facilitates |
| 526 |
comparison between increments as well as fine-graded restore. |
| 527 |
|
| 528 |
<P ALIGN="justify">Number of users asked about opposite to |
| 529 |
multisessioning: multivolume support. Being essentially a recording |
| 530 |
program growisofs does not support multiple volumes by itself. There're |
| 531 |
couple of front-ends I can recommend that arrange for this: <A |
| 532 |
HREF="http://scdbackup.sourceforge.net/main_eng.html">scdbackup</A> and |
| 533 |
<A HREF="http://www.serice.net/shunt/">shunt</A>. But back to |
| 534 |
growisofs... |
| 535 |
|
| 536 |
<P ALIGN="JUSTIFY"><B>In addition to intuitive -Z interpretation,</B> |
| 537 |
growisofs [version 3.3 and later] recognizes special form of -Z command |
| 538 |
line option which permits burning of arbitrary pre-mastered images. The |
| 539 |
"magic" command is: |
| 540 |
|
| 541 |
<P><BLOCKQUOTE><PRE> |
| 542 |
growisofs -Z /dev/scd0<FONT COLOR="red">=</FONT>image.iso |
| 543 |
</PRE></BLOCKQUOTE> |
| 544 |
|
| 545 |
<P ALIGN="JUSTIFY">where <TT>image.iso</TT> represents an <I>arbitrary |
| 546 |
object</I> in the file system, such as file, named pipe or device |
| 547 |
entry. No, nothing is "growing" here and command name is |
| 548 |
counter-intuitive in this particular context. And here is even less |
| 549 |
intuitive<TT>:-)</TT> If you wish to burn down output generated by an |
| 550 |
arbitrary program, you can use: |
| 551 |
|
| 552 |
<P><BLOCKQUOTE><PRE> |
| 553 |
dumpsomething | growisofs -Z /dev/scd0=<FONT COLOR="red">/dev/fd/0</FONT> |
| 554 |
</PRE></BLOCKQUOTE> |
| 555 |
|
| 556 |
<P ALIGN="JUSTIFY">Burning BD-R/DVD±R implies extra limitations: |
| 557 |
|
| 558 |
<P><UL> |
| 559 |
|
| 560 |
<LI>Needless to say that you have only one shot with -Z |
| 561 |
option<TT>:-)</TT> |
| 562 |
|
| 563 |
<!--- |
| 564 |
<LI>Apparently media needs to be manually reloaded [ejected and pushed |
| 565 |
back again] after every burning session (well, if you haven't patched |
| 566 |
the kernel that is<TT>:-)</TT> |
| 567 |
---> |
| 568 |
|
| 569 |
<LI>Unlike DVD+RW, DVD±R media does have notion of multiple |
| 570 |
sessions. <I>However!</I> Not all legacy units can "see" |
| 571 |
beyond the first one. Few DVD-ROM units are capable of DVD-R |
| 572 |
multiborder playback, even fewer support DVD+R multisessioning. In |
| 573 |
other words your DVD burner might be the only unit in your vicinity |
| 574 |
capable to access data added at different occasions. |
| 575 |
|
| 576 |
<LI>Even if your DVD unit does "sense" multiple sessions, |
| 577 |
Linux kernel [2.4] sometimes fails to pull that information from the |
| 578 |
drive<TT>:-(</TT> Till the problem is looked into and resolved you can |
| 579 |
work it around by reloading corresponding driver, most likely |
| 580 |
'<TT>rmmod sr_mod</TT>'. |
| 581 |
|
| 582 |
<LI>Linux kernel 2.6<<A |
| 583 |
HREF="http://marc.theaimsgroup.com/?l=linux-kernel&m=110330852622064&w=2">10</A> |
| 584 |
users might experience <A |
| 585 |
HREF="http://marc.theaimsgroup.com/?l=linux-kernel&m=108827602322464&w=2">problems |
| 586 |
mounting multisession media</A> with last session starting beyond |
| 587 |
2.2GB boundary. As fast-acting remedy I can suggest to route your unit |
| 588 |
through ide-scsi, the way it was under 2.4. Even though it's declared |
| 589 |
unsupported it actually still works in 2.6 (I for one still use it). |
| 590 |
|
| 591 |
<LI>If you go for BD-R/DVD±R multisessioning, you have to use |
| •592 |
genisoimage from <A HREF="http://www.cdrkit.org/">cdrkit-1.0 or later</A>, |
| 593 |
or mkisofs from <A HREF="ftp://ftp.berlios.de/pub/cdrecord/">cdrtools-2.0 |
| 594 |
or later</A> or apply <A HREF="multi.diff">this patch</A>. |
| 595 |
|
| 596 |
<LI>And when it comes to <B>DVD+R Double Layer and <NOBR>DVD-R</NOBR> |
| 597 |
Dual Layer recordings,</B> growisofs applies yet another limitation, |
| 598 |
purely artificial. Taking into consideration Double Layer media prices |
| 599 |
growisofs is programmed to <B>refuse to perform <I>unappendable</I> |
| 600 |
recordings which are less than 1/2 of blank capacity</B> and to advice |
| 601 |
to use single layer media instead. |
| 602 |
|
| 603 |
<LI>DVD-R Dual Layer multisessioning is not supported for a reason |
| 604 |
discussed on the <A HREF="-RW/#nomultisess">-RW companion page</A>. Once |
| 605 |
again, as of the moment of this writing <NOBR>DVD-R</NOBR> Dual Layer |
| 606 |
recordings come out unappendable and can not be grown. |
| 607 |
</UL> |
| 608 |
|
| 609 |
|
| 610 |
<P ALIGN="justify">And once again, do keep in mind that 4.7GB are |
| 611 |
salesman's GB, i.e. 1000<SUP>3</SUP> and not 1024<SUP>3</SUP>. If |
| 612 |
translated to "real" GB, single layer |
| 613 |
<NOBR>DVD±R[W]</NOBR> capacity is not larger than 4.4GiB, and BD |
| 614 |
- not larger than 23.3GiB! It should also be noted that earlier |
| 615 |
growisofs versions did not check if there is enough space on media to |
| 616 |
accommodate the data set to be burned, meaning that it was your sole |
| 617 |
responsibility to make sure "overburn" condition is not |
| 618 |
raised. As of version 5.2 growisofs performs the necessary checks |
| 619 |
for you and refuses to start recording if "overburn" |
| 620 |
condition appears to be unavoidable. This behaviour can be overridden |
| 621 |
with <TT>-overburn</TT> command-line option. |
| 622 |
|
| 623 |
<P><LI><P ALIGN="justify">If you're satisfied with growisofs, then you |
| 624 |
should <B>just proceed to <A HREF="#compat">the next chapter</A></B> |
| 625 |
and abstain from applying the <B>optional 2.4.x kernel patch.</B> If |
| 626 |
you haven't stopped reading beyond this line, <A |
| 627 |
HREF="linux-2.4.patch">download</A> the patch, apply it, rebuild the |
| 628 |
kernel or modules and re-install (kernel or cdrom.o and sr_mod.o |
| 629 |
modules, whichever appropriate), but don't ask <I>me</I> <A |
| 630 |
HREF="http://www.linuxhq.com/patch-howto.html">how</A>. As you could |
| 631 |
have noticed, patch targets SCSI CD-ROM module. This means that you |
| 632 |
<I>have to</I> "route" your IDE unit through ide-scsi to get this one |
| 633 |
working. To see it in action, insert formatted DVD+RW media and try to |
| 634 |
access it, '<TT>dd if=/dev/scd<FONT COLOR="red">N</FONT> count=0</TT>' |
| 635 |
would do. Then verify that kernel logs "<TT>sr<FONT |
| 636 |
COLOR="red">N</FONT>: mmc-3 profile: 1Ah</TT>". You should now be |
| •637 |
able to '<TT>genisoimage -pad . | dd of=/dev/scd<FONT COLOR="red">N</FONT> |
| 638 |
obs=32k</TT>' or even '<TT>mke2fs -b 2048 /dev/scd<FONT |
| 639 |
COLOR="red">N</FONT></TT>' and observe kernel logging "<TT>sr<FONT |
| 640 |
COLOR="red">N</FONT>: dirty DVD+RW media</TT>." |
| 641 |
|
| 642 |
<!--<P ALIGN="justify">If you have previous patch version applied, then you |
| 643 |
have to back it out first. The simplest way is probably to restore |
| 644 |
<TT>drivers/scsi/sr*.[ch]</TT> and <TT>drivers/cdrom/cdrom.c</TT> from |
| 645 |
your original Linux source code ditribution.--> |
| 646 |
|
| 647 |
<P ALIGN="JUSTIFY"><B>Linux 2.6</B> DVD+RW kernel support is planned in |
| 648 |
line with DVD+MRW kernel support. This [unfortunately] means that |
| 649 |
industry has to deliver a DVD+MRW capable unit first. Yes, the last |
| 650 |
sentence means that despite all the promises, there are no such units |
| 651 |
available on the market yet. As of the 1st of August 2003, Ricoh MP5240A, |
| 652 |
Philips DVDRW416K or BenQ DW400A do <B>not</B> actually implement |
| 653 |
Mt.Rainier/EasyWrite support. It remains to be seen if they will offer |
| 654 |
it in form of firmware upgrade. In either case, the [original] project |
| 655 |
goal is not only read-write support for DVD+[M]RW capable units |
| 656 |
themselves, but even playback of DVD+MRW formatted media in legacy |
| 657 |
DVD-ROM units (when defect list will be read and interpreted by OS |
| 658 |
software in opposite to Mt.Rainier firmware). |
| 659 |
|
| 660 |
<A NAME="udf"><P><LI></A><P ALIGN="justify">Even though kernel now |
| 661 |
permits to build and mount arbitrary file system, there is one thing you |
| 662 |
<I>must</I> keep in mind before you just proceed, no matter how |
| 663 |
tempting it might appear. |
| 664 |
|
| 665 |
<P ALIGN="justify">As you might know DVD+RW media can sustain only |
| 666 |
around 1000 overwrites. The thing about fully fledged file systems |
| 667 |
is that every read [or tight bunch of 'em] is accompanied by |
| 668 |
corresponding i-node update or in other words a write! Now, let's say |
| 669 |
you lookup the mount point (e.g. ls /mnt/dvd) ten times a day. This |
| 670 |
gives you a 100 days lifetime on your mountpoint and therefore media. |
| 671 |
Not really much, huh? So do use <TT>noatime</TT> mount option with |
| 672 |
DVD+RW media or have it mounted read-only most of the time. However! |
| 673 |
Every read-write mount "costs" a super-block update. So that |
| 674 |
if you remount the media say 3 times a day, it would last for about a |
| 675 |
year [<A HREF="http://supermount-ng.sourceforge.net/">supermount</A> |
| 676 |
would exhaust the "budget" way sooner]... Defect management |
| 677 |
[in firmware, a.k.a. <A |
| 678 |
HREF="http://www.licensing.philips.com/information/mtr/">Mt.Rainier</A>, |
| 679 |
or at file system level] would improve the situation, but ideally |
| 680 |
file system driver should definitely refrain from modifying the |
| 681 |
super-block [marking it dirty] if nothing was actually written since |
| 682 |
last mount. Given the development status of <A |
| 683 |
HREF="http://sourceforge.net/projects/linux-udf/">Linux UDF</A> the |
| 684 |
chances for seeing the latter implemented [for UDF] are more than just |
| 685 |
conceivable. The request is already filed and even possible solution is |
| 686 |
being discussed. But why not give UDF a shot already then? By default |
| 687 |
UDF write support is unfortunately disabled and you might have to |
| 688 |
reconfigure the kernel and rebuild modules. Alternatively [my preferred |
| 689 |
option actually] fetch the code at <A |
| 690 |
HREF="http://sourceforge.net/projects/linux-udf/">SourceForge</A> and |
| 691 |
build the module separately. Of course you will have to fetch and build |
| 692 |
udftools as well. But once it's done just type: |
| 693 |
|
| 694 |
<P><BLOCKQUOTE><PRE> |
| 695 |
mkudffs --spartable=2 --media-type=cdrw /dev/scd<FONT COLOR="red">N</FONT> |
| 696 |
mount -o rw,noatime /dev/scd<FONT COLOR="red">N</FONT> /mnt/cdrom |
| 697 |
</PRE></BLOCKQUOTE> |
| 698 |
|
| 699 |
<P ALIGN="JUSTIFY"><TT>mkudffs</TT> command line options were suggested |
| 700 |
by UDF maintainer, Ben Fennema. |
| 701 |
|
| 702 |
<P><LI><P ALIGN="JUSTIFY">Performance optimization. This paragraph |
| 703 |
applies only if you've patched the kernel. As some of you might |
| 704 |
remember the original recommendation was "do use <TT>obs=32k</TT> |
| 705 |
for optimal performance." Well, it was rather naive of me to say |
| 706 |
so, as common block device layer <I>completely</I> reorganizes the |
| 707 |
stream so that '<TT>>/dev/scd0</TT>' is as good as '<TT>|dd |
| 708 |
of=/dev/scd0 obs=32k</TT>'. It should also be noted that dumping to |
| 709 |
/dev/scd0 puts quite a pressure on VM subsystem, as the data passes |
| 710 |
through block buffer cache. To minimize the pressure and improve |
| 711 |
overall system performance bind the cdrom device to a raw device, e.g. |
| 712 |
'<TT>raw /dev/raw/raw1 /dev/scd0</TT>', growisofs will locate and use |
| 713 |
it automatically. obs=32k makes perfect sense with /dev/raw devices, |
| 714 |
but dd (as well as most other programs, e.g. tar) won't work as |
| 715 |
/dev/raw expects specifically aligned buffer... As <I>temporary</I> |
| 716 |
workaround, just to get you going so that you can start figuring things |
| 717 |
out, consider <A |
| 718 |
HREF="http://fy.chalmers.se/~appro/LD_*-gallery/index.html?aligned_io#aligned_io">this |
| 719 |
"hacklet"</A>... |
| 720 |
|
| 721 |
</UL> |
| 722 |
|
| 723 |
<A NAME="compat"><P><HR></A> |
| 724 |
|
| 725 |
<H3>Compatibility: caveat lector</H3> |
| 726 |
|
| 727 |
<P><HR WIDTH="50%" ALIGN="LEFT"> |
| 728 |
|
| 729 |
<P ALIGN="JUSTIFY">This paragraph discusses "DVD-ROM |
| 730 |
compatibility," or playability of already recorded media in legacy |
| 731 |
units. Blank media compatibility issues, or cases such as failure to |
| 732 |
start or fulfill recording because of poor media support by burner |
| 733 |
firmware, are beyond the current scope. Turn to your vendor for list of |
| 734 |
supported media and/or to the <A |
| 735 |
HREF="mailto:[email protected]">public</A> to share your |
| 736 |
experience. |
| 737 |
|
| 738 |
<P ALIGN="JUSTIFY">In order to optimize seek times DVD[-ROM] players |
| 739 |
calibrate their mechanics every time the media is loaded by sliding |
| 740 |
the optical head some place, picking up the signal and noting the |
| 741 |
physical block address underneath the lens. In order for this procedure |
| 742 |
to work with re-writable/recordable media, that particular spot has to |
| 743 |
be written to [or de-iced in DVD+RW terms]. Some units slide the head to |
| 744 |
30mm [radial] to calibrate, some to 35mm. In order to keep such players |
| 745 |
"happy," make sure that at least 1GB is written [before you |
| 746 |
attempt to mount it in <NOBR>DVD-ROM</NOBR> unit]. |
| 747 |
|
| 748 |
<P ALIGN="JUSTIFY">Other units attempt to seek to lead-out [or vicinity |
| 749 |
of it] for calibration purposes. Now the catch is that it's perfectly |
| 750 |
possible to produce a DVD+RW disc without lead-out. Most notably media |
| 751 |
initially formatted with <NOBR>dvd+rw-format</NOBR> [apparently] |
| 752 |
doesn't have any lead-out, not to mention that practically whole |
| 753 |
surface remains virgin. If you fail to mount/play DVD+RW media, attempt |
| 754 |
to |
| 755 |
|
| 756 |
<BLOCKQUOTE><PRE>dvd+rw-format -lead-out /dev/scd<FONT |
| 757 |
COLOR="red">N</FONT></PRE></BLOCKQUOTE> |
| 758 |
|
| 759 |
<P ALIGN="JUSTIFY">which relocates the lead-out next to outermost |
| 760 |
written sector as well as makes sure there is no virgin surface before |
| 761 |
it. Previously written data is <B>not</B> affected by this operation. |
| 762 |
<!-- "Should" is a reminder of the project status, |
| 763 |
"experience gathering." I mean the best I can do is to state |
| 764 |
that my hp dvd200i unit doesn't wipe any data when relocating the |
| 765 |
lead-out.--> |
| 766 |
|
| 767 |
<P ALIGN="JUSTIFY">Then non-finalized DVD+R and Sequential |
| 768 |
<NOBR>DVD-R[W]</NOBR> discs don't have lead-out either<SUP>(*)</SUP>. |
| 769 |
If you fail to mount/play DVD+R media and wish to sacrifice the |
| 770 |
remaining space for immediate compatibility, just fill the media |
| 771 |
up<SUP>(**)</SUP>. Alternatively if you master volume in a single take |
| 772 |
and don't plan to use it for multisessioning<SUP>(***)</SUP>, you have |
| 773 |
the option to invoke growisofs with <TT>-dvd-compat</TT> option and cut |
| 774 |
the real lead-out directly after the first session. |
| 775 |
|
| 776 |
<P> |
| 777 |
<TABLE BORDER="0" WIDTH="95%" ALIGN="CENTER"> |
| 778 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 779 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 780 |
<TD><FONT SIZE="-1">Well, there are lead-outs at the session edges, but |
| 781 |
the problem is that "End Physical Sector Number of Data Area" |
| 782 |
field in "Control Data Zone" of the lead-in contains address |
| 783 |
of the largest media sector, which makes affected DVD[-ROM] players |
| 784 |
calibrate at the outermost edge instead of the first session. Actually |
| 785 |
I fail to understand why don't they burn the address of last sector of |
| 786 |
the first session in the lead-in even on multisession discs... |
| 787 |
</FONT></TR> |
| 788 |
|
| 789 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 790 |
<TD><FONT SIZE="-1"><SUP>(**)</SUP></FONT> |
| 791 |
<TD><FONT SIZE="-1">But beware the <A HREF="#isofs4gb">4GB limit</A>! |
| 792 |
If 4GB is already an issue, or if you don't feel like throwing |
| 793 |
unrelated data on the media in question, then invoke '<TT>growisofs |
| 794 |
<FONT COLOR="red">-M</FONT> /dev/scd0<FONT |
| 795 |
COLOR="red">=/dev/zero</FONT></TT>' (supported by 5.6 and later). |
| 796 |
Alternative is to re-master the whole volume, naturally with |
| 797 |
<TT><NOBR>-dvd-compat</NOBR></TT> option. |
| 798 |
<!-- then the easiest way is to create couple of holey |
| 799 |
files with '<TT>touch huge<FONT COLOR="red">M</FONT>.void</TT>' and |
| 800 |
'<TT>perl -e 'truncate ("huge<FONT |
| 801 |
COLOR="red">M</FONT>.void", 0x7ffffffe)'</TT>', and finally to |
| 802 |
'<TT>growisofs -overburn -M /dev/scd<FONT COLOR="red">N</FONT> ... |
| 803 |
huge*.void</TT>'. Otherwise you might have to re-master the volume with |
| 804 |
<TT>-dvd-compat</TT> option.--></FONT></TR> |
| 805 |
|
| 806 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 807 |
<TD><FONT SIZE="-1"><SUP>(***)</SUP></FONT> |
| 808 |
<TD><FONT SIZE="-1">E.g. when mastering DVD-Video disc:-) Note that |
| •809 |
<TT>-dvd-video</TT> option [passed to genisoimage] engages |
| 810 |
<TT>-dvd-compat</TT> automatically.</FONT></TR> |
| 811 |
</TABLE> |
| 812 |
|
| 813 |
<A NAME="booktype"><P><HR WIDTH="50%" ALIGN="LEFT"></A> |
| 814 |
|
| 815 |
<P ALIGN="JUSTIFY">Then we have logical format compatibility |
| 816 |
issue(s). Probably the very ground for all the controversy around |
| 817 |
DVD+RW, rather around DVD+RW media not being playable in a whole range |
| 818 |
of players. DVD+RW Alliance was keen to blame on DVD-ROM vendors, even |
| 819 |
claiming that they deliberately block playback. But the fact is that |
| 820 |
format specifications don't explicitly say that unrecognized format |
| 821 |
[designated by "Book Type" field in "Control Data |
| 822 |
Zone" of the lead-in] should be treated as <NOBR>DVD-ROM</NOBR> |
| 823 |
and [in my opinion] it was rather naive of them to claim and expect |
| 824 |
that the media will be playable in "virtually all players." |
| 825 |
This deficiency was recognized by practically all DVD+RW vendors [well, |
| 826 |
apparently by "traditional" DVD+RW vendors and not |
| 827 |
"latest generation" vendors such as Sony, NEC, TDK...] and a |
| 828 |
<A HREF="tools/dvd+rw-booktype.cpp">secret</A> vendor-specific command |
| 829 |
manipulating this "Book Type" field was implemented. So if |
| 830 |
you fail to mount/play DVD+RW media, you <I>might</I> have an option to |
| 831 |
|
| 832 |
<BLOCKQUOTE><PRE>dvd+rw-booktype -dvd-rom -media /dev/scd<FONT |
| 833 |
COLOR="red">N</FONT></PRE></BLOCKQUOTE> |
| 834 |
|
| 835 |
<P ALIGN="JUSTIFY">Once again. <B>Not all vendors support this and you |
| 836 |
can't expect this utility to work with all recorders.</B> |
| 837 |
|
| 838 |
<P ALIGN="JUSTIFY">It's naturally not possible to manipulate the |
| 839 |
"Book Type" field on DVD+R media, that is not after the |
| 840 |
lead-in is written [which takes place at the moment the first session |
| 841 |
gets closed]. But it might be possible to control how it [lead-in] is |
| 842 |
going to be branded by programming the drive <I>in advance</I>: |
| 843 |
|
| 844 |
<BLOCKQUOTE><PRE>dvd+rw-booktype -dvd-rom -unit+r /dev/scd<FONT |
| 845 |
COLOR="red">N</FONT></PRE></BLOCKQUOTE> |
| 846 |
|
| 847 |
<P ALIGN="JUSTIFY">Meaning that if you fail to play DVD+R media, you |
| 848 |
can attempt to burn another disc with more appropriate unit settings. |
| 849 |
For more background information about dvd+rw-booktype, see <A |
| 850 |
HREF="http://www.dvdplusrw.org/Article.asp?aid=42&hl=bitsetting">"Compatibility |
| 851 |
Bitsettings" article at dvdplusrw.org</A>. |
| 852 |
|
| 853 |
<P ALIGN="JUSTIFY">There [potentially] are other logical |
| 854 |
DVD+RW<SUP>(*)</SUP> format incompatibilities, but the "Book |
| 855 |
Type" issue discussed above is the only one "officially" |
| 856 |
recognized. Well, it's actually understandable as it's the only one |
| 857 |
that can be recognized and addressed by a DVD+RW vendor alone. |
| 858 |
Recognition of other incompatibilities would require cooperation from |
| 859 |
<NOBR>DVD[-ROM]</NOBR> player vendors and that's something they |
| 860 |
apparently are not willing to show referring to the fact that DVD+RW |
| 861 |
format is not approved [and apparently never will be] by <A |
| 862 |
HREF="http://www.dvdforum.org/">DVD Forum</A><SUP>(**)</SUP>. |
| 863 |
|
| 864 |
<P> |
| 865 |
<TABLE BORDER="0" WIDTH="95%" ALIGN="CENTER"> |
| 866 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 867 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 868 |
<TD><FONT SIZE="-1">Finalized DVD+R media branded with |
| 869 |
<NOBR>DVD-ROM</NOBR> "Book Type" is virtually identical to |
| 870 |
<NOBR>DVD-ROM.</NOBR></FONT></TR> |
| 871 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 872 |
<TD><FONT SIZE="-1"><SUP>(**)</SUP></FONT> |
| 873 |
<TD><FONT SIZE="-1">To which I say "so what?" DVD Forum is an |
| 874 |
alliance of manufacturers just like DVD+RW Alliance is. It [or any |
| 875 |
other party for that matter] has no authority to deny a technology |
| 876 |
development initiative.</FONT></TR> |
| 877 |
</TABLE> |
| 878 |
|
| 879 |
<P><HR WIDTH="50%" ALIGN="LEFT"> |
| 880 |
|
| 881 |
<P ALIGN="JUSTIFY">Finally there is a physical incompatibility issue. |
| 882 |
They claim that there are optical pick-ups out there not being capable |
| 883 |
to decode the track because of low reflectivity of DVD+RW media |
| 884 |
surface. I write "they claim," because in the lack of |
| 885 |
cooperation from <NOBR>DVD[-ROM]</NOBR> vendors it's not possible to |
| 886 |
distinguish physical from logical format incompatibility, which I find |
| 887 |
important to tell apart in order to make sure at least logical format |
| 888 |
incompatibility issues don't persist over time. It might be as trivial |
| 889 |
as following. As you surely know [already], DVD+RW has same |
| 890 |
reflectivity as dual-layer <NOBR>DVD-ROM.</NOBR> Now the catch is that |
| 891 |
the linear pit density in turn is same as of single-layer one. Meaning |
| 892 |
that if player makes assumptions about linear pit density based on |
| 893 |
reflectivity, then it won't be able to trace the track... But either |
| 894 |
way, there is very little you can do about this one, but to try another |
| 895 |
player... |
| 896 |
|
| 897 |
<P><HR> |
| 898 |
|
| 899 |
<H3>Technical Ramblings</H3> |
| 900 |
|
| 901 |
<P><HR WIDTH="50%" ALIGN="LEFT"> |
| 902 |
|
| 903 |
<A NAME="isofs4gb"><P><IMG SRC="isofs4gb.gif" WIDTH=144 HEIGHT=315 |
| 904 |
ALIGN="RIGHT"></A> |
| 905 |
|
| 906 |
<P ALIGN="JUSTIFY"><B>As for multisession ISO9660 [DVD] |
| 907 |
recordings!</B> Unfortunately, Linux ISOFS implementation had certain |
| 908 |
deficiency which limits interoperability of such recordings. In order |
| 909 |
to understand it, have a look at sample ISO9660 layout to the right... |
| 910 |
Now, the problem is that isofs i-nodes<SUP>(*)</SUP> are 32 bits wide |
| 911 |
(on a 32-bit Linux) and represent offsets of corresponding directory |
| 912 |
entries (light-greens), byte offsets from the beginning of media. This |
| 913 |
means that no directory (green areas) may cross 4GB boundary without |
| 914 |
being effectively corrupted<TT>:-(</TT> It should be noted that in |
| •915 |
reality it's a bit better than it looks on the picture, as genisoimage |
| 916 |
collects all the directories in the beginning of any particular session |
| 917 |
(there normally are no blues between greens). The <I>first</I> session |
| 918 |
is therefore never subject to i-node wrap-around, but not the |
| 919 |
<I>subsequent</I> ones! Once again, <FONT COLOR="blue">files</FONT> |
| 920 |
themselves may reside beyond the <FONT COLOR="brown">4GB</FONT> |
| 921 |
boundary, but not <FONT COLOR="green">the directories</FONT>, in |
| 922 |
particular not in further sessions. Having noted that directory entries |
| 923 |
are actually <I>specified</I> to start at even offsets, I figured that |
| 924 |
it's <A HREF="isofs-2.4.patch">perfectly possible</A> to |
| 925 |
"stretch" the limit to 8GB. But in order to <I>assure |
| 926 |
maximum interoperability,</I> you should <B>not let any session |
| 927 |
<I>start</I> past 4GB minus space required for directory |
| 928 |
structures</B>, e.g. if the last session is to fill the media up, it |
| 929 |
has to be >400MB. As of version 5.3 growisofs refuses to <I>append</I> |
| 930 |
a new session beyond 4GB-40MB limit<SUP>(**)</SUP>, where 40MB is |
| 931 |
pretty much arbitrary chosen large value, large for directory catalogs |
| 932 |
that is. Yet it doesn't actually <I>guarantee</I> that you can't suffer |
| 933 |
from i-node wrap-around. Interim <A HREF="isofs-2.4.patch">fs/isofs 2.4 |
| 934 |
kernel patch</A> was addressed to those who have actually ran into the |
| 935 |
problem and have to salvage the data. Even though permanent solution |
| 936 |
for this problem appears in Linux kernel 2.6.8 (thanks to Paul Serice |
| 937 |
effort), growisofs keeps checking for this 4GB limit in order to ensure |
| 938 |
broader compatibility of final DVD recordings. This check is not |
| 939 |
performed for Blu-ray Disc recordings, as probability that a member of |
| 940 |
such user community would run something elder than 2.6.9 is considered |
| 941 |
diminishingly low. |
| 942 |
|
| 943 |
<TABLE BORDER="0" WIDTH="95%" ALIGN="CENTER"> |
| 944 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 945 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 946 |
<TD><FONT SIZE="-1">i-node is a number uniquely identifying a single |
| 947 |
file in a file system</FONT> |
| 948 |
</TR> |
| 949 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 950 |
<TD><FONT SIZE="-1"><SUP>(**)</SUP></FONT> |
| 951 |
<TD><FONT SIZE="-1">well, as DVD+R Double Layer support was introduced |
| 952 |
in 5.20, <TT>-use-the-force-luke=4gms</TT> option was added to override |
| 953 |
this behaviour (naturally recommended for Linux kernel 2.6>=8 users and |
| 954 |
kernel developers only;-)</FONT> |
| 955 |
</TR> |
| 956 |
</TABLE> |
| 957 |
|
| 958 |
<P><BR> |
| 959 |
|
| 960 |
<P ALIGN="JUSTIFY"><B>Why media reload is performed after every |
| 961 |
recording with growisofs?</B> Well, it's performed only if you didn't |
| 962 |
patch the kernel:-) But no, I do not insist on patching the kernel! |
| 963 |
All I'm saying is that in the lack of kernel support, media reload is |
| 964 |
performed for the following reasons. In order to optimize file access |
| 965 |
kernel maintains so called block cache, so that repetitive requests for |
| 966 |
same data are met directly from memory and don't result in multiple |
| 967 |
physical I/O. Now the catch is that block cache layer remains totally |
| 968 |
unaware of growisofs activities, growisofs <I>bypasses</I> the block |
| 969 |
cache. This means that block cache inevitably becomes out of sync, |
| 970 |
which in turn might appear to you as corrupted data. Media reload is |
| 971 |
performed when flushing the block cache is not an option, e.g. only |
| 972 |
privileged user is allowed to perform it. Second reason is to force |
| 973 |
kernel to readjust last addressable block in case it was changed as |
| 974 |
result of recording. This is done to preclude spurious "attempts to |
| 975 |
access beyond end of device." |
| 976 |
|
| 977 |
<P><BR> |
| 978 |
|
| 979 |
<P ALIGN="JUSTIFY"><B>What does [kernel] "DVD+RW support" |
| 980 |
<I>really</I> mean?</B> Even though DVD+RW has no notion of [multiple] |
| 981 |
sessions, to ensure compatibility with DVD-ROM it's essential to issue |
| 982 |
"CLOSE TRACK/SESSION (5Bh)" <A |
| 983 |
HREF="http://www.t10.org/scsi-3.htm">MMC</A> command to |
| 984 |
terminate/suspend background formatting (if any in progress) whenever |
| 985 |
you intend to eject the media or simply stop writing and want better |
| 986 |
read performance (e.g. remount file system read-only). This is what the |
| 987 |
patch is basically about: noting when/if media was written to and |
| 988 |
"finalizing" at unlock door. |
| 989 |
|
| 990 |
<P ALIGN="JUSTIFY"><B>Secondly</B>, whenever you employ fully fledged |
| 991 |
file system, I/O requests get inevitably fragmented. |
| 992 |
"Fragmented" means following. Even though you can address the |
| 993 |
data with 2KB granularity, it [data] is physically laid out in 32KB |
| 994 |
chunks. This in turn means that for example writing of 2KB block |
| 995 |
involves reading of 32KB chunk, replacing corresponding 2KB and writing |
| 996 |
down of modified 32KB chunk. "Fragmented requests" are those |
| 997 |
that are smaller than 32KB or/and cross the modulus 32KB boundaries. In |
| 998 |
order to optimize the process certain caching algorithm is implemented |
| 999 |
in unit's firmware. Obviously it can't adequately meet all possible |
| 1000 |
situations. And so in such unfortunate situations the drive apparently |
| 1001 |
stops processing I/O requests returning "COMMAND SEQUENCE ERROR |
| 1002 |
(2Ch)" ASC. This is the second essential of "DVD+RW |
| 1003 |
support," namely injecting of "SYNCHRONIZE CACHE (35h)" |
| 1004 |
MMC command in reply to the error condition in question. The command |
| 1005 |
flushes the cached buffers which makes it possible to resume the data |
| 1006 |
flow. |
| 1007 |
|
| 1008 |
<P ALIGN="JUSTIFY"><B>Unfortunately</B> the above paragraph doesn't |
| 1009 |
seem to apply to the 1st generation drives, Ricoh MP5120A and |
| 1010 |
derivatives<TT>:-(</TT> "SYNCHRONIZE CACHE (35h)" doesn't |
| 1011 |
seem to be sufficient and the unit keeps replying with "COMMAND |
| 1012 |
SEQUENCE ERROR (2Ch)" going into end-less loop. This makes it |
| 1013 |
impossible to deploy arbitrary file system. I'm open for |
| 1014 |
suggestions... Meanwhile the I've chosen to simply suspend I/O till the |
| 1015 |
media is unmounted. Even 2nd gen unit were reported to exhibit similar |
| 1016 |
[but not the same] behaviour under apparently extremely rare |
| 1017 |
circumstances. At least I failed to reproduce the problem... The problem |
| 1018 |
reportedly disappears with firmware upgrade... |
| 1019 |
|
| 1020 |
<P ALIGN="JUSTIFY"><B>Then</B> some [most?] of post-2nd gen units, from |
| 1021 |
most vendors, seem to not bother about complying with |
| 1022 |
<NOBR>DVD+RW</NOBR> specification, "true random write with 2KB |
| 1023 |
granularity" part in particular. Instead they apparently expect |
| 1024 |
host to apply procedure pretty much equivalent to <NOBR>DVD-RW</NOBR> |
| 1025 |
Restricted Overwrite. To be more specific host seems to be expected to |
| 1026 |
coalesce 2KB requests and perform aligned writes at native DVD ECC |
| 1027 |
blocksize, which is 32KB. Formally this should not be required, but |
| 1028 |
it's the reality of marketplace:-( |
| 1029 |
|
| 1030 |
<P ALIGN="JUSTIFY">This one really beats me. Sometimes the unit |
| 1031 |
simply stops writing signaling a vendor specific positioning error, |
| 1032 |
03h/15h/82h to be specific. Especially if the media is newly formatted. |
| 1033 |
Couple of work theories. One is that block buffer cache reorders |
| 1034 |
requests so that they are not sequential anymore, "FLUSH |
| 1035 |
CACHE" might do the trick. Another one is that under |
| 1036 |
"underrun" condition background formatting kicks off and has |
| 1037 |
to be explicitly stopped. "Underrun" is in quotes because |
| 1038 |
the unit is supposed to handle temporary data stream outages |
| 1039 |
gracefully. If you run into this (you most likely will), try to |
| 1040 |
complement growisofs command line with [undocumented] |
| 1041 |
<TT>-poor-man</TT> option (which has to be first in the command line). |
| 1042 |
This option eliminates request reorders and minimizes possibility for |
| 1043 |
"underrun" condition (by releasing the pressure off VM |
| 1044 |
subsystem). |
| 1045 |
|
| 1046 |
<P><BR> |
| 1047 |
|
| 1048 |
<P ALIGN="JUSTIFY">The original idea was to implement DVD+RW support in |
| 1049 |
drivers/cdrom/cdrom.c. Unfortunately SCSI layer maintains private |
| 1050 |
"writeable" flag controlling the ability to issue WRITE |
| 1051 |
commands. The flag is impossible to reach for from the Unified CD-ROM |
| 1052 |
driver. But why am I talking about SCSI when there are only IDE units |
| 1053 |
out there (at least for the time being)? Well, as you most likely want |
| 1054 |
to occasionally burn even CD-R[W] with cdrecord you want it to go |
| 1055 |
through ide-scsi emulation layer anyway. So I figured that SCSI CD-ROM |
| 1056 |
driver is the one to aim for even for DVD+RW. |
| 1057 |
|
| 1058 |
<P ALIGN="JUSTIFY">Unfortunately it was not possible to implement it |
| 1059 |
completely in sr_mod.o<TT>:-(</TT> Minor drivers/cdrom/cdrom.c |
| 1060 |
modification was required to sense the media before decision about |
| 1061 |
whether or not to permit write open. That's because DVD+RW drives are |
| 1062 |
morphing their behaviour after currently mounted media and it's |
| 1063 |
essential to identify newly inserted media. |
| 1064 |
|
| 1065 |
<P ALIGN="JUSTIFY">Special comment about "what a dirty |
| 1066 |
hack!!!" To my great surprise it turned out that time-out value you |
| 1067 |
pass in cdrom_generic_command is simply ignored and time-out is set to |
| 1068 |
pre-compiled value of 30 seconds. Unfortunately it's way too low for |
| 1069 |
formatting purposes and I had to do something about it. Alternative to |
| 1070 |
"the dirty hack" was to add another argument to sr_do_ioctl |
| 1071 |
and modify all the calls to it... I've chosen to take over those 31 |
| 1072 |
unused bits from the "quiet" argument instead of modifying |
| 1073 |
all the calls (too boring). |
| 1074 |
|
| 1075 |
<P ALIGN="JUSTIFY">But even if time-out value passed down to kernel |
| 1076 |
(with <I>either</I> CDROM_SEND_PACKET or SG_IO ioctl) is taken into |
| 1077 |
consideration, it's apparently not interpreted as user-land code |
| 1078 |
expects it to. As I figured... There is no documentation on |
| 1079 |
CDROM_SEND_PACKET, but following the common sense most programmers |
| 1080 |
(including myself:-) expect it to be interpreted in at least |
| 1081 |
platform-independent manner, such as milliseconds maybe? SG_IO timeout |
| 1082 |
in turn is <A |
| 1083 |
HREF="http://www.torque.net/sg/p/sg_v3_ho.html#AEN215"><I>documented</I></A> |
| 1084 |
to be measured in milliseconds... Neither of this holds true! Kernel |
| 1085 |
treats these values as "jiffies," which is a |
| 1086 |
<B>platform-dependent</B> value representing time elapsed between timer |
| 1087 |
interrupts. But if we attempt to send down "jiffies," it |
| 1088 |
might turn out wrong too [at least for the moment of this writing]. The |
| 1089 |
catch is that [IA-32] kernel developers figured it's cool to shorten |
| 1090 |
"jiffy," but didn't care to provide user-land with actual |
| 1091 |
value (well, not of actual interest, too much legacy code to deal with) |
| 1092 |
<I>nor</I> <A HREF="scsi_ioctl-2.5.69.patch">scale</A> timeouts |
| 1093 |
accordingly in respect to the legacy value of 10ms. |
| 1094 |
|
| 1095 |
<P ALIGN="JUSTIFY">There is another kernel "deficiency" I ran |
| 1096 |
into while working on the (original version of) dvd+rw-format utility. |
| 1097 |
The drive provides background formatting progress status, but |
| 1098 |
unfortunately it's impossible to access it. That's because progress |
| 1099 |
counter is returned [in reply to "TEST UNIT READY"] as |
| 1100 |
"NO SENSE/LOGICAL UNIT NOT READY/FORMAT IN PROGRESS" sense |
| 1101 |
bytes but with "GOOD" status. Apparently any sense data with |
| 1102 |
"GOOD" status is discarded by the common SCSI layer. |
| 1103 |
|
| 1104 |
<!-- |
| 1105 |
<P ALIGN="JUSTIFY">As you might have noticed the time-out value for |
| 1106 |
"CLOSE SESSION" is 3000 seconds. Does it really take that |
| 1107 |
long? It might... Disappointed? Don't be! It might happen <I>only</I> |
| 1108 |
when <I>reformatting</I> used media. Formatting of the <I>blank</I> |
| 1109 |
media doesn't take longer than a couple of minutes. <I>Reformatting</I> |
| 1110 |
in turn takes as long as it takes to nullify whatever you had on the |
| 1111 |
media which requires corresponding time-outs. But do you <I>have to</I> |
| 1112 |
reformat? Well, only if media contains sensitive data, the new data set |
| 1113 |
is smaller than the current one and (for some reason) will be easier |
| 1114 |
for potentially rival party to get hold of it (in other words when |
| 1115 |
there is a risk for sensitive data to get exposed). Another reason is |
| 1116 |
when you want to reuse the media as a master copy for DVD-ROM |
| 1117 |
manufacturing and want formatted capacity to reflect data set size. |
| 1118 |
Otherwise there is <I>no</I> reason to reformat and as long as you |
| 1119 |
don't you won't be disappointed with how long does it take to |
| 1120 |
"finalize" the media. |
| 1121 |
--> |
| 1122 |
|
| 1123 |
<P ALIGN="JUSTIFY">It was pointed out to me that DVD+RW units work with |
| 1124 |
<A HREF="http://www.acard.com/">Acard</A> SCSI to IDE bridges. |
| 1125 |
|
| 1126 |
<A NAME="plusvsminus"><P><HR WIDTH="50%" ALIGN="LEFT"></A> |
| 1127 |
|
| 1128 |
<P ALIGN="JUSTIFY"><B>What does <A |
| 1129 |
HREF="http://www.cdfreaks.com/article/113"><I>plus</I></A> in DVD+RW/+R |
| 1130 |
stand for?</B> Originally this paragraph started as following: |
| 1131 |
|
| 1132 |
<BLOCKQUOTE><P ALIGN="JUSTIFY">The key feature of DVD+RW/+R media is |
| 1133 |
high [spatial] frequency wobbled [pre-]groove with addressing |
| 1134 |
information modulated into it. This makes it possible to resume |
| 1135 |
interrupted [or deliberately suspended] burning process with accuracy |
| 1136 |
high enough for DVD[-ROM] player not to "notice" anything at |
| 1137 |
playback time. Recovery from buffer underrun condition in DVD-RW/-R |
| 1138 |
case in turn is way less accurate procedure, and the problem is that |
| 1139 |
the provided accuracy is very much what average player can tolerate. |
| 1140 |
Now given that both provided and tolerated inaccuracies are |
| 1141 |
proportional to respectively writing and reading velocities there |
| 1142 |
basically no guarantee that DVD-RW/-R recording that suffered from |
| 1143 |
buffer underrun will be <I>universally</I> playable.</BLOCKQUOTE> |
| 1144 |
|
| 1145 |
<P ALIGN="JUSTIFY">Well, it turned out that I was wrong about one |
| 1146 |
thing. <!--About projecting CD-R[W] buffer underrun recovery procedure |
| 1147 |
to DVD-R[W] to be specific.--> I failed to recognize that DVD-R[W] |
| 1148 |
groove also provides for <I>adequately</I> accurate recovery from |
| 1149 |
buffer underrun condition/lossless linking. Not as accurate as DVD+RW, |
| 1150 |
but accurate enough for splices to be playable in virtually any |
| 1151 |
DVD-ROM/-Video unit. Yet! When it comes to DVD-R[W] recording |
| 1152 |
specificaton apparently insists that you choose between |
| 1153 |
|
| 1154 |
<UL> |
| 1155 |
<LI>buffer underrun protection and |
| 1156 |
<LI>full DVD-ROM/-Video compatibility. |
| 1157 |
</UL> |
| 1158 |
|
| 1159 |
<P ALIGN="JUSTIFY">The specification asserts that the latter is |
| 1160 |
achieved only in Disc-at-once recording mode and only if data-stream |
| 1161 |
was maintained uninterrupted throughout whole recording. Once again. |
| 1162 |
Even though most vendors implement lossless linking in DAO |
| 1163 |
mode<SUP>(*)</SUP>, <I>full</I> DVD-ROM/-Video compatibility is |
| 1164 |
guaranteed only if recording didn't suffer from buffer underruns. The |
| 1165 |
problem is that "offended" sectors are denoted with certain |
| 1166 |
linking chunk appearing as degraded <I>user data</I>, few bytes, which |
| 1167 |
are supposed to be "corrected away" by ECC |
| 1168 |
procedure<SUP>(**)</SUP>. DVD+ splices are in turn only few bits large |
| 1169 |
and are "accounted" to sync patterns, <I>not to user data |
| 1170 |
area</I>. So that even if suffered from buffer underrun, DVD+ sector is |
| 1171 |
logically indistiguishable from DVD-ROM. Which is why it's commonly |
| 1172 |
referred to that DVD+RW/+R combine DVD-ROM/-Video compatibility with |
| 1173 |
[unconditional] buffer underrun protection. |
| 1174 |
|
| 1175 |
<P ALIGN="JUSTIFY">As already mentioned, DVD+ groove has |
| 1176 |
"addressing information modulated into it," ADIP (ADress In |
| 1177 |
Pre-groove). This gives you an advantage of writing DVD+RW in truly |
| 1178 |
arbitrary order, even to virgin surface and practically instantly |
| 1179 |
(after ~40 seconds long initial format procedure). In addition, DVD+RW |
| 1180 |
can be conveniently written to with 2KB granularity<SUP>(***)</SUP>. |
| 1181 |
DVD-RW in turn can only be <I>overwritten</I> in arbitrary order. |
| 1182 |
Meaning that it either has to be completely formatted first (it takes |
| 1183 |
an hour to format 1x media), or initially written to in a sequential |
| 1184 |
manner. And it should also be noted that block overwrite is |
| 1185 |
<I>never</I> an option if DVD-RW media was recorded in [compatible] |
| 1186 |
Disc-at-once or even Incremental mode, only whole disc blanking is. |
| 1187 |
|
| 1188 |
<P ALIGN="JUSTIFY">Unlike DVD-R[W], DVD+R[W] recordings can be |
| 1189 |
suspended at any time without any side effects. Consider following |
| 1190 |
scenario. You have a lot of data coming in [at lower rate], which is to |
| 1191 |
be recorded into one file. Meanwhile it turns out that you have to |
| 1192 |
retrieve previously recorded data. This would naturally require |
| 1193 |
suspention of recording. Most notably in DVD-R [and naturally DVD-RW |
| 1194 |
Sequential] case it would result in a hole in the file being recorded. |
| 1195 |
So called linking area, most commonly 32KB gap, has to be introduced. |
| 1196 |
So that you either have to wait till the file is complete or figure out |
| 1197 |
how to deal with holey files. Thanks to ADIP, DVD+R recording is |
| 1198 |
resumed from the very point it was suspended at. In DVD-RW Restricted |
| 1199 |
Overwrite case no gaps are introduced, but if the media was formatted |
| 1200 |
only minimally, suspension/resuming procedure has to be applied and it |
| 1201 |
takes ~40 seconds to perform one. In DVD+RW case, suspension/resuming |
| 1202 |
is instant regardless media state. |
| 1203 |
|
| 1204 |
<P ALIGN="JUSTIFY">What does all of the above mean in practice? Well, I |
| 1205 |
was actually hoping that readers would [be able to] figure it out by |
| 1206 |
themselves. Apparently a couple of "guiding" words are |
| 1207 |
needed... It means that it's trivial to employ DVD+RW for housing of |
| 1208 |
live and arbitrary file system, no special modifications to target file |
| 1209 |
system driver are required... Real-time VBR (Variable Bit Rate) Video |
| 1210 |
recordings are children's game... |
| 1211 |
|
| 1212 |
<P ALIGN="JUSTIFY">Sometimes DVD+RW/+R recording strategy is referred |
| 1213 |
to as packet writing. I myself am reluctant to call it so (or |
| 1214 |
TAO/SAO/DAO) for the following reason. Despite the fact that DVD-R[W] |
| 1215 |
provides for lossless linking (within a packet/extent only), |
| 1216 |
packets/extents are still denoted with certain linking information |
| 1217 |
which distinguishes it (recording mode in question) from e.g. |
| 1218 |
Disc-at-once. Now the point is that written DVD+RW/+R media, rather its |
| 1219 |
Data Zone, does not contain <I>any</I> linking information and is |
| 1220 |
logically indistinguishable from one written in DVD-R[W] Disc-at-once |
| 1221 |
mode (or DVD-ROM for that matter). |
| 1222 |
|
| 1223 |
<P ALIGN="JUSTIFY">It's maintained that signal from DVD+ groove (the |
| 1224 |
one essential for recording, not reading) is much stronger, which makes |
| 1225 |
it quite resistant to dust, scratches, etc. |
| 1226 |
|
| 1227 |
<P ALIGN="JUSTIFY">Now we can also discuss differences between |
| 1228 |
Double/Dual Layer implementations. DVD+R Double Layer permits for |
| 1229 |
arbitrary layer break positioning yet maintaining <I>contiguous logical |
| 1230 |
block addressing</I>. In other words address of the block following the |
| 1231 |
break is always address of the block preceding one plus 1, even for |
| 1232 |
arbitrarily positioned break. <NOBR>DVD-R</NOBR> Dual Layer on the |
| 1233 |
other hand implies unconditionally disjoint logical block addressing |
| 1234 |
[for arbitrarily positioned layer break that is]. This is because block |
| 1235 |
addresses as recorded by unit are pre-defined by <NOBR>DVD-dash</NOBR> |
| 1236 |
groove structure. In practice it means that file system layout has to |
| 1237 |
effectively have a hole, which "covers" twice the space between chosen |
| 1238 |
layer break position and outermost edge of the recordable area. And in |
| 1239 |
even more practical terms this means that mastering programs have to be |
| 1240 |
explicitly adapted for <NOBR>DVD-R</NOBR> layer break positioning. |
| 1241 |
Unlike DVD+plus that is. |
| 1242 |
|
| 1243 |
<P> |
| 1244 |
<TABLE BORDER="0" WIDTH="95%" ALIGN="CENTER"> |
| 1245 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 1246 |
<TD><FONT SIZE="-1"><SUP>(*)</SUP></FONT> |
| 1247 |
<TD><FONT SIZE="-1">According to <A |
| 1248 |
HREF="ftp://ftp.avc-pioneer.com/Mtfuji_6/Spec/">Mt. Fuji draft</A> |
| 1249 |
buffer underrun protection is not even an option in DVD-R DAO: "If a |
| 1250 |
buffer under-run occurs, the logical unit <B><I>shall</I></B> stop |
| 1251 |
writing immediately and the logical unit <B><I>shall</I></B> start |
| 1252 |
writing of Lead-out." Protection is defined in Incremental Sequential |
| 1253 |
mode and DVD-RW context. By the way, note that earlier versions of this |
| 1254 |
draft also discuss DVD+RW. You should be aware that they refer to |
| 1255 |
abandoned version which has very little to do with DVD+RW/+R |
| 1256 |
implementation being discussed here.</FONT></TR> |
| 1257 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 1258 |
<TD><FONT SIZE="-1"><SUP>(**)</SUP></FONT> |
| 1259 |
<TD><FONT SIZE="-1">ECC redundancy does permit for more degradation, |
| 1260 |
more that this linking chunk that is, so that it hadly affects the |
| 1261 |
playability.</FONT></TR> |
| 1262 |
<TR VALIGN="TOP" ALIGN="JUSTIFY"> |
| 1263 |
<TD><FONT SIZE="-1"><SUP>(***)</SUP></FONT> |
| 1264 |
<TD><FONT SIZE="-1">DVD "native" block size is 32KB, and 2KB |
| 1265 |
granularity is nothing but a trick, but you're excused from playing it, |
| 1266 |
i.e. reading 32KB, replacing corresponding 2KB and writing 32KB |
| 1267 |
back.</FONT></TR> |
| 1268 |
</TABLE> |
| 1269 |
|
| 1270 |
<P><HR> |
| 1271 |
|
| 1272 |
<SPACER TYPE="block" WIDTH="100%" HEIGHT="100%"> |
| 1273 |
|
| 1274 |
</BODY> |
| 1275 |
</HTML> |