packet-writing.txt 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. Getting started quick
  2. ---------------------
  3. - Select packet support in the block device section and UDF support in
  4. the file system section.
  5. - Compile and install kernel and modules, reboot.
  6. - You need the udftools package (pktsetup, mkudffs, cdrwtool).
  7. Download from http://sourceforge.net/projects/linux-udf/
  8. - Grab a new CD-RW disc and format it (assuming CD-RW is hdc, substitute
  9. as appropriate):
  10. # cdrwtool -d /dev/hdc -q
  11. - Setup your writer
  12. # pktsetup dev_name /dev/hdc
  13. - Now you can mount /dev/pktcdvd/dev_name and copy files to it. Enjoy!
  14. # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
  15. Packet writing for DVD-RW media
  16. -------------------------------
  17. DVD-RW discs can be written to much like CD-RW discs if they are in
  18. the so called "restricted overwrite" mode. To put a disc in restricted
  19. overwrite mode, run:
  20. # dvd+rw-format /dev/hdc
  21. You can then use the disc the same way you would use a CD-RW disc:
  22. # pktsetup dev_name /dev/hdc
  23. # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
  24. Packet writing for DVD+RW media
  25. -------------------------------
  26. According to the DVD+RW specification, a drive supporting DVD+RW discs
  27. shall implement "true random writes with 2KB granularity", which means
  28. that it should be possible to put any filesystem with a block size >=
  29. 2KB on such a disc. For example, it should be possible to do:
  30. # dvd+rw-format /dev/hdc (only needed if the disc has never
  31. been formatted)
  32. # mkudffs /dev/hdc
  33. # mount /dev/hdc /cdrom -t udf -o rw,noatime
  34. However, some drives don't follow the specification and expect the
  35. host to perform aligned writes at 32KB boundaries. Other drives do
  36. follow the specification, but suffer bad performance problems if the
  37. writes are not 32KB aligned.
  38. Both problems can be solved by using the pktcdvd driver, which always
  39. generates aligned writes.
  40. # dvd+rw-format /dev/hdc
  41. # pktsetup dev_name /dev/hdc
  42. # mkudffs /dev/pktcdvd/dev_name
  43. # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
  44. Packet writing for DVD-RAM media
  45. --------------------------------
  46. DVD-RAM discs are random writable, so using the pktcdvd driver is not
  47. necessary. However, using the pktcdvd driver can improve performance
  48. in the same way it does for DVD+RW media.
  49. Notes
  50. -----
  51. - CD-RW media can usually not be overwritten more than about 1000
  52. times, so to avoid unnecessary wear on the media, you should always
  53. use the noatime mount option.
  54. - Defect management (ie automatic remapping of bad sectors) has not
  55. been implemented yet, so you are likely to get at least some
  56. filesystem corruption if the disc wears out.
  57. - Since the pktcdvd driver makes the disc appear as a regular block
  58. device with a 2KB block size, you can put any filesystem you like on
  59. the disc. For example, run:
  60. # /sbin/mke2fs /dev/pktcdvd/dev_name
  61. to create an ext2 filesystem on the disc.
  62. Links
  63. -----
  64. See http://fy.chalmers.se/~appro/linux/DVD+RW/ for more information
  65. about DVD writing.