[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

UDF, ext2 and -o loop created images

I am interested in how to best create images of filesystems other than
ISO on Unix based systems. ISO has a lot of eccentricities (Rock Ridge,
Joliet, filename/path-depth restrictions, etc.) that demand a complex
custom application (mkisofs) to properly create. However, things should
be much more straightforward with UDF (the suggested filesystem for DVDs)
as well as for the other filesystem types that have in-kernel read+write
support. Building UDF images was discussed in a very informative post
by Tony Caola in September 2003:

Tony's procedure is basically to create a zeroed file of size equal to
that of the target media, create a filesystem within this file via
mkudffs, mount it using -o loop, and then copy the desired files into
this mounted image. Volker Kuhlmann responded to this idea with
http://lists.debian.org/cdwrite/2003/09/msg00014.html in which he
stated that UDF support under Linux was a tad buggy as well as lacking
many tools that are available for ext2 (e.g., resize2fs).

All of this brings some questions to mind.

1. Have the bugs Volker encountered with UDF been fixed now? Volker,
   what versions of kernel and udftools were buggy for you?
2. How does UDF fare as far as faithfully preserving all the ext2
   attributes (uids, permissions, hard/soft links, pathname lengths,

3. How exactly are we supposed to determine/control the size of the
   filesystem and image file?
   (a) Is there a table/chart that shows the number of blocks of all
       the common optical media (74min CD, 80min CD, 4.7GB DVD, etc.)
       or is there some way we can get this from the /dev (loaded with
       "blank" media) itself?
   (b) The ISO filesystem seems not to have a problem with image files
       that are smaller than the target media. Is this true with UDF
       and ext2 as well? (The answer might seem to be an obvious "yes",
       but I don't want to assume that the image file size is identical
       to the concept of a partition.)
   (c) If so, how do we best go about resizing the filesystem as well as
       its containing image file to match the actual storage requirements
       of the files to be archived? (So that our .img files can be smaller
       than the target media if we don't fill it all.) IMHO, it seems to
       me that the minute "mount -o loop" became possible under Linux, we
       should have had the tools to manage filesystem and image file sizes
       for all of the supported filesystem types.

Of course, I am sure things get a lot more complicated by the filesystem
"growing" or appending required for multisession recording of nonrewritable
media. UDF may allow for a "growudffs" approach, but I doubt if ext2 can.

 Thanks in advance,
 Mike Shell

Reply to: