HOWTO write udf (on cd/dvd/hd wherever)

scion+fbsdq at webrelay.net scion+fbsdq at webrelay.net
Tue Nov 29 23:31:09 GMT 2005


Date:    Tue, 29 Nov 2005 08:49:15 +0100
From:    arden <arden at nildram.co.uk>

>im confused do you want to mount a udf cd in a drive or want to make a udf iso ?

Neither.  I want to write a UDF filesystem on a hard drive at the end of
a USB so that I can backup files on one system into an archive file ( tar,
dump, cpio, whatever) and store them away on another system.

Date:    Tue, 29 Nov 2005 00:45:00 +0100
From:    Roland Smith <rsmith at xs4all.nl>

>Using dvd+rw-tools for burning backups on single-layer (4GB) disks works
>fine. You don't really need UDF for that.

These archives can get rather large.  Compressed, even, they are running
about 35-45 GBytes.  This is too big for FAT32, and ISO9660 (I think).  
Neither ext2fs, ufs, ntfs or hfs+ has a solid implementation on much other
than its native platform.   And I don't know where they will end up.  So,
a filesystem that is supported by many systems is needed.  UDF was designed
for that, and seems to work.  I just need to be able to write the format 
from my main server, and I wanted to use FreeBSD for that, as its USB auto-
magic seems to be better than most other unixen.


Date:    Tue, 29 Nov 2005 00:45:00 +0100
From:    Roland Smith <rsmith at xs4all.nl>

>I couldn't find a newfs_udf on 6.0, although there is a userspace
>implementation called UDFclient: http://www.13thmonkey.org/udfclient/
>
>As I understand it, UDF is an extension of ISO9660. An explanation of
>UDF can be found here: http://homepage.mac.com/wenguangwang/myhome/udf.html
>
>Dvd+rw-tools uses ISO9660, not UDF.
>
>Using dvd+rw-tools for burning backups on single-layer (4GB) disks works
>fine. You don't really need UDF for that.

Date:    Tue, 29 Nov 2005 00:48:24 +0100
From:    Wojciech Puchar <wojtek at tensor.3miasto.net>

>thats what i used.

RS> As I understand it, UDF is an extension of ISO9660. An explanation of

>no it is not an extension.

RS> UDF can be found here: http://homepage.mac.com/wenguangwang/myhome/udf.html
RS>
RS> Dvd+rw-tools uses ISO9660, not UDF.

>dvd+rw-tools do't use any filesystem! they just write to device.

Date:    Tue, 29 Nov 2005 01:14:56 +0100
From:    Roland Smith <rsmith at xs4all.nl>

WP> no it is not an extension.

>http://en.wikipedia.org/wiki/Universal_Disk_Format
>
>"It [UDF] is an implementation of the ISO/IEC 13346 standard (also known as
>ECMA-167), and an extension of ISO 9660."
>
>And (somewhat paraphrased):
>
>"A variable-length 'packet-written' CD-R(W) can be closed to a ISO9660
>format by writing just by writing a table of contents on the CD."

WP> dvd+rw-tools do't use any filesystem! they just write to device.

>I beg to differ. Growisofs is a front-end for mkisofs, combined with a
>DVD recording program. See the growisofs manual page.

Date:    Tue, 29 Nov 2005 11:42:38 +0100
From:    Wojciech Puchar <wojtek at tensor.3miasto.net>

RS> "It [UDF] is an implementation of the ISO/IEC 13346 standard (also known as
RS> ECMA-167), and an extension of ISO 9660."

>not true.

RS> "A variable-length 'packet-written' CD-R(W) can be closed to a ISO9660
RS> format by writing just by writing a table of contents on the CD."

>you can just add ISO9660 filesystem metadata, getting two 
>different filesystems of which both's metadata puts to the same place so 
>data is shared, getting more portable disc. and getting faster access to 
>files as UDF isn't as efficient.
>
>but UDF is NOT an ISO9660 extension. UDF can live without ISO9660 
>filesystem at all.
>
>
>if you used UDF programs in windoze, they all have option to add ISO9660 
>filesystem (just generate metadata) and fixate - after whole disc is 
>filled with data.


Well, ISC/IEC 13346 is an extension of ISO 9660 in that is does more.  It
even has some of the same data structures and nomenclature.  It's even reasonable
to use the same program to master RO versions of 13346.   And UDF is a subset
of ISO/IEC 13346. 

But UDF is a subset with meaning above and beyond ISO/IEC 13346.  It's designed
to be used as a real filesystem.

see: http://www.osta.org/technology/di.htm

At any rate, mkisofs will not suffice, as it makes a static filesystem.  I need
to create a filesystem in the UNIX sense, an empty one that I can then write in.
And moreover, from the mkisofs man page:

       -udf   Include UDF support in the generated filesystem image.  UDF sup-
              port is currently in alpha status and for this reason, it is not
              possible  to  create  UDF  only images.  UDF data structures are
              currently coupled to the Joliet structures, so  there  are  many
              pitfalls  with  the  current implementation. There is no UID/GID
              support, there is no POSIX permission support, there is no  sup-
              port  for  symlinks.  Note that UDF wastes the space from sector
              ~20 to sector 256 at the beginning of the disk  in  addition  to
              the spcae needed for real UDF data structures.

In summary, FreeBSD doesn't seem to have a mechanism to create an empty UDF on
a medium, though it can probably read one.  I'll do some testing on that with
some Solaris/FreeBSD/Windos USB device shuffling.

Cheers!
-sam


More information about the freebsd-questions mailing list