Hi,

thanks for all your corrections and suggestions. I enhanced the man page and added you into footer as "consultant" if you don't mind.
Attaching the enhanced version.

Cheers,
Honza

On 08/22/2012 05:15 PM, Thomas Schmitt wrote:
Hi,

not being in charge for dvd+rw-tools i am curious enough to read
and comment on the proposed man page.

Honza Horak wrote:
If  a  DVD-RW medium is in the later one,

Shouldn't that be "latter" rather than "later" here ?


a non-virgin DVD-RW in Sequential Recording
mode needs to be blanked before writing a new initial session

One should stress that only -blank=full makes a used sequential DVD-RW
capable of performing multi-session. Fast blanked DVD-RW can only do
Disk-At-Once. (Some drives confess the inability, some do not. None can.)

Full blanking lasts as long as full writing.
So formatting DVD-RW is very desirable for multi-session use cases.


Virgin BD and DVD+RW media  need  to  be  initally  formatted  prior
usage.

"initially" rather than "initally".

One should replace "need" by something like "may".

DVD+RW get formatted by growisofs as needed when a burn run is desired.
(I once tested that when i had no own stake in operating optical drives.)

BD-R media may get formatted when they are still empty.
I understand growisofs 7.1 does this automatically and unconditionally
when a burn run is desired. (This is not always a good idea, though.)
growisofs_mmc.cpp:
         case 0x41:      // BD-R SRM
             if ((disc_info[2]&3) == 0)  // blank
                 bd_r_format (cmd);

I also understand that BD-RE get formatted automatically:
         case 0x43:      // BR-RE
             if ((disc_info[2]&3) == 0)  // blank
                 bd_re_format (cmd);

I think the main use cases for dvd+rw-format are:
- Formatting DVD-RW to make them overwritable
- Blanking used DVD-RW to make them sequentially writable from scratch
- Formatting BD-R, BD-RE, and DVD-RAM with custom spare area sizes
- Re-Formatting BD-RE and DVD-RAM to change their spare size


Use -blank=full to change

This sentence looks incomplete.


Under Linux it will most likely be an ide-scsi device  such as "/dev/scd0."

Cough. ide-scsi is dead since kernel 2.6 came out.
Further it seems that "sr0" has finally won the battle against "scd0".

Maybe one should mention /dev/hda for older Linux 2.6 with IDE/ATAPI
and /dev/sr0 for newer Linux or SATA or USB. (Have there ever been
DVD drives with SCSI bus interface ?)

Overview of drives with suffienct access permissions:
   xorriso -devices
or
   cdrskin --devices


        To blank a CD-RW, you have to use another utility, e.g. wodim:
wodim blank=all -immed dev=/dev/cdrom

Blanking CD-RW in "all" mode lasts long and is not necessary for the
purpose of re-usability. It might serve privacy and it might revive
media which were spoiled by a bad drive.
Normally one uses "fast".

I could offer
   xorriso -outdev /dev/cdrom -blank all|fast|as_needed
or
   cdrskin blank=all|fast|as_needed -immed dev=/dev/cdrom

"as_needed" is a wizzard-ish mode which decides by itself what must
be done to get a medium which can be written from scratch.


        To blank a BD or DVD+RW, run:

One should mention that this is not blanking but simply overwriting
old data to make them (nearly) unreadable.

(The command also applies to formatted DVD-RW and to DVD-RAM.)


Now i am curious whether Andy Polyakov is still around.


Have a nice day :)

Thomas



diff -up dvd+rw-tools-7.1/dvd+rw-format.1.format dvd+rw-tools-7.1/dvd+rw-format.1
--- dvd+rw-tools-7.1/dvd+rw-format.1.format	2012-08-23 17:28:25.536770452 +0200
+++ dvd+rw-tools-7.1/dvd+rw-format.1	2012-08-23 17:30:14.043767054 +0200
@@ -0,0 +1,122 @@
+.TH DVD+RW\-FORMAT 1 "21 Aug 2012" "dvd+rw\-tools 7.1"
+.SH NAME
+dvd+rw\-format \- formatting and blanking DVD and BD media program.
+.SH SYNOPSIS
+.B dvd+rw\-format
+[\fB\-force\fP[\fB\=full\fP]]
+[\fB\-lead\-out|\-blank\fP[\fB\=full\fP]]
+[\fB\-ssa\fP[\fB\=none|default|max|XXXm\fP]]
+.I /dev/dvd
+
+.SH DESCRIPTION
+\fBdvd+rw\-format\fP is a part of \fBdvd+rw\-tools\fP suite and allows to
+format virgin DVD+RW or BD media for the first use or blank already
+written DVD\-RW, DVD+RW and DVD\-RAM media. 
+Typical use cases of using \fBdvd+rw\-format\fP is formatting DVD\-RW to
+make them overwritable, blanking used DVD\-RW to make them sequentially
+writable from scratch, formatting BD\-R, BD\-RE and DVD\-RAM with custom
+spare area sizes or re-formatting BD\-RE and DVD\-RAM to change their spare
+size.
+It is not possible to format CD\-RW by \fBdvd+rw\-format\fP,
+you can use \fBcdrskin\fP, \fBxorriso\fP or \fBwodim\fP utility instead,
+see section \fBEXAMPLES\fP.
+
+A DVD\-RW accepts two disc modes: the \fISequential Recording\fP
+and the \fIRestricted Overwrite\fP. If a DVD\-RW medium is in the latter one,
+it will behave much like DVD+RW.
+By default DVD\-RW discs are in Sequential Recording mode, but
+can be put into Restricted Overwrite mode using \fBdvd+rw\-format\fP
+when no options given.
+Be aware, that only \-blank=full, which lasts as long as full writing,
+makes a used sequential DVD\-RW capable of performing multi\-session,
+while fast blanked DVD\-RW can only do Disk-At-Once.
+
+Virgin DVD\-RW can be directly written without
+the need of a formatting operation, however a non-virgin DVD\-RW in
+Sequential Recording mode needs to be blanked before writing a new
+initial session. Since a DVD\-RW medium in the Restricted Overwrite
+mode behaves much like DVD+RW, it  can be written again without prior
+formatting the media.
+
+Virgin BD and DVD+RW media may be initially formatted prior
+usage. Any-time later, \fBgrowisofs\fP program will take care of formatting
+it automatically whenever appropriate, while further formatting is not
+recommended, however it is possible.
+
+.SH OPTIONS
+.TP
+.BI \-force[\=full]
+Perform formatting even if the medium is formatted already. This is not
+recommended for BD and DVD+RW media, since they need to be
+formatted only once. Use \fB\-format=full\fP to perform full (lengthy)
+reformat in case of DVD\-RAM or (lengthy) Full Certification in case of
+BD\-RE.
+.TP
+.BI \-lead\-out
+Relocates the lead-out next to outermost written sector as well as makes
+sure there is no virgin surface before it. This can make the medium more
+compatible with some DVD players. Previously written data is not
+affected by this operation. 
+.TP
+.BI \-blank[\=full]
+Wipe data from DVD\-RW media. Blanking is used automatically in case of
+BD and DVD+RW media. Use \fB\-blank\=full\fP to change
+DVD\-RW back to Sequential Recording mode.
+.TP
+.BI \-ssa[\=none|default|max|XXXm]
+Grow, eliminate, reset to default or maximize \fISupplementary Spare Area\fP.
+
+.SH EXAMPLES
+Actual device names vary from one operating system to another. We use
+\fI/dev/dvd\fP as a collective name or as symbolic link to the actual
+device if you wish. Under Linux it will most likely be a
+device such as "/dev/sr0" or "/dev/hda" for older Linux 2.6.
+
+To blank a CD\-RW, you have to use another utility, e.g. wodim:
+
+        \fBwodim\fP \fBblank=fast\fP \-immed dev=\fI/dev/cdrom\fP
+        \fBcdrskin\fP \fBblank=all|fast|as_needed\fP \-immed dev=\fI/dev/cdrom\fP
+        \fBxorriso\fP \fB\-outdev\fP \fI/dev/cdrom\fP \fB\-blank all|fast|as_needed\fP
+
+To blank a DVD\-RW and put in the incremental sequential mode, run:
+
+        \fBdvd+rw\-format\fP \fB\-blank=full\fP \fI/dev/dvd\fP
+
+To blank a DVD\-RW and put in the Restricted Overwrite mode, run:
+
+        \fBdvd+rw\-format\fP \fB\-force\fP \fI/dev/dvd\fP
+
+To overwrite data of BD, DVD+RW, DVD\-RW or DVD\-RAM run:
+
+        \fBgrowisofs\fP \fB\-Z\fP \fI/dev/dvd\fP\=\fI/dev/zero\fP
+
+To blank a DVD\-RAM, you can use:
+
+        \fBdd\fP if\=\fI/dev/zero\fP of\=\fI/dev/dvd\fP
+
+To relocate lead-out sector, run:
+
+        \fBdvd+rw\-format\fP \fB\-lead\-out\fP \fI/dev/dvd\fP
+        
+.SH NOTES
+Note that DVD+RW re-formatting procedure does not substitute for
+blanking. If you want to nullify the media, e.g. for privacy reasons,
+do it explicitly with 'growisofs \-Z \fI/dev/dvd\fP\=\fB/dev/zero\fP'.
+
+When growisofs "runs into" blank Blu\-ray Disc media, BD\-RE or BD\-R,
+it gets pre-formatted with minimal spare area size of 256MB.
+
+.SH SEE ALSO
+Most up-to-date information on dvd+rw\-tools is available at
+http://fy.chalmers.se/~appro/linux/DVD+RW/.
+
+.SH AUTHORS
+Andy Polyakov <ap...@fy.chalmers.se> stands for programming and on-line
+information.
+
+This manpage was created by Honza Horak <hho...@redhat.com> and consulted by
+Thomass Schmitt <scdbac...@gmx.net>.
+
+.SH LICENSE
+\fBdvd+rw\-format\fP is distributed under GNU GPL.
+
diff -up dvd+rw-tools-7.1/growisofs.1.format dvd+rw-tools-7.1/growisofs.1
--- dvd+rw-tools-7.1/growisofs.1.format	2008-03-01 11:40:06.000000000 +0100
+++ dvd+rw-tools-7.1/growisofs.1	2012-08-23 17:28:25.536770452 +0200
@@ -113,7 +113,7 @@ recordings.
 Actual device names vary from one operating system to another. We use
 \fI/dev/dvd\fP as a collective name or as symbolic link to the actual
 device if you wish. Under Linux it will most likely be an ide\-scsi
-device  such as "/dev/scd0." Under NetBSD/OpenBSD it has to be a
+device  such as "/dev/sr0." Under NetBSD/OpenBSD it has to be a
 \fIcharacter\fP SCSI CD\-ROM device such as "/dev/rcd0c." Under Solaris
 it also has to be a \fIcharacter\fP SCSI/ATAPI CD\-ROM device, e.g.
 "/dev/rdsk/c0t1d0s2" or "/vol/dev/aliases/cdrom0." And likewise in
@@ -210,11 +210,19 @@ DVD\-RAM or Blu\-ray Disc, as volumes ar
 When growisofs "runs into" blank Blu\-ray Disc media, BD\-RE or BD\-R,
 it gets pre-formatted with minimal spare area size of 256MB.
 
+A DVD\-RW accepts two disc modes: the \fISequential Recording\fP
+and the \fIRestricted Overwrite\fP. If a DVD\-RW medium is in the later one,
+it will behave much like DVD+RW.
+By default DVD\-RW discs are in Sequential Recording mode, but
+can be put into Restricted Overwrite mode using \fBdvd+rw\-format\fP.
+See \fBdvd+rw\-format (1)\fP for more info.
+
 .SH SEE ALSO
 Most up-to-date information on dvd+rw\-tools is available at
 http://fy.chalmers.se/~appro/linux/DVD+RW/.
 .PP
-The manpage for \fBmkisofs\fP.
+.BR mkisofs (1),
+.BR dvd+rw\-tools (1)
 
 .SH AUTHORS
 Andy Polyakov <ap...@fy.chalmers.se> stands for programming and on-line
diff -up dvd+rw-tools-7.1/growisofs.c.format dvd+rw-tools-7.1/growisofs.c
--- dvd+rw-tools-7.1/growisofs.c.format	2008-03-04 10:15:03.000000000 +0100
+++ dvd+rw-tools-7.1/growisofs.c	2012-08-23 17:28:25.561770698 +0200
@@ -3433,8 +3433,15 @@ int main (int argc, char *argv[])
 	else if (isatty (0)) warn_for_isofs |= 2;
 
 	if (no_tty_check || (warn_for_isofs&2))
-	    fprintf (stderr,"WARNING: %s already carries isofs!\n",in_device),
+	{
+	    fprintf (stderr,"WARNING: %s already carries isofs!\n",in_device);
+		/* we cannot re-write a DVD-RW media in Sequential mode */
+		if ((int)(mmc_profile&0xFFFF) == 0x14)
+			fprintf (stderr,"FATAL: DVD-RW medium is in Sequential mode, you "
+				            "need to blank it before writing again.\n"),
+			exit(FATAL_START(EBUSY));
 	    printf ("About to execute '");
+	}
 	else
 	    fprintf (stderr,"FATAL: %s already carries isofs!\n",in_device),
 	    exit(FATAL_START(EBUSY));
diff -up dvd+rw-tools-7.1/Makefile.format dvd+rw-tools-7.1/Makefile
--- dvd+rw-tools-7.1/Makefile.format	2008-02-27 14:11:27.000000000 +0100
+++ dvd+rw-tools-7.1/Makefile	2012-08-23 17:28:25.569770780 +0200
@@ -22,6 +22,7 @@ pkg:
 		$(DIST)/Makefile.m4		\
 		$(DIST)/dvd+rw-tools.spec	\
 		$(DIST)/growisofs.1		\
+		$(DIST)/dvd+rw-format.1		\
 		$(DIST)/transport.hxx		\
 		$(DIST)/mp.h			\
 		$(DIST)/win32err.h		\
diff -up dvd+rw-tools-7.1/Makefile.m4.format dvd+rw-tools-7.1/Makefile.m4
--- dvd+rw-tools-7.1/Makefile.m4.format	2012-08-23 17:28:25.508770174 +0200
+++ dvd+rw-tools-7.1/Makefile.m4	2012-08-23 17:28:25.570770790 +0200
@@ -32,6 +32,7 @@ BIN_MODE?=0755
 install:	dvd+rw-tools
 	install -o root -m $(BIN_MODE) $(CHAIN) /usr/bin
 	install -o root -m 0644 growisofs.1 /usr/share/man/man1
+	install -o root -m 0644 dvd+rw-format.1 /usr/share/man/man1
 ])
 
 ifelse(OS,MINGW32,[
@@ -68,6 +69,7 @@ BIN_MODE?=04755
 install:	dvd+rw-tools
 	install -o root -m $(BIN_MODE) $(CHAIN) /usr/local/bin
 	install -o root -m 0644 growisofs.1 /usr/local/man/man1
+	install -o root -m 0644 dvd+rw-format.1 /usr/local/man/man1
 ])
 
 ifelse(OS,SunOS,[
@@ -103,6 +105,7 @@ LDLIBS=-lvolmgt -lrt -lpthread -ldl
 install:	dvd+rw-tools
 	/usr/ucb/install -o root -m 04755 $(CHAIN) /usr/local/bin
 	/usr/ucb/install -o root -m 0644 growisofs.1 /usr/local/man/man1
+	/usr/ucb/install -o root -m 0644 dvd+rw-format.1 /usr/local/man/man1
 ])
 
 ifelse(OS,HP-UX,[
@@ -141,6 +144,7 @@ LDLIBS=-lrt -lpthread
 install:	dvd+rw-tools
 	/usr/sbin/install -o -f /usr/local/bin  $(CHAIN)
 	/usr/sbin/install -o -f /usr/local/man/man1 growisofs.1
+	/usr/sbin/install -o -f /usr/local/man/man1 dvd+rw-format.1
 ])
 
 ifelse(OS,IRIX,[
@@ -178,6 +182,7 @@ BIN_MODE=04755	# set-root-uid
 install:	dvd+rw-tools
 	/sbin/install -u root -m $(BIN_MODE) $(CHAIN) /usr/local/bin
 	/sbin/install -u root -m 0644 growisofs.1 /usr/local/man/man1
+	/sbin/install -u root -m 0644 dvd+rw-format.1 /usr/local/man/man1
 ])
 
 ifelse(OS,Linux,[
@@ -202,6 +207,7 @@ install:	dvd+rw-tools
 	install $(minus_o) -m $(bin_mode) $(CHAIN) $(prefix)/bin
 	[[ -d $(mandir)/man1 ]] || mkdir -p $(mandir)/man1
 	install $(minus_o) -m 0644 growisofs.1 $(mandir)/man1
+	install $(minus_o) -m 0644 dvd+rw-format.1 $(mandir)/man1
 	-[[ -f rpl8 ]] && install $(minus_o) -m $(bin_mode) rpl8 $(prefix)/bin || :
 	-[[ -f btcflash ]] && install $(minus_o) -m $(bin_mode) btcflash $(prefix)/bin || :
 ])
NAME
       dvd+rw-format - formatting and blanking DVD and BD media program.

SYNOPSIS
       dvd+rw-format  [-force[=full]] [-lead-out|-blank[=full]] 
[-ssa[=none|default|max|XXXm]]
       /dev/dvd

DESCRIPTION
       dvd+rw-format is a part of dvd+rw-tools suite and allows to format 
virgin DVD+RW or  BD
       media  for  the  first  use  or blank already written DVD-RW, DVD+RW and 
DVD-RAM media.
       Typical use cases of using dvd+rw-format  is  formatting  DVD-RW  to  
make  them  over‐
       writable, blanking used DVD-RW to make them sequentially writable from 
scratch, format‐
       ting BD-R, BD-RE and DVD-RAM with custom spare area sizes or  
re-formatting  BD-RE  and
       DVD-RAM  to change their spare size.  It is not possible to format CD-RW 
by dvd+rw-for‐
       mat, you can use cdrskin, xorriso or wodim utility instead, see section 
EXAMPLES.

       A DVD-RW accepts two disc modes: the Sequential Recording and the 
Restricted Overwrite.
       If  a  DVD-RW medium is in the latter one, it will behave much like 
DVD+RW.  By default
       DVD-RW discs are in Sequential Recording mode, but can be put into 
Restricted Overwrite
       mode using dvd+rw-format when no options given.  Be aware, that only 
-blank=full, which
       lasts as long as full writing, makes a used sequential  DVD-RW  capable  
of  performing
       multi-session, while fast blanked DVD-RW can only do Disk-At-Once.

       Virgin  DVD-RW can be directly written without the need of a formatting 
operation, how‐
       ever a non-virgin DVD-RW in Sequential Recording mode needs to be 
blanked before  writ‐
       ing  a  new  initial  session.  Since  a DVD-RW medium in the Restricted 
Overwrite mode
       behaves much like DVD+RW, it  can be written again without prior 
formatting the media.

       Virgin BD and DVD+RW media may be initially  formatted  prior  usage.  
Any-time  later,
       growisofs  program  will take care of formatting it automatically 
whenever appropriate,
       while further formatting is not recommended, however it is possible.

OPTIONS
       -force[=full]
              Perform formatting even if the medium is formatted already. This 
is  not  recom‐
              mended  for  BD and DVD+RW media, since they need to be formatted 
only once. Use
              -format=full to perform full (lengthy) reformat in case of 
DVD-RAM or  (lengthy)
              Full Certification in case of BD-RE.

       -lead-out
              Relocates  the  lead-out  next to outermost written sector as 
well as makes sure
              there is no virgin surface before it. This can make the medium  
more  compatible
              with  some  DVD  players. Previously written data is not affected 
by this opera‐
              tion.

       -blank[=full]
              Wipe data from DVD-RW media. Blanking is used automatically in 
case  of  BD  and
              DVD+RW  media.  Use  -blank=full  to  change DVD-RW back to 
Sequential Recording
              mode.

       -ssa[=none|default|max|XXXm]
              Grow, eliminate, reset to default or maximize Supplementary Spare 
Area.
              
EXAMPLES
       Actual device names vary from one operating system to another. We  use  
/dev/dvd  as  a
       collective  name  or  as symbolic link to the actual device if you wish. 
Under Linux it
       will most likely be a device such as "/dev/sr0" or "/dev/hda" for older 
Linux 2.6.

       To blank a CD-RW, you have to use another utility, e.g. wodim:

               wodim blank=fast -immed dev=/dev/cdrom
               cdrskin blank=all|fast|as_needed -immed dev=/dev/cdrom
               xorriso -outdev /dev/cdrom -blank all|fast|as_needed

       To blank a DVD-RW and put in the incremental sequential mode, run:

               dvd+rw-format -blank=full /dev/dvd

       To blank a DVD-RW and put in the Restricted Overwrite mode, run:

               dvd+rw-format -force /dev/dvd

       To overwrite data of BD, DVD+RW, DVD-RW or DVD-RAM run:

               growisofs -Z /dev/dvd=/dev/zero

       To blank a DVD-RAM, you can use:

               dd if=/dev/zero of=/dev/dvd

       To relocate lead-out sector, run:

               dvd+rw-format -lead-out /dev/dvd

NOTES
       Note that DVD+RW re-formatting procedure does not substitute for 
blanking. If you  want
       to  nullify  the  media,  e.g. for privacy reasons, do it explicitly 
with 'growisofs -Z
       /dev/dvd=/dev/zero'.

       When growisofs "runs into" blank Blu-ray Disc media, BD-RE or BD-R, it 
gets pre-format‐
       ted with minimal spare area size of 256MB.

SEE ALSO
       Most     up-to-date     information     on     dvd+rw-tools     is     
available     at
       http://fy.chalmers.se/~appro/linux/DVD+RW/.

AUTHORS
       Andy Polyakov <ap...@fy.chalmers.se> stands for programming and on-line 
information.

       This manpage was created by Honza Horak <hho...@redhat.com> and  
consulted  by  Thomass
       Schmitt <scdbac...@gmx.net>.

LICENSE
       dvd+rw-format is distributed under GNU GPL.

Reply via email to