de8b3ad2c7
It doesn't need any special privileges or kernel devices. Only ffs image creation is supported at this time, although makefs has been designed to allow the addition of other file system formats by writing new back-ends. This program was designed & implemented by Luke Mewburn of Wasabi Systems.
258 lines
6.3 KiB
Groff
258 lines
6.3 KiB
Groff
.\" $NetBSD: makefs.8,v 1.1.1.1 2001/10/26 07:40:18 lukem Exp $
|
|
.\"
|
|
.\" Copyright 2001 Wasabi Systems, Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Written by Luke Mewburn for Wasabi Systems, Inc.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed for the NetBSD Project by
|
|
.\" Wasabi Systems, Inc.
|
|
.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
|
|
.\" or promote products derived from this software without specific prior
|
|
.\" written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.Dd October 26, 2001
|
|
.Dt MAKEFS 8
|
|
.Os
|
|
.Sh NAME
|
|
.Nm makefs
|
|
.Nd create a file system image from a directory tree
|
|
.Sh SYNOPSIS
|
|
.Nm ""
|
|
.Bk -words
|
|
.Op Fl t Ar fs-type
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl o Ar fs-options
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl d Ar debug-mask
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl B Ar byte-order
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl S Ar sector-size
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl M Ar minimum-size
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl m Ar maximum-size
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl s Ar image-size
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl b Ar free-blocks
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl f Ar free-files
|
|
.Ek
|
|
.Bk -words
|
|
.Op Fl F Ar specfile
|
|
.Ek
|
|
.Ar image-file
|
|
.Ar directory
|
|
.Sh DESCRIPTION
|
|
The utility
|
|
.Nm
|
|
creates a file system image into
|
|
.Ar image-file
|
|
from the directory tree
|
|
.Ar directory .
|
|
No special devices or privileges are required to perform this task.
|
|
.Pp
|
|
The options are as follows:
|
|
.Bl -tag -width flag
|
|
.It Fl t Ar fs-type
|
|
Create an
|
|
.Ar fs-type
|
|
file system image.
|
|
The following file system types are supported:
|
|
.Bl -tag -width ffs -offset indent
|
|
.It Sy ffs
|
|
BSD fast file system (default).
|
|
.El
|
|
.It Fl o Ar fs-options
|
|
Set file system specific options.
|
|
.Ar fs-options
|
|
is a comma separated list of options.
|
|
Valid file system specific options are detailed below.
|
|
.It Fl d Ar debug-mask
|
|
Enable various levels of debugging, depending upon which bits are set
|
|
in
|
|
.Ar debug-mask .
|
|
XXX: document these
|
|
.It Fl B Ar byte-order
|
|
Set the byte order of the image to
|
|
.Ar byte-order .
|
|
Valid byte orders are
|
|
.Ql big
|
|
or
|
|
.Ql be
|
|
for big endian, and
|
|
.Ql little
|
|
or
|
|
.Ql le
|
|
for little endian.
|
|
Some file systems may have a fixed byte order; in those cases this
|
|
argument will be ignored.
|
|
.It Fl S Ar sector-size
|
|
Set the file system sector size to
|
|
.Ar sector-size .
|
|
Defaults to 512.
|
|
.It Fl M Ar minimum-size
|
|
Set the minimum size of the file system image to
|
|
.Ar minimum-size .
|
|
.It Fl m Ar maximum-size
|
|
Set the maximum size of the file system image to
|
|
.Ar maximum-size .
|
|
An error will be raised if the target file system needs to be larger
|
|
than this to accomodate the provided directory tree.
|
|
.It Fl s Ar image-size
|
|
Set the size of the file system image to
|
|
.Ar image-size .
|
|
.It Fl b Ar free-blocks
|
|
Ensure that a minimum of
|
|
.Ar free-blocks
|
|
free blocks exist in the image.
|
|
An optional
|
|
.Ql %
|
|
suffix may be provided to indicate that
|
|
.Ar free-blocks
|
|
indicates a percentage of the calculated image size
|
|
.It Fl f Ar free-files
|
|
Ensure that a minimum of
|
|
.Ar free-files
|
|
free files (inodes) exist in the image.
|
|
An optional
|
|
.Ql %
|
|
suffix may be provided to indicate that
|
|
.Ar free-blocks
|
|
indicates a percentage of the calculated image size
|
|
.It Fl F Ar specfile
|
|
Use
|
|
.Ar specfile
|
|
as an
|
|
.Xr mtree 8
|
|
.Sq specfile
|
|
specification.
|
|
.Pp
|
|
If a specfile entry exists in the underlying file system, its permissions and
|
|
modification time will be used unless specifically overridden by the specfile.
|
|
An error will be raised if the type of entry in the specfile conflicts
|
|
with that of an existing entry.
|
|
.Pp
|
|
Otherwise, it is necessary to specify at least the following parameters
|
|
in the specfile:
|
|
.Sy type ,
|
|
.Sy mode ,
|
|
.Sy gname
|
|
or
|
|
.Sy gid ,
|
|
and
|
|
.Sy uname
|
|
or
|
|
.Sy uid ,
|
|
.Sy device
|
|
(in the case of block or character devices), and
|
|
.Sy link
|
|
(in the case of symbolic links).
|
|
If
|
|
.Sy time
|
|
isn't provided, the current time will be used.
|
|
If
|
|
.Sy flags
|
|
isn't provided, the current file flags will be used.
|
|
.El
|
|
.Pp
|
|
An optional suffix may be provided for numeric size arguments,
|
|
which changes the intrepretation of the argument as follows:
|
|
.Bl -tag -width 3n -offset indent -compact
|
|
.It b
|
|
Causes no modification. (Default; optional)
|
|
.It k
|
|
Kilo; multiply the argument by 1024
|
|
.It m
|
|
Mega; multiply the argument by 1048576
|
|
.It g
|
|
Giga; multiply the argument by 1073741824
|
|
.El
|
|
.\"
|
|
.\"
|
|
.Ss FFS-specific options
|
|
.Pp
|
|
.Sy ffs
|
|
images have ffs-specific optional parameters that may be provided.
|
|
Each of the options consists of a keyword, an equals sign
|
|
.Pq Ql = ,
|
|
and a value.
|
|
The following keywords are supported:
|
|
.Pp
|
|
.Bl -tag -width optimization -offset indent -compact
|
|
.It Sy avgfilesize
|
|
Expected average file size
|
|
.It Sy avgfpdir
|
|
Expected number of files per directory
|
|
.It Sy bsize
|
|
Block size
|
|
.It Sy cpg
|
|
Cylinders per group
|
|
.It Sy density
|
|
Bytes per inode
|
|
.It Sy fsize
|
|
Fragment size
|
|
.It Sy maxbpg
|
|
Maximum blocks per cylinder group
|
|
.It Sy minfree
|
|
Minimum % free
|
|
.It Sy nsectors
|
|
Number of sectors
|
|
.It Sy ntracks
|
|
Number of tracks
|
|
.It Sy optimization
|
|
Optimization preference; one of
|
|
.Ql space
|
|
or
|
|
.Ql time .
|
|
.It Sy rotdelay
|
|
Rotational delay
|
|
.It Sy rpm
|
|
Revolutions per minute
|
|
.It Sy nrpos
|
|
Number of rotational positions
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr mtree 8 ,
|
|
.Xr newfs 8
|
|
.Sh AUTHOR
|
|
Luke Mewburn <lukem@netbsd.org>
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
utility appeared in
|
|
.Nx 1.6 .
|