vndcompress(1) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
VNDCOMPRESS(1)          NetBSD General Commands Manual          VNDCOMPRESS(1)


NAME
vndcompress, vnduncompress -- compress/uncompress file system images to/from cloop2 format
SYNOPSIS
vndcompress [-cd] disk/fs-image compressed-image [blocksize] vnduncompress [-cd] compressed-image disk/fs-image
DESCRIPTION
The vndcompress program compresses an existing file system image into a cloop2 compatible compressed file system image. An optional blocksize can be given. If omitted, the default of 64kB is used. The vnduncompress command decompress a cloop2-compressed file system image back into a regular image. The file system images that can be handled are not limited to any spe- cific file system, i.e. it is possible to handle images e.g. in ISO 9660 or UFS/FFS format. File system images in the cloop2 format are intended to be used with the vnd(4) driver in compressed mode as configured by the -z option of the vnconfig(8) program, and later mounted with the appro- priate -t option to mount(8).
OPTIONS
The following options are available: -c Always compress, even if the program was started as vnduncompress. -d Always uncompress (decompress), even if the program was started as vndcompress.
EXIT STATUS
The vndcompress and vnduncompress utilities exit with one of the follow- ing values: 0 The operation was performed successfully. 1 An error occurred.
EXAMPLES
To compress an existing CD-ROM file system image, run the following com- mands: # vndcompress netbsd.iso netbsd.izo Note that the resulting compressed image cannot be mounted directly via NetBSD's vnd(4) and mount_cd9660(8) commands any longer. Instead, you will have to use the -z option of vnconfig(8). The following example decompresses an existing CD-ROM file system image that was compressed in the cloop2 format into a regular file that can then be mounted: # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnduncompress /mnt/KNOPPIX/KNOPPIX /var/tmp/knoppix.iso # umount /mnt # vnconfig -u vnd0 # # vnconfig vnd1 /var/tmp/knoppix.iso # mount -t cd9660 -o ro /dev/vnd1d /mnt # ls /mnt .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # umount /mnt # vnconfig -u vnd1 As an alternative, if your vnd(4) was compiled with VND_COMPRESSION, you can use vnconfig(8) to access the cloop-compressed image directly, e.g., # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnconfig -z vnd1 /mnt/KNOPPIX/KNOPPIX # mount -t cd9660 -o ro /dev/vnd1d /mnt2 # ls /mnt2 .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # df /mnt /mnt2 Filesystem Size Used Avail Capacity Mounted on /dev/vnd0a 692M 692M 0B 100% /mnt /dev/vnd1a 1.9G 1.9G 0B 100% /mnt2 # umount /mnt2 # vnconfig -u vnd1 # umount /mnt # vnconfig -u vnd0 Note how the 1.9GB big filesystem on /mnt2 is mounted from the compressed file stored on the 692MB CD mounted on /mnt. To create a compressed file system image of an existing directory and mount it, run: # makefs -t ffs include.fs /usr/include # vndcompress include.fs include.fs.cloop2 # vnconfig -z vnd0 include.fs.cloop2 # mount -o ro /dev/vnd0a /mnt # ls /mnt To undo the steps, run: # umount /mnt # vnconfig -u vnd0 # rm /tmp/include.fs.cloop2 # rm /tmp/include.fs
SEE ALSO
gzip(1), vnd(4), mount(8), mount_cd9660(8), vnconfig(8)
AUTHORS
The vndcompress utility was written by Florian Stoehr <netbsd@wolfnode.de>. The vndcompress manual page was written by Florian Stoehr <netbsd@wolfnode.de> and Hubert Feyrer <hubertf@NetBSD.org>. NetBSD 6.0 December 12, 2005 NetBSD 6.0
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.