Packet Writing with Linux

Beginning with the 2.4 kernel, Linux offers limited packet-writing support. The 2.4 and 2.5 kernels have no native support for packet writing, but a kernel patch is available from the Linux UDF Project (http://sourceforge.net/projects/linux-udf) that adds basic packet-writing functions. The kernel patch should work with any CD-(M)RW drive that supports packet writing. As we write this, the major limitations of the patch are that it supports only CD-RW media and fixed-length packet writing.

To enable packet writing under Linux, take the following steps:

  1. Download the latest version of the patch from kernel.org and apply it.

  2. Configure the kernel by selecting packet support in the block device section and UDF support in the filesystem section.

  3. Compile the kernel and modules, install the kernel, and reboot the system.

  4. Download the latest version of cdrwtool, which is needed to format CD-RW discs.

  5. Use the command make lib tools udf.o install to compile and install UDF support.

  6. Format a new CD-RW disc using the command cdrwtool -d /dev/<device> -q.

  7. Use the command ls /dev/pk* to verify that /dev/pktcdvd0 exists. If it doesn’t, use the command mknod /dev/pktcdvd0 b 97 0 to create it.

  8. Use the command pktsetup /dev/pktcdvd0 /dev/<device> to set up the CD writer.

  9. Use the command mount /dev/pktcdvd0 to mount the device, at which point you should be able to read from and write to the drive.

Get PC Hardware in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.