LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Unable to packet write to UDF on DVD+RW (https://www.linuxquestions.org/questions/linux-hardware-18/unable-to-packet-write-to-udf-on-dvd-rw-629020/)

ordealbyfire83 03-18-2008 03:54 PM

Unable to packet write to UDF on DVD+RW
 
Hello,
At this point I can't tell whether this is a hardware or software issue, so my apologies in advance if this isn't in the right forum. I am trying to use a DVD+RW disk for UDF packet writing in Fedora 7 x86_64, and I get errors that the file system is Read-Only. Here is what I have done.

# dvd+rw-format -force /dev/scd0
# pktsetup pktcdvd0 /dev/scd0
# mkudffs --media-type=dvd --udfrev=0x0150 /dev/pktcdvd/pktcdvd0

# mount -t udf -o rw,noatime /dev/pktcdvd/pktcdvd0 /media/cdvdrw

Now, when I try to copy something to /media/cdvdrw (as root) it tells me the disk is read-only. How can this be, since mount was invoked with -o rw? I'm not sure if this has anything to do with it, but doing hdparm /dev/scd0 gives

/dev/scd0:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Inappropriate ioctl for device

If it matters, I can't enable DMA (apparently because the device is listed as scd0 as opposed to hdxx).

# sdparm /dev/scd0 gives
/dev/scd0: Optiarc DVD+-RW AD-5540A 103C [cd/dvd]
Read write error recovery mode page:
AWRE 1 [cha: y, def: 1]
ARRE 0 [cha: y, def: 0]
PER 0 [cha: n, def: 0]
Write parameters (MMC) mode page:
BUFE 1 [cha: y, def: 1]
WR_T 0 [cha: y, def: 0]
MULTI_S 3 [cha: y, def: 3]

I'm not sure what's wrong. Thanks in advance.

Brian1 03-18-2008 04:22 PM

I have never done this but i do know there is a packet writing module in the kernel for udf. It is probably not enabled in default Fedora rpm kernels. You can recompile the kernel and enable the feature and see if that is what you need to do for it.

Brian

Brian1 03-18-2008 05:07 PM

Found some links from a quick google search. This might help. If not goto google and search for others. http://packet-cd.sourceforge.net/

Brian

ordealbyfire83 03-19-2008 08:04 AM

Thanks for the reply. Yes, there is indeed support for this in FC7. When I insert the formatted DVD an icon called "LinuxUDF" appears on the desktop and the disk is mounted to /media/LinuxUDF. All along, I assumed this should be unmounted, and then follow the procedurehttp://www.g-loaded.eu/2005/11/10/pa...d-dvdrw-media/ for pktcdvd. But after experimenting with LinuxUDF, it appears to allow cut/paste seemlessly, even as an ordinary user! This eliminates the hassle setting up (and later tearing down) pktcdvd and remounting the disk, not to mention using chown all the time and using up costly disk rewrites.

I had previously used pktcdvd for CD-RW, which worked fine. I'm guessing the difference is that DVD's need to be formatted with dvd+rw-format instead of cdrwtool (maybe pktcdvd doesn't like that).

ssenuta 06-08-2008 10:16 AM

UDF Packet Writing Setup
 
I had success with DVD+RW udf packet writing in Mandrivia-2008 (kernel-2.6.25) but discovered that I had to break the association between /dev/pktcdvd0 & its associated device (/dev/hdb) until after the udf filesystem was created.

Here are the commands I used to setup my DVD+RW for udf packet writing:

/etc/rc.d/init.d/pktcdvd stop ..break association between /dev/hdb & /dev/pktcdvd/0
dvd+rw-format /dev/hdb ..only needed for new virgin (out of box) discs
growisofs -Z /dev/hdb=/dev/zero ..(optional) writes zeros to disc to clean stale data
mkudffs /dev/hdb ..create a udf filesystem on disc
/etc/rc.d/init.d/pktcdvd start ..start association between /dev/hdb & /dev/pktcdvd0
mount -t udf -o rw,noatime /dev/pktcdvdd0 /mnt/misc
...................
umount /dev/pktcdvd0
eject /dev/hdb

Note: Mandriva uses an initialization script to associate & unassociate /dev/pktcdvd0 to my dvd device /dev/hdb.
If you don't have such a script you can do it manually by running:

pktsetup -d /dev/hdb ..break the association
pktsetup /dev/pktcdvd0 /dev/hdb ..start association
-or-
pktsetup /dev/pktcdvd/0 /dev/hdb


Here are the commands I use setup CD-RW packet writing:

/etc/rc.d/init.d/pktcdvd stop ..break association between /dev/hdb & /dev/pktcdvd0
cdrwtool -d /dev/hdb -q ..quick disc setup (blank, format & write udf filesystem)
/etc/rc.d/init.d/pktcdvd start ..start association between /dev/hdb & /dev/pktcdvd0
mount -t udf -o rw,noatime /dev/pktcdvd0 /mnt/misc
umount /dev/pktcdvd0

Here are the commands I use to setup a DVD+RW with a "PRE-MASTERED" udf filesystem:

/etc/rc.d/init.d/pktcdvd stop
dd if=/dev/zero of=image.udf bs=2k count=2M ..create a 4GB file for dvd use
mkudffs --utf8 image.udf ..create a udf filesystem in file
mount -t udf -o loop,rw,noatime image.udf /mnt/misc
cp * /mnt/misc ..copy files to image.udf file (> 2GB files supported)
umount /mnt/misc
growisofs -Z /dev/hdb=image.udf ..copy image.udf to disc

/etc/rc.d/init.d/pktcdvd start ..start association between /dev/hdb & /dev/pktcdvd0
mount -t udf -o rw,noatime /dev/pkcdvd0 /mnt/misc
umount /dev/pktcdvd0 ..unmount /mnt/misc

I hope this helps you and other who are interested in the udf filesystem. Sorry I couldn't reply to your post sooner
but I just started playing with the udf filesystem a couple of days ago.


All times are GMT -5. The time now is 03:29 PM.