1 .\" $NetBSD: vndcompress.1,v 1.5 2006/02/23 20:57:03 jld Exp $
3 .\" Copyright (c) 2005 Florian Stoehr <netbsd@wolfnode.de>
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by Florian Stoehr
17 .\" 4. The name of the author may not be used to endorse or promote products
18 .\" derived from this software without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 .Nd compress/uncompress file system images to/from cloop2 format
53 program compresses an existing file system image
54 into a cloop2 compatible compressed file system image.
55 An optional blocksize can be given.
56 If omitted, the default of 64kB is used.
60 command decompress a cloop2-compressed file system image back into a
64 file system images that can be handled are not limited to any specific
65 file system, i.e. it is possible to handle images e.g. in ISO 9660 or
67 File system images in the cloop2 format are intended to be used with the
69 driver in compressed mode as configured by the
73 program, and later mounted with the appropriate
78 The following options are available:
79 .Bl -tag -width indent
81 Always compress, even if the program was started as
84 Always uncompress (decompress), even if the program was started as
92 utilities exit with one of the following values:
95 The operation was performed successfully.
100 To compress an existing CD-ROM file system image, run the following
102 .Bd -literal -offset indent
103 # vndcompress netbsd.iso netbsd.izo
106 Note that the resulting compressed image cannot be mounted directly
113 Instead, you will have to use the
118 The following example decompresses an existing CD-ROM file system
119 image that was compressed in the cloop2 format into a regular
120 file that can then be mounted:
121 .Bd -literal -offset indent
122 # vnconfig vnd0 KNOPPIX.iso
123 # mount -t cd9660 -o ro /dev/vnd0d /mnt
124 # vnduncompress /mnt/KNOPPIX/KNOPPIX /var/tmp/knoppix.iso
128 # vnconfig vnd1 /var/tmp/knoppix.iso
129 # mount -t cd9660 -o ro /dev/vnd1d /mnt
131 \&.rr_moved cdrom floppy lib opt sbin usr
132 bin dev home mnt proc sys var
133 boot etc initrd none root tmp vmlinuz
138 As an alternative, if your
141 .Dv VND_COMPRESSION ,
144 to access the cloop-compressed image directly, e.g.,
145 .Bd -literal -offset indent
146 # vnconfig vnd0 KNOPPIX.iso
147 # mount -t cd9660 -o ro /dev/vnd0d /mnt
148 # vnconfig -z vnd1 /mnt/KNOPPIX/KNOPPIX
149 # mount -t cd9660 -o ro /dev/vnd1d /mnt2
151 \&.rr_moved cdrom floppy lib opt sbin usr
152 bin dev home mnt proc sys var
153 boot etc initrd none root tmp vmlinuz
155 Filesystem Size Used Avail Capacity Mounted on
156 /dev/vnd0a 692M 692M 0B 100% /mnt
157 /dev/vnd1a 1.9G 1.9G 0B 100% /mnt2
164 Note how the 1.9GB big filesystem on
166 is mounted from the compressed file stored on the 692MB CD mounted
169 To create a compressed file system image of an existing
170 directory and mount it, run:
171 .Bd -literal -offset indent
172 # makefs -t ffs include.fs /usr/include
173 # vndcompress include.fs include.fs.cloop2
174 # vnconfig -z vnd0 include.fs.cloop2
175 # mount -o ro /dev/vnd0a /mnt
179 To undo the steps, run:
180 .Bd -literal -offset indent
183 # rm /tmp/include.fs.cloop2
196 utility was written by
198 .Aq netbsd@wolfnode.de .
201 manual page was written by
203 .Aq netbsd@wolfnode.de
206 .Aq hubertf@NetBSD.org .