]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/usr.bin/mkuzip/mkuzip.8
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / 6 / usr.bin / mkuzip / mkuzip.8
1 .\" ----------------------------------------------------------------------------
2 .\" "THE BEER-WARE LICENSE" (Revision 42):
3 .\" <sobomax@FreeBSD.ORG> wrote this file. As long as you retain this notice you
4 .\" can do whatever you want with this stuff. If we meet some day, and you think
5 .\" this stuff is worth it, you can buy me a beer in return.       Maxim Sobolev
6 .\" ----------------------------------------------------------------------------
7 .\"
8 .\" $FreeBSD$
9 .\"
10 .Dd September 10, 2004
11 .Dt MKUZIP 8
12 .Os
13 .Sh NAME
14 .Nm mkuzip
15 .Nd compress disk image for use with
16 .Xr geom_uzip 4
17 class
18 .Sh SYNOPSIS
19 .Nm
20 .Op Fl v
21 .Op Fl o Ar outfile
22 .Op Fl s Ar cluster_size
23 .Ar infile
24 .Sh DESCRIPTION
25 The
26 .Nm
27 utility compresses a disk image file in such a way that the
28 .Xr geom_uzip 4
29 class will be able to decompress resulting image in run-time.
30 This allows for significant reduction of size of disk image at
31 the expense of some CPU time required to decompress the data each
32 time it is read.
33 Internally, operation is done in two phases as follows:
34 .Bl -enum
35 .It
36 An
37 .Ar infile
38 image is split into clusters and each cluster compressed using
39 .Xr zlib 3 .
40 .It
41 Resulting set of compressed clusters along with headers allowing to
42 independently locate each individual cluster is written into
43 output file.
44 .El
45 .Pp
46 The options are:
47 .Bl -tag -width indent
48 .It Fl o Ar outfile
49 Name the output file
50 .Ar outfile .
51 The default is to use the input name with the suffix
52 .Pa .uzip .
53 .It Fl s Ar cluster_size
54 Use
55 .Ar cluster_size
56 as the size of chunks the file being split up into.
57 Default value is 16384 bytes.
58 The
59 .Ar cluster_size
60 should be a multiple of 512 bytes.
61 .It Fl v
62 Display verbose messages.
63 .El
64 .Sh NOTES
65 Compression ratio largely depends on the cluster size used.
66 For large cluster sizes (16K and higher), typical compression ratios
67 are only 1-2% less than those achieved with the
68 .Xr gzip 1
69 utlity.
70 However, it should be kept in mind that larger cluster
71 sizes lead to higher overhead in the
72 .Xr geom_uzip 4
73 class, as the class has to decompress the whole cluster even if
74 only several bytes from that cluster have to be read.
75 .Pp
76 The
77 .Nm
78 inserts tiny shell script at the beginning of the generated image,
79 which makes it possible to
80 .Dq run
81 the image just like any other shell script.
82 This script tries
83 to load
84 .Xr geom_uzip 4
85 class if it is not loaded, configure image as an
86 .Xr md 4
87 disk device using
88 .Xr mdconfig 8
89 utility, and automatically mount it using
90 .Xr mount_cd9660 8
91 utility to the mount point provided as a first argument.
92 .Sh EXIT STATUS
93 .Ex -std
94 .Sh SEE ALSO
95 .Xr gzip 1 ,
96 .Xr zlib 3 ,
97 .Xr geom 4 ,
98 .Xr geom_uzip 4 ,
99 .Xr md 4 ,
100 .Xr mdconfig 8 ,
101 .Xr mount_cd9660 8
102 .Sh AUTHORS
103 .An Maxim Sobolev Aq sobomax@FreeBSD.org