Can we UDF-format CD-RW discs, using a DVD-RW (SATA) drive?
My oldest but trusty (till now) PATA CD-RW drive finally is going to CD-RW 'heaven', and I took out my DVD-ROM drive to use in another computer.
This leaves my main machine with only a SATA Pioneer DVD-212D DVD-R/RW drive. It works great in general, and I have no troubles at all burning ISO images to disc with it, but: I tried in vain today to make a fresh UDF CD-RW for packet writing. No success. I managed to BLANK the disc, but no way no how will it format. I cruised the mailing lists for a few hours, as well as looking into any recent updates or changes to the cdrwtool, cdrecord, or udftools packages, and found none. It seems that, based on the results of www searches I did for the variety of errors I am getting, we cannot UDF-format CD media in a DVD drive. Can anyone verify this, or (preferably) prove me wrong? Is it my kernel 2.6.25.1 ?? Maybe 2.6.26 fixes the issue? (I haven't read that changelog yet). Maybe it is the fact that the drive doesn't seem to be totally ATAPI, but at the same time doesn't seem to be totally SCSI either: For example, some commands want the drive named ATAPI:0,0,0 while other commands work only with 0,0,0 or /dev/sr0 or not at all. My old drives worked using the /dev name. The sg3_utils tools work OK, and lsscsi shows the drive as 3:0:0:0. Here's lshw: Code:
*-ide:2 I have deliberately left out of this post the myriad variations of the commands I have tried, and of the errors I have gotten; believe me when I say I tried *everything* to format the disc. It just won't work. If someone *REALLY* wants to see the error messages, I will do a few more runs at it and post them. Thanks. Sasha |
You might want to read the wikipedia entry on UDF; it has some interesting info about using it on rewritable disc media. It basically says that CD-RW, due to it's unusually short lifespan on rewrites, is not very well suited for UDF packet writing.
I have a similar system to yours, and when I open up k3b, I see options to format DVD, but only to erase CD-RW. When it comes time to burn files to the disk though you can specify a UDF filesystem for CD media. I'm assuming it's the standard type UDF though (see the link above) and not the variety that allows individual files to be erased or overwritten later. |
Hi David,
NOTE: I have never tried K3b, so cannot comment. I always burn from the command line. Thanks for that info. I will be reading that wiki page shortly, though the potential lifespan of the CDRW isn't too much of a concern for me under the circumstances. Even though the media claim to have a rewrite lifespan of 1000 rewrites, I find that very hard to believe (for ANY rewriteable media, from cassette tapes to DVDs), so I surely agree (with you) with the article about rewriteable media not being well suited to UDF; that said however, this is precisely what UDF packet writing is intended for, so where does that leave us? Perhaps using it on non-rewriteable media, I suppose... . With my dead IDE CD-RW drive, I have never had any troubles at all formatting UDF 0x0102 CD-RW media. It was a simple matter, leaving me with a CD-shaped 500MB floppy disc essentially, which I could mount RO or RW. I did not do a lot of erasing from it, but enjoyed being able to add stuff to it as necessary, without 'burning' (wasting) an entire disc for a few small files. If the disc got full, I could blank it and start again. I would not use this method for doing backups of anything important. The intent is this: I have a second computer here (an oldie being used as a serial console) that I wish to be able to transfer files (Slackware packages, kernel archive) to. It is not networked (except the serial port). I do not own any USB pens/pencils/flash sticks. And the oldie only has a floppy and a DVD-ROM. So, I wanted to put files onto the UDF disc, for transfer into the old computer. As I have discovered here, this SATA DVD-RW (my only burner now in the main computer) won't format a CD-RW, so I am hanging out to dry :p For the record (FYI to anyone interested), despite many claims to the contrary, I have had 100% success doing file transfers over the serial port :D simply by CAT-ing a file to ttyS0, and CAT-ing the ttyS0 on the other machine into > file. The largest I have so far done is a 3.5 MB tar.bz2 archive. I check with md5sum after the transfer, and they are good. Trouble with this is, at 38,400 baud, it isn't much better than my dialup connection to the internet (but better than nothing, though I really don't want to risk a transfer of a kernel archive of 50MB only to find it bad when done). Thanks again, David! Further input is welcome. Sasha |
Are you sure it's the fact that it's a DVD drive that's the problem, or is it possibly because it's a SATA drive or something? It seems to me that a DVD writer itself should be able to write anything a CD writer can do.
I've never used or created any UFS-formatted discs myself, so I really don't know much about them. I haven't used the command-line to write anything either; k3b has always served my purposes nicely. But I have two machines, one with the same Pioneer DVD212 sata drive you have, and another with an IDE DVD writer (an AOPEN drive, I believe). If you tell me what command to use I'll try it out on both types. BTW, since the box you want to sneaker-net to also has a dvd drive, is there any reason not to simply use a blank dvd±rw instead? And flash memory is getting dirt cheap these days. You can pick up a generic-brand 1GB pen drive for less than $10US these days. |
packet writing (UDF) instructions..
You hit the nail right on the head: NO, I am not sure at all whether the issue relates to it being a DVD drive, OR if it is because it is SATA. Though in my opinion, a SATA drive should do all that a PATA one does, or the purpose of it is defeated; also, I agree that it being a DVD drive should be irrelevant. It lists right in its capabilities that it deals with CD-RW discs, which I take to include burning them too.
bash:$ cdrwtool -d /dev/sr0 -q -b fast -v 0x0102 -t 4 -l 3 Above is the command I would use to format a CDRW with UDF version 1.0.2. In the past, I would substitute /dev/hdc or /dev/hdd as those were the PATA burners. It does take some time, like maybe 5 - 10 minutes to format a CD. Also, you may (or may not) need the /dev node for the packet-device linked to the drive you are using (this may only be needed to actually mount the finished disc as RW). Creating the packet-reading/writing device node is done using 'packetsetup' or 'pktsetup' script (part of UDF_tools), and the procedure is in another thread by me, from last year. I haven't got the link handy, but it is here somewhere; I will find it for you after if you do need it. You could also create the /dev packet-writer character device by hand using 'mknod', but the simplest way at the moment might be as follows (snippet from my rc.local startup script, and the packet-node-linking script): Code:
# Snippet from rc.local: Code:
# rc.pktcdvd script, called from above: sh-3.1# cdrecord dev=ATAPI:0,0,0 speed=10 blank=all padsize=63s -pad -dao -v -eject It was sheer luck/fluke that I got that to work, but it blanked fine, and the DVD drive identifies the blanked disc as a 'blank disc' :p.. But with the old PATA drives, I did it like this: sh-3.1# cdrecord dev=/dev/hdc speed=10 blank=all padsize=63s -pad -dao -v -eject cdrecord complains that "using the device name (/dev/hdc) is not intended and not supported..." but it works anyways. Best of luck, and thanks!! If you need further info I will be happy to help, though I may be slower to reply as I go back to work tomorrow, so will be not around till about 20:00 AST or so, if at all tomorrow night. Sasha |
When I move programs like your talking about I just make a multisession cd-r and add things to it as needed and you have a permanent copy. Around here you can get cd's pretty cheap.
|
Well, I tried it out and came up with some interesting results. I used the cdrwtools command you gave me.
First I tried it out on the machine with the PATA DVD drive--and it worked. Or at least it appeared to. It erased the disk and created the UDF filesystem without any complaints whatsoever. I didn't even need to fool around with the packet device stuff you mentioned. Here's the output: Code:
# cdrwtool -d /dev/hdc -q -b fast -v 0x0102 -t 4 -l 3 Then I tried it on the other machine with the Pioneer DVR-212 sata drive, and didn't have as much luck. But there were a couple of things of note. The first time I ran the command it made it through the disk blanking, then choked with some input/output errors. Code:
# cdrwtool -d /dev/scd0 -q -b fast -v 0x0102 -t 4 -l 3 Code:
# cdrwtool -d /dev/scd0 -q -v 0x0102 -t 4 -l 3 The bizarrely-created sata disk didn't work at all. No matter what I tried or where I tried it, it only gave back a "wrong fs" mount error. The pata-created disk did mount, but when I tried using the same drive that created it, it would only mount read-only. But it would mount read-write on both the sata machine and with another pata drive I have. So it seems to work. Now here's where my inexperience comes into play. I tried to create a few files on the disk as it was mounted (mostly using the touch command). It would always appear to work, and I could even read back any text data from the files. But whenever I unmounted and remounted the disk, the files I created were gone. Is something wrong here, or am I doing something wrong? Well, this is getting long. But I think it does tell us something. It doesn't seem to be a problem with the recording tools, and I don't think it's the drives themselves at fault. I believe it's simply that some hardware is better supported than others, and support for the newer sata drives has more bugs than the older pata ones. |
David,
that is interesting stuff indeed; thanks for the great feedback! I agree that differences with the newer (SATA) hardware, as well as possibly our respective IDE/SATA controllers, and even our kernels have a role in this situation. I can only answer briefly ATM, as I am at work, but about your not being able to write the files to the disk (they 'disappear')-- that is the purpose of the packet-writing node. It is a character device node which is symbiotically linked to your chosen burner device, and it is what allows "packet writing", or in plain english, "writing to a UDF disc". Normally, the UDF disc will not mount RW using your regular device (/dev/scd0) (despite what the mechine may be telling you) but rather, you would need to mount the 'packet-writer' RW. If you have the time, try out the scripts I pasted in above, to create the packet node. If you just run the long script in a console, it will give you usage instructions. Compare the instructions (the flags) with my little rc.local snippet, and I am sure you can link a packet-writer device to one or both of your drives, which you can then mount -t UDF RW. OK, I am on IE here too :( and it is driving me mad, so I must get off this dumb terminal. Thanks again, I will reread your reply above more later, and ponder the issue.. Sasha |
An update, though not much has changed in the way of getting my SATA DVD writer to write anything in the way of UDF discs;
I have been gathering/collecting some older/used hardware lately (for the other computer(s) I mentioned building) and among the assortment of parts I now have, there are a couple perfectly good optical drives. One is a CDROM, which is now on a shelf awaiting a home, but the other is a CD-RW similar to my dead one, only older (however despite its age it looks like it just stepped off the showroom floor-- someone took very good care of it). Code:
*-cdrom I agree, some hardware is not perfectly supported, and also, the more I read here and there about various hardware from various mfgrs, some hardware does not adhere 100% to the standards and specifications of the protocols which it is supposed to. Not to say specifically that there's necessarily some form of 'proprietary' interface/protocol being used in the hardware (though that is the case sometimes) but just that a particular device does not comply perfectly with the accepted standard that it should comply with, and much debugging on the part of the linux programmers working on the drivers is needed to create workarounds for these devices. I'm not sure which it is in the case of my DVD writer, but I am now running kernel 2.6.26, which works very nicely I may add, and I am going to try formatting a CD-RW in the SATA DVD writer again to see if anything has changed for the better in the SATA interface. Sasha |
Same as before, trying to UDF format a CD-RW in the SATA DVD writer:
Code:
sh-3.1# cdrwtool -d /dev/sr0 -q -b fast -v 0x0102 -t 4 -l 3 Oh well.. I am happy that I have another working CD-RW drive now :) |
All times are GMT -5. The time now is 04:03 AM. |