Differences between current version and predecessor to the previous major change of PacketWriting-Linux.

Other diffs: Previous Revision, Previous Author

Newer page: version 2 Last edited on Thursday, 9 February 2006 14:08:16 by CyberLeo
Older page: version 1 Last edited on Monday, 28 November 2005 2:39:57 by CyberLeo Revert
@@ -57,9 +57,9 @@
 You will still want udftools-1.0.0b3 for mkudffs and udffsck, which are required for providing a read/write filesystem that is widely supported (with or without third party drivers) and optimized for CD and DVD media. 
  
 Theoretically, you could use ext2 or vfat, but why would you want to? 
  
-Mt Rainier support tool: http://www.kernel.org/pub/linux/kernel/people/axboe/tools/cdmrw.c<br> 
+Mt Rainier support tool: [cdmrw.c] http://www.kernel.org/pub/linux/kernel/people/axboe/tools/cdmrw.c<br> 
 <verbatim> 
 gcc cdmrw.c -o cdmrw -I /usr/src/linux-2.6.14.2/include 
 </verbatim> 
  

current version

WARNING

The HL-DT-ST RW/DVD GCC-4480B drive, among other LG devices, has a fatal firmware bug that can cause the drive to be destroyed under some circumstances. The depreciated command FLUSH_CACHE was reused as the UPDATE_FIRMWARE command in many models of LG CD-ROM drives. For details, see http://forums.scotsnewsletter.com/index.php?showtopic=3582&st=0

Enabling Packet Writing

pktsetup, included with udftools 1.0.0b3, requires a patch to operate properly. http://web.telia.com/u89404340/patches/packet/udftools-1.0.0b3.patch.bz2

Preparing Media For Use

When formatting media for UDF packetwriting, if you get strange errors, check first that the media can be full blanked. If not, get new media.

If blanking goes alright, but cdrwtool gives you Illegal Seek errors immediately after blanking, try reducing the block count by 32 each time until it works.

# Quick blank, format and mkudffs
cdrwtool -d /dev/cdrom -q

# This fails on Imation 4x 650MB CD-RWs. Try blanking manually (cdrecord) then...
# (from 276800 blocks detected on disk)

# Format this many blocks:
cdrwtool -d /dev/cdrom -m 276768
# Make udf fs with this many blocks:
cdrwtool -d /dev/cdrom -u 276768

Utilizing UDF and Packet Writing

# Afterwards, to access the block device in read/write:
# Enable packet interface
pktsetup cdrw /dev/cdrom

# Mount the filesystem
# Remember the noatime option, or else read access will be slow as it must
#  update the access times on all files and directories!
mount -t udf -onoatime /dev/pktcdvd/cdrw /media/cdrom

# Umount the filesystem
umount /media/cdrom

# Disable packet interface
pktsetup -d cdrw

Mount Rainier

Get a drive with Mt Rainier support, and all the above is unnecessary. Use this tool to format the media, then the block device magically becomes read/write.

You will still want udftools-1.0.0b3 for mkudffs and udffsck, which are required for providing a read/write filesystem that is widely supported (with or without third party drivers) and optimized for CD and DVD media.

Theoretically, you could use ext2 or vfat, but why would you want to?

Mt Rainier support tool: cdmrw.c http://www.kernel.org/pub/linux/kernel/people/axboe/tools/cdmrw.c

gcc cdmrw.c -o cdmrw -I /usr/src/linux-2.6.14.2/include

Blank the CD first. This is unnecessary for fresh media.

cdrecord dev=/dev/hdc speed=4 blank=fast

Approximately 2 minutes to blank a cdrw.

Check the status.

shell> cdmrw -d /dev/hdc
not a mrw formatted disc

Trigger a Mt. Rainier format

shell> cdmrw -d /dev/hdc -f full
not a mrw formatted disc
shell> sleep 10 ; # This is important. The drive will bitch about not being ready otherwise.
shell> cdmrw -d /dev/hdc
mrw format running
drive fails to support progress indicator
/dev/hdc: back ground format 0% complete

For mine, the percentage never rises. Approximately 22 minutes for Mt Rainier to format a blanked CD.

Create a UDF filesystem

mkudffs --media-type=cdrw /dev/hdc

Approximately 5 minutes for UDF filesystem creation.