			Packet writing for Linux
			------------------------

Disclaimer
----------

This is alpha quality code, at best. It Works For Me (tm), but it may
not work for you yet. Don't run this on a system with important
data on it.


Installing
----------

The current patch (packet-0.0.1k.diff) is against pre-2.3.52-3, so you need
a copy of that kernel. Additionally, you need the udf-0.9.1 package
from Ben Fennema, download that here:

http://download.sourceforge.net/linux-udf/udf-0.9.1.tar.gz

Apply the kernel patch, configure, compile, reboot. Remember to select
support for packet writing when configuring the kernel -- the entry is
located right next to the loop back driver in the "Block Devices" section.
Compile UDF lib and then tools, which will also create the /dev/pktcdvd0
special file (not needed if you are running with devfs).


Running
-------

This section assumes that your CD writer is located on /dev/hdd -- if
that is not the case, substitute with your device location.

Find a CD-RW disc that you can use for testing and use cdrwtool to
blank, format, and write UDF structure to it.

# cdrwtool -d /dev/hdd -s -z 32 -p 1 -w mode2 -q

The quick option (-q) will automatically allocate the entire disc. Beware
that the operation can easily take 30-60 minutes, depending on the
speed of your CD writer.

Run chkudf on the device, to ensure that it is sane.

# chkudf /dev/hdd

So now you have an empty CD-RW with a valid UDF file system. You now
need to setup the packet device, which is a lot like setting up a
loop device. If you have a module based setup, make sure that
cdrom, packet, and ide-cd have been loaded.

# pktsetup /dev/pktcdvd0 /dev/hdd

Make sure that you selected support for UDF when configuring your kernel,
and that UDF write support is enabled. Now mount the device.

# mount /dev/pktcdvd0 /mnt/cdrom -t udf -o rw,noatime


Bugs
----

There are plenty of bugs. If you stumble into some, mail me about it.
If it hangs hard or oopses on you, recompile the packet module (or
kernel) with PACKET_DEBUG set to 2 and reproduce the crash and send
the kernel log info to me.

Jens Axboe <axboe@suse.de>

