aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/makefs/makefs.8
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/makefs/makefs.8')
-rw-r--r--usr.sbin/makefs/makefs.8278
1 files changed, 168 insertions, 110 deletions
diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8
index e0924d5b1d05..974477c74f98 100644
--- a/usr.sbin/makefs/makefs.8
+++ b/usr.sbin/makefs/makefs.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: makefs.8,v 1.13 2004/02/13 17:56:18 wiz Exp $
+.\" $NetBSD: makefs.8,v 1.32 2009/01/20 20:47:25 bjh21 Exp $
.\"
.\" Copyright (c) 2001-2003 Wasabi Systems, Inc.
.\" All rights reserved.
@@ -35,7 +35,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 30, 2003
+.Dd January 10, 2009
.Dt MAKEFS 8
.Os
.Sh NAME
@@ -43,43 +43,19 @@
.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 x
.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 d Ar debug-mask
.Op Fl F Ar specfile
-.Ek
-.Op Fl x
-.Bk -words
+.Op Fl f Ar free-files
+.Op Fl M Ar minimum-size
+.Op Fl m Ar maximum-size
.Op Fl N Ar userdb-dir
-.Ek
+.Op Fl o Ar fs-options
+.Op Fl S Ar sector-size
+.Op Fl s Ar image-size
+.Op Fl t Ar fs-type
.Ar image-file
.Ar directory
.Sh DESCRIPTION
@@ -93,56 +69,22 @@ 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 4321 ,
-.Ql big
+.Ql big ,
or
.Ql be
for big endian, and
.Ql 1234 ,
-.Ql little
+.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 accommodate 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
@@ -151,16 +93,12 @@ 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-files
-indicates a percentage of the calculated image size
+indicates a percentage of the calculated image size.
+.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 F Ar specfile
Use
.Ar specfile
@@ -169,23 +107,23 @@ as an
.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.
+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
-In the opposite case
-(where a specfile entry does not have an entry in the underlying file system)
-the following occurs:
+In the opposite case (where a specfile entry does not have an entry
+in the underlying file system) the following occurs:
If the specfile entry is marked
.Sy optional ,
the specfile entry is ignored.
-Otherwise, the entry will be created in the image,
-and it is necessary to specify at least the following parameters
-in the specfile:
+Otherwise, the entry will be created in the image, and it is
+necessary to specify at least the following parameters in the
+specfile:
.Sy type ,
.Sy mode ,
-.Sy gname
+.Sy gname ,
or
.Sy gid ,
and
@@ -203,8 +141,23 @@ If
.Sy flags
isn't provided, the current file flags will be used.
Missing regular file entries will be created as zero-length files.
-.It Fl x
-Exclude file system nodes not explicitly listed in the specfile.
+.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-files
+indicates a percentage of the calculated image size.
+.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 accommodate the provided directory tree.
.It Fl N Ar dbdir
Use the user database text file
.Pa master.passwd
@@ -217,6 +170,32 @@ rather than using the results from the system's
and
.Xr getgrnam 3
(and related) library calls.
+.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 S Ar sector-size
+Set the file system sector size to
+.Ar sector-size .
+.\" XXX: next line also true for cd9660?
+Defaults to 512.
+.It Fl s Ar image-size
+Set the size of the file system image to
+.Ar image-size .
+.It Fl t Ar fs-type
+Create an
+.Ar fs-type
+file system image.
+The following file system types are supported:
+.Bl -tag -width cd9660 -offset indent
+.It Sy ffs
+BSD fast file system (default).
+.It Sy cd9660
+ISO 9660 file system.
+.El
+.It Fl x
+Exclude file system nodes not explicitly listed in the specfile.
.El
.Pp
Where sizes are specified, a decimal number of bytes is expected.
@@ -228,13 +207,13 @@ Each number may have one of the following optional suffixes:
.It b
Block; multiply by 512
.It k
-Kilo; multiply by 1024 (1 KB)
+Kibi; multiply by 1024 (1 KiB)
.It m
-Mega; multiply by 1048576 (1 MB)
+Mebi; multiply by 1048576 (1 MiB)
.It g
-Giga; multiply by 1073741824 (1 GB)
+Gibi; multiply by 1073741824 (1 GiB)
.It t
-Tera; multiply by 1099511627776 (1 TB)
+Tebi; multiply by 1099511627776 (1 TiB)
.It w
Word; multiply by the number of bytes in an integer
.El
@@ -243,37 +222,109 @@ Word; multiply by the number of bytes in an integer
.Ss FFS-specific options
.Sy ffs
images have ffs-specific optional parameters that may be provided.
-Each of the options consists of a keyword, an equals sign
+Each of the options consists of a keyword, an equal 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
+Expected average file size.
.It Sy avgfpdir
-Expected number of files per directory
+Expected number of files per directory.
.It Sy bsize
-Block size
+Block size.
.It Sy density
-Bytes per inode
+Bytes per inode.
.It Sy fsize
-Fragment size
+Fragment size.
.It Sy maxbpg
-Maximum blocks per file in a cylinder group
+Maximum blocks per file in a cylinder group.
.It Sy minfree
-Minimum % free
+Minimum % free.
.It Sy optimization
Optimization preference; one of
.Ql space
or
.Ql time .
.It Sy extent
-Maximum extent size
+Maximum extent size.
.It Sy maxbpcg
-Maximum total number of blocks in a cylinder group
+Maximum total number of blocks in a cylinder group.
.It Sy version
-UFS version. 1 for FFS (default), 2 for UFS2
+UFS version.
+1 for FFS (default), 2 for UFS2.
+.El
+.Ss CD9660-specific options
+.Sy cd9660
+images have ISO9660-specific optional parameters that may be
+provided.
+The arguments consist of a keyword and, optionally, an equal sign
+.Pq Ql = ,
+and a value.
+The following keywords are supported:
+.Pp
+.Bl -tag -width omit-trailing-period -offset indent -compact
+.It Sy allow-deep-trees
+Allow the directory structure to exceed the maximum specified in
+the spec.
+.\" .It Sy allow-illegal-chars
+.\" Unknown
+.\" .It Sy allow-lowercase
+.\" Unknown
+.It Sy allow-max-name
+Allow 37 instead of 33 characters for filenames by omitting the
+version id.
+.It Sy allow-multidot
+Allow multiple dots in a filename.
+.It Sy applicationid
+Application ID of the image.
+.It Sy archimedes
+Use the
+.Ql ARCHIMEDES
+extension to encode
+.Tn RISC OS
+metadata.
+.It Sy boot-load-segment
+Set load segment for the boot image.
+.It Sy bootimage
+Filename of a boot image in the format
+.Dq sysid;filename ,
+where
+.Dq sysid
+is one of
+.Ql i386 ,
+.Ql mac68k ,
+.Ql macppc ,
+or
+.Ql powerpc .
+.It Sy generic-bootimage
+Load a generic boot image into the first 32K of the cd9660 image.
+.It Sy hard-disk-boot
+Boot image is a hard disk image.
+.It Sy keep-bad-images
+Don't throw away images whose write was aborted due to an error.
+For debugging purposes.
+.It Sy label
+Label name of the image.
+.It Sy no-boot
+Boot image is not bootable.
+.It Sy no-emul-boot
+Boot image is a
+.Dq no emulation
+ElTorito image.
+.It Sy no-trailing-padding
+Do not pad the image (apparently Linux needs the padding).
+.\" .It Sy omit-trailing-period
+.\" Unknown
+.It Sy preparer
+Preparer ID of the image.
+.It Sy publisher
+Publisher ID of the image.
+.It Sy rockridge
+Use RockRidge extensions (for longer filenames, etc.).
+.It Sy volumeid
+Volume set identifier of the image.
.El
.Sh SEE ALSO
.Xr mtree 8 ,
@@ -285,4 +336,11 @@ utility appeared in
.Nx 1.6 .
.Sh AUTHORS
.An Luke Mewburn
-.Aq lukem@NetBSD.org .
+.Aq lukem@NetBSD.org
+(original program)
+.An Daniel Watt ,
+.An Walter Deignan ,
+.An Ryan Gabrys ,
+.An Alan Perez-Rathke ,
+.An Ram Vedam
+(cd9660 support)