FindPage
View Source:
PacketWriting-Linux
!! 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 * Kernel 2.6.10 and higher have proper UDF filesystem support and packetwriting support (pktcdvd) already merged. * Older 2.6 kernels require an update to use properly (http://web.telia.com/~u89404340/patches/packet/). * 2.5 and 2.4 kernels are not fully supported (http://packet-cd.sourceforge.net/). 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. <verbatim> # 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 </verbatim> !! Utilizing UDF and Packet Writing <verbatim> # 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 </verbatim> !! 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<br> <verbatim> gcc cdmrw.c -o cdmrw -I /usr/src/linux-2.6.14.2/include </verbatim> Blank the CD first. This is unnecessary for fresh media. <verbatim> cdrecord dev=/dev/hdc speed=4 blank=fast </verbatim> Approximately 2 minutes to blank a cdrw. Check the status. <verbatim> shell> cdmrw -d /dev/hdc not a mrw formatted disc </verbatim> Trigger a Mt. Rainier format <verbatim> 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 </verbatim> For mine, the percentage never rises. Approximately 22 minutes for Mt Rainier to format a blanked CD. Create a UDF filesystem <verbatim> mkudffs --media-type=cdrw /dev/hdc </verbatim> Approximately 5 minutes for UDF filesystem creation.