Intro
-----

geom_ugz is GEOM class that implements cloop (Linux compressed read-only
loopback device). Compressed file system images are good for cd-only
distros which boot the whole system off a compact disk. Using compressed
file system images greatly speeds up reading from the media (booting
the system, program startup times etc.).

Currently geom_ugz supports only cloop V2.0 filesystem image format.
It is possible that this GEOM class will support more compressed filesystem
image formats in the future so I decided to name it geom_ugz (not geom_cloop).

Creating filesystem images
--------------------------

Use create_compressed_fs utility from cloop-utils port to create
compressed file system images. Look in cloop-utils README for examples
how to run create_compressed_fs.

Please note that this utility requires that there is enough swap space to
hold whole compressed file system image in memory. This utility could be
rewritten (e.g. to use temporary files) to remove this requirement
or another compressed fs image format can be implemented (e.g.
format with fixed length header and compressed block map at the end)
but this is not a big issue atm.

Mounting compressed filesystem
------------------------------

1) Load geom_ugz kernel module

kldload /path/to/geom_ugz.ko

2) Create filesystem image

mkisofs -lrJL /path/to/fs/root | create_compressed_fs - 65536 >fs.iso.cloop

3) Configure md device

mdconfig -a -f fs.iso.cloop

After this step /dev/mdX device node will be created.
If fs.iso.cloop contains valid cloop file system image, /dev/mdX.ugz
device node will be created as well. Reading /dev/mdX.ugz gives uncompressed
data.

4) Mount file system

mount -t cd9660 /dev/mdX.ugz /mnt/tmp

/fjoe

// Time, talent, willingness -- pick any two
