Subject: DVD+-RW in-kernel write support - it partially EXIST
To: None <>
From: Wojciech Puchar <>
List: netbsd-users
Date: 06/11/2004 16:33:44
thanks for NetBSD developers that just allow write command in cd.c :)

i've been just so dumb to try do it and it works

to use DVD-RW/DVD+RW media in direct mode do (assuming /dev/rcd1d is your 
DVD+-RW drive)

1) format media:
dvd+rw-tools -force=full /dev/rcd1d only once for DVD-RW media. it will 
take some time. in case of DVD+RW -force should be enough but i don't have 
any DVD+RW discs.

2) write with exactly 32K block to raw device.

you may use /dev/rcd1d for /sbin/dump but with -b 32, you may pipe any 
command with

|dd obs=32k conv=osync of=/dev/rcd1d

3) you won't be able to eject media. it you try to force it with eject 
command it makes things worse.

just read first block with dd if=/dev/rcd1d bs=2k count=1 of=/dev/null
or any other command that will read data. this will force all unwritten 
block to be written.

now you can eject disc.

4) DVD+-RW media behaves quite like disk drive, it has always full size, 
no matter how much were recorded.

cd.c TODO:

a) add flushcache scsi command in cdclose. this will fix 3! i have this 
drive for 1 hour from now only, it's not mine. could anyone tell me how 
to send scsi command to drive? i know parameters dvd+rw-tools's growisofs utility.
i have no experience.

b) add support for writing smaller blocks than 32K by reading full block, 
fixing and writing back.
i will do this after some time, when i will buy new DVD drive for me.

b will allow you to use newfs, mount etc. directly on media but is it 
worth of work? using this will quickly reach this 1000 rewrites in 
superblocks, bitmap areas etc.

lfs may be best for this...