			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.1i.diff) is against 2.3.45, so you need
a copy of that kernel. Additionally, you need the udf-0.9.0 package
from Ben Fennema, download that here:

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

Apply the kernel patch and udf-0.9.0-cdrwtool.diff, configure,
compile, reboot. Remember 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. Run make in the directory containing this file
to compile and link the pktsetup program.

packet currently uses major 42, so create a /dev/packet0 special
file:

# mknod /dev/packet0 b 42 0


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/packet0 /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/packet0 /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>

