[BACK]Return to makefs.8 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.sbin / makefs

Annotation of src/usr.sbin/makefs/makefs.8, Revision 1.6

1.6     ! lukem       1: .\"    $NetBSD: makefs.8,v 1.5 2002/01/24 03:21:07 lukem Exp $
1.1       lukem       2: .\"
1.5       lukem       3: .\" Copyright (c) 2001-2002 Wasabi Systems, Inc.
1.1       lukem       4: .\" All rights reserved.
                      5: .\"
                      6: .\" Written by Luke Mewburn for Wasabi Systems, Inc.
                      7: .\"
                      8: .\" Redistribution and use in source and binary forms, with or without
                      9: .\" modification, are permitted provided that the following conditions
                     10: .\" are met:
                     11: .\" 1. Redistributions of source code must retain the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer.
                     13: .\" 2. Redistributions in binary form must reproduce the above copyright
                     14: .\"    notice, this list of conditions and the following disclaimer in the
                     15: .\"    documentation and/or other materials provided with the distribution.
                     16: .\" 3. All advertising materials mentioning features or use of this software
                     17: .\"    must display the following acknowledgement:
                     18: .\"      This product includes software developed for the NetBSD Project by
                     19: .\"      Wasabi Systems, Inc.
                     20: .\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
                     21: .\"    or promote products derived from this software without specific prior
                     22: .\"    written permission.
                     23: .\"
                     24: .\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
                     25: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
                     26: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
                     27: .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
                     28: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                     29: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                     30: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                     31: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                     32: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                     33: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     34: .\" POSSIBILITY OF SUCH DAMAGE.
                     35: .\"
1.6     ! lukem      36: .Dd February 8, 2002
1.1       lukem      37: .Dt MAKEFS 8
                     38: .Os
                     39: .Sh NAME
                     40: .Nm makefs
                     41: .Nd create a file system image from a directory tree
                     42: .Sh SYNOPSIS
                     43: .Nm ""
                     44: .Bk -words
                     45: .Op Fl t Ar fs-type
                     46: .Ek
                     47: .Bk -words
                     48: .Op Fl o Ar fs-options
                     49: .Ek
                     50: .Bk -words
                     51: .Op Fl d Ar debug-mask
                     52: .Ek
                     53: .Bk -words
                     54: .Op Fl B Ar byte-order
                     55: .Ek
                     56: .Bk -words
                     57: .Op Fl S Ar sector-size
                     58: .Ek
                     59: .Bk -words
                     60: .Op Fl M Ar minimum-size
                     61: .Ek
                     62: .Bk -words
                     63: .Op Fl m Ar maximum-size
                     64: .Ek
                     65: .Bk -words
                     66: .Op Fl s Ar image-size
                     67: .Ek
                     68: .Bk -words
                     69: .Op Fl b Ar free-blocks
                     70: .Ek
                     71: .Bk -words
                     72: .Op Fl f Ar free-files
                     73: .Ek
                     74: .Bk -words
                     75: .Op Fl F Ar specfile
                     76: .Ek
1.5       lukem      77: .Bk -words
                     78: .Op Fl N Ar userdb-dir
                     79: .Ek
1.1       lukem      80: .Ar image-file
                     81: .Ar directory
                     82: .Sh DESCRIPTION
                     83: The utility
                     84: .Nm
                     85: creates a file system image into
                     86: .Ar image-file
                     87: from the directory tree
                     88: .Ar directory .
                     89: No special devices or privileges are required to perform this task.
                     90: .Pp
                     91: The options are as follows:
                     92: .Bl -tag -width flag
                     93: .It Fl t Ar fs-type
                     94: Create an
                     95: .Ar fs-type
                     96: file system image.
                     97: The following file system types are supported:
                     98: .Bl -tag -width ffs -offset indent
                     99: .It Sy ffs
                    100: BSD fast file system (default).
                    101: .El
                    102: .It Fl o Ar fs-options
                    103: Set file system specific options.
                    104: .Ar fs-options
                    105: is a comma separated list of options.
                    106: Valid file system specific options are detailed below.
                    107: .It Fl d Ar debug-mask
                    108: Enable various levels of debugging, depending upon which bits are set
                    109: in
                    110: .Ar debug-mask .
                    111: XXX: document these
                    112: .It Fl B Ar byte-order
                    113: Set the byte order of the image to
                    114: .Ar byte-order .
                    115: Valid byte orders are
                    116: .Ql big
                    117: or
                    118: .Ql be
                    119: for big endian, and
                    120: .Ql little
                    121: or
                    122: .Ql le
                    123: for little endian.
                    124: Some file systems may have a fixed byte order; in those cases this
                    125: argument will be ignored.
                    126: .It Fl S Ar sector-size
                    127: Set the file system sector size to
                    128: .Ar sector-size .
                    129: Defaults to 512.
                    130: .It Fl M Ar minimum-size
                    131: Set the minimum size of the file system image to
                    132: .Ar minimum-size .
                    133: .It Fl m Ar maximum-size
                    134: Set the maximum size of the file system image to
                    135: .Ar maximum-size .
                    136: An error will be raised if the target file system needs to be larger
1.4       wiz       137: than this to accommodate the provided directory tree.
1.1       lukem     138: .It Fl s Ar image-size
                    139: Set the size of the file system image to
                    140: .Ar image-size .
                    141: .It Fl b Ar free-blocks
                    142: Ensure that a minimum of
                    143: .Ar free-blocks
                    144: free blocks exist in the image.
                    145: An optional
                    146: .Ql %
                    147: suffix may be provided to indicate that
                    148: .Ar free-blocks
                    149: indicates a percentage of the calculated image size
                    150: .It Fl f Ar free-files
                    151: Ensure that a minimum of
                    152: .Ar free-files
                    153: free files (inodes) exist in the image.
                    154: An optional
                    155: .Ql %
                    156: suffix may be provided to indicate that
                    157: .Ar free-blocks
                    158: indicates a percentage of the calculated image size
                    159: .It Fl F Ar specfile
                    160: Use
                    161: .Ar specfile
                    162: as an
                    163: .Xr mtree 8
                    164: .Sq specfile
                    165: specification.
                    166: .Pp
                    167: If a specfile entry exists in the underlying file system, its permissions and
                    168: modification time will be used unless specifically overridden by the specfile.
                    169: An error will be raised if the type of entry in the specfile conflicts
                    170: with that of an existing entry.
                    171: .Pp
1.6     ! lukem     172: In the opposite case
        !           173: (where a specfile entry does not have an entry in the underlying file system)
        !           174: the following occurs:
        !           175: If the specfile entry is marked
        !           176: .Sy optional ,
        !           177: the specfile entry is ignored.
        !           178: Otherwise, the entry will be created in the image,
        !           179: and it is necessary to specify at least the following parameters
1.1       lukem     180: in the specfile:
                    181: .Sy type ,
                    182: .Sy mode ,
                    183: .Sy gname
                    184: or
                    185: .Sy gid ,
                    186: and
                    187: .Sy uname
                    188: or
                    189: .Sy uid ,
                    190: .Sy device
                    191: (in the case of block or character devices), and
                    192: .Sy link
                    193: (in the case of symbolic links).
                    194: If
                    195: .Sy time
                    196: isn't provided, the current time will be used.
                    197: If
                    198: .Sy flags
                    199: isn't provided, the current file flags will be used.
1.6     ! lukem     200: Missing regular file entries will be created as zero-length files.
1.5       lukem     201: .It Fl N Ar dbdir
                    202: Use the user database text file
                    203: .Pa master.passwd
                    204: and group database text file
                    205: .Pa group
                    206: from
                    207: .Ar dbdir ,
                    208: rather than using the results from the system's
                    209: .Xr getpwnam 3
                    210: and
                    211: .Xr getgrnam 3
                    212: (and related) library calls.
1.1       lukem     213: .El
                    214: .Pp
1.3       lukem     215: Where sizes are specified, a decimal number of bytes is expected.
                    216: Two or more numbers may be separated by an
                    217: .Dq x
                    218: to indicate a product.
                    219: Each number may have one of the following optional suffices:
1.1       lukem     220: .Bl -tag -width 3n -offset indent -compact
                    221: .It b
1.3       lukem     222: Block; multiply by 512
1.1       lukem     223: .It k
1.3       lukem     224: Kilo; multiply by 1024 (1 KB)
1.1       lukem     225: .It m
1.3       lukem     226: Mega; multiply by 1048576 (1 MB)
1.1       lukem     227: .It g
1.3       lukem     228: Giga; multiply by 1073741824 (1 GB)
                    229: .It t
                    230: Tera; multiply by 1099511627776 (1 TB)
                    231: .It w
                    232: Word; multiply by the number of bytes in an integer
1.1       lukem     233: .El
                    234: .\"
                    235: .\"
                    236: .Ss FFS-specific options
                    237: .Sy ffs
                    238: images have ffs-specific optional parameters that may be provided.
                    239: Each of the options consists of a keyword, an equals sign
                    240: .Pq Ql = ,
                    241: and a value.
                    242: The following keywords are supported:
                    243: .Pp
                    244: .Bl -tag -width optimization -offset indent -compact
                    245: .It Sy avgfilesize
                    246: Expected average file size
                    247: .It Sy avgfpdir
                    248: Expected number of files per directory
                    249: .It Sy bsize
                    250: Block size
                    251: .It Sy cpg
                    252: Cylinders per group
                    253: .It Sy density
                    254: Bytes per inode
                    255: .It Sy fsize
                    256: Fragment size
                    257: .It Sy maxbpg
                    258: Maximum blocks per cylinder group
                    259: .It Sy minfree
                    260: Minimum % free
                    261: .It Sy nsectors
                    262: Number of sectors
                    263: .It Sy ntracks
                    264: Number of tracks
                    265: .It Sy optimization
                    266: Optimization preference; one of
                    267: .Ql space
                    268: or
                    269: .Ql time .
                    270: .It Sy rotdelay
                    271: Rotational delay
                    272: .It Sy rpm
                    273: Revolutions per minute
                    274: .It Sy nrpos
                    275: Number of rotational positions
                    276: .El
                    277: .Sh SEE ALSO
                    278: .Xr mtree 8 ,
                    279: .Xr newfs 8
                    280: .Sh HISTORY
                    281: The
                    282: .Nm
                    283: utility appeared in
                    284: .Nx 1.6 .
1.4       wiz       285: .Sh AUTHORS
                    286: .An Luke Mewburn Aq lukem@netbsd.org

CVSweb <webmaster@jp.NetBSD.org>