Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #786
Difficulty: Medium
In 2019, Bill Gates had a net worth estimated to be over $200 billion USD.
True or False?
Linux & Unix Commands - Search Man Pages

mkuzip(8) [freebsd man page]

MKUZIP(8)						    BSD System Manager's Manual 						 MKUZIP(8)

mkuzip -- compress disk image for use with geom_uzip(4) class SYNOPSIS
mkuzip [-v] [-o outfile] [-s cluster_size] infile DESCRIPTION
The mkuzip utility compresses a disk image file so that the geom_uzip(4) class will be able to decompress the resulting image at run-time. This allows for a significant reduction of size of disk image at the expense of some CPU time required to decompress the data each time it is read. The mkuzip utility works in two phases: 1. An infile image is split into clusters; each cluster is compressed using zlib(3). 2. The resulting set of compressed clusters along with headers that allow locating each individual cluster is written to the output file. The options are: -o outfile Name of the output file outfile. The default is to use the input name with the suffix .uzip. -s cluster_size Split the image into clusters of cluster_size bytes, 16384 bytes by default. The cluster_size should be a multiple of 512 bytes. -v Display verbose messages. NOTES
The compression ratio largely depends on the cluster size used. For large cluster sizes (16K and higher), typical compression ratios are only 1-2% less than those achieved with gzip(1). However, it should be kept in mind that larger cluster sizes lead to higher overhead in the geom_uzip(4) class, as the class has to decompress the whole cluster even if only a few bytes from that cluster have to be read. The mkuzip utility inserts a short shell script at the beginning of the generated image, which makes it possible to ``run'' the image just like any other shell script. The script tries to load the geom_uzip(4) class if it is not loaded, configure the image as an md(4) disk device using mdconfig(8), and automatically mount it using mount_cd9660(8) on the mount point provided as the first argument to the script. EXIT STATUS
The mkuzip utility exits 0 on success, and >0 if an error occurs. SEE ALSO
gzip(1), zlib(3), geom(4), geom_uzip(4), md(4), mdconfig(8), mount_cd9660(8) AUTHORS
Maxim Sobolev <> BSD
March 17, 2006 BSD

Check Out this Related Man Page

KGZIP(8)						    BSD System Manager's Manual 						  KGZIP(8)

kgzip -- compress a kernel SYNOPSIS
kgzip [-cv] [-f format] [-l loader] [-o output] file DESCRIPTION
The kgzip utility compresses a kernel or some other bootable binary. Operation is in two phases as follows: 1. A load image of the executable file is built which omits all but the 'text' and 'data' segments. This image is compressed using gzip(1) and output as data in relocatable object format. 2. The object file is linked with a special self-hosting loader, producing an executable suitable for booting with either the second- or third-level bootstraps. Supported object formats are 32-bit ELF and a.out ZMAGIC. If the file operand has a '.o' suffix, input is assumed to be for the link phase, and the first phase is omitted. The options are: -c Omit the link phase. -v Display object file information. -f format Use format as the output format, where format is 'aout' or 'elf'. The default format is ELF. -l loader Link loader as the loader. -o output Name the output file output. The default is to use the input name with the suffix '.o' (for relocatables) or '.kgz' (for exe- cutables). NOTES
Global variables equivalent to the following are defined in the output: struct kgz_hdr { char ident[4]; /* identification: "KGZ" */ uint32_t dload; /* decoded image load address */ uint32_t dsize; /* decoded image size */ uint32_t isize; /* image size in memory */ uint32_t entry; /* entry point */ uint32_t nsize; /* encoded image size */ } kgz; uint8_t kgz_ndata[]; /* encoded data */ The encoded data is simply gzip(1) output: a header (with no optional fields); compressed data; and 32-bit CRC and size values. FILES
/usr/lib/kgzldr.o The default loader EXIT STATUS
The kgzip utility exits 0 on success, and >0 if an error occurs. SEE ALSO
gzip(1), ld(1), a.out(5), elf(5), boot(8), loader(8) AUTHORS
Robert Nordier <> BUGS
As symbols are lost, the usefulness of this utility for compressing kernels is limited to situations where loader(8) cannot be used; other- wise the preferred method of compressing a kernel is simply to gzip(1) it. BSD
July 19, 1999 BSD

Featured Tech Videos