Deleted Added
full compact
makefs.8 (210933) makefs.8 (214921)
1.\" $NetBSD: makefs.8,v 1.13 2004/02/13 17:56:18 wiz Exp $
1.\" $NetBSD: makefs.8,v 1.32 2009/01/20 20:47:25 bjh21 Exp $
2.\"
3.\" Copyright (c) 2001-2003 Wasabi Systems, Inc.
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

--- 18 unchanged lines hidden (view full) ---

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.\"
2.\"
3.\" Copyright (c) 2001-2003 Wasabi Systems, Inc.
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

--- 18 unchanged lines hidden (view full) ---

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.\"
36.\" $FreeBSD: head/usr.sbin/makefs/makefs.8 210933 2010-08-06 14:33:42Z joel $
36.\" $FreeBSD: head/usr.sbin/makefs/makefs.8 214921 2010-11-07 16:05:04Z cognet $
37.\"
37.\"
38.Dd March 30, 2003
38.Dd January 10, 2009
39.Dt MAKEFS 8
40.Os
41.Sh NAME
42.Nm makefs
43.Nd create a file system image from a directory tree
44.Sh SYNOPSIS
45.Nm
39.Dt MAKEFS 8
40.Os
41.Sh NAME
42.Nm makefs
43.Nd create a file system image from a directory tree
44.Sh SYNOPSIS
45.Nm
46.Bk -words
47.Op Fl t Ar fs-type
48.Ek
49.Bk -words
50.Op Fl o Ar fs-options
51.Ek
52.Bk -words
53.Op Fl d Ar debug-mask
54.Ek
55.Bk -words
46.Op Fl x
56.Op Fl B Ar byte-order
47.Op Fl B Ar byte-order
57.Ek
58.Bk -words
59.Op Fl S Ar sector-size
60.Ek
61.Bk -words
62.Op Fl M Ar minimum-size
63.Ek
64.Bk -words
65.Op Fl m Ar maximum-size
66.Ek
67.Bk -words
68.Op Fl s Ar image-size
69.Ek
70.Bk -words
71.Op Fl b Ar free-blocks
48.Op Fl b Ar free-blocks
72.Ek
73.Bk -words
74.Op Fl f Ar free-files
75.Ek
76.Bk -words
49.Op Fl d Ar debug-mask
77.Op Fl F Ar specfile
50.Op Fl F Ar specfile
78.Ek
79.Op Fl x
80.Bk -words
51.Op Fl f Ar free-files
52.Op Fl M Ar minimum-size
53.Op Fl m Ar maximum-size
81.Op Fl N Ar userdb-dir
54.Op Fl N Ar userdb-dir
82.Ek
55.Op Fl o Ar fs-options
56.Op Fl S Ar sector-size
57.Op Fl s Ar image-size
58.Op Fl t Ar fs-type
83.Ar image-file
84.Ar directory
85.Sh DESCRIPTION
86The utility
87.Nm
88creates a file system image into
89.Ar image-file
90from the directory tree
91.Ar directory .
92No special devices or privileges are required to perform this task.
93.Pp
94The options are as follows:
95.Bl -tag -width flag
59.Ar image-file
60.Ar directory
61.Sh DESCRIPTION
62The utility
63.Nm
64creates a file system image into
65.Ar image-file
66from the directory tree
67.Ar directory .
68No special devices or privileges are required to perform this task.
69.Pp
70The options are as follows:
71.Bl -tag -width flag
96.It Fl t Ar fs-type
97Create an
98.Ar fs-type
99file system image.
100The following file system types are supported:
101.Bl -tag -width ffs -offset indent
102.It Sy ffs
103BSD fast file system (default).
104.El
105.It Fl o Ar fs-options
106Set file system specific options.
107.Ar fs-options
108is a comma separated list of options.
109Valid file system specific options are detailed below.
110.It Fl d Ar debug-mask
111Enable various levels of debugging, depending upon which bits are set
112in
113.Ar debug-mask .
114XXX: document these
115.It Fl B Ar byte-order
116Set the byte order of the image to
117.Ar byte-order .
118Valid byte orders are
119.Ql 4321 ,
72.It Fl B Ar byte-order
73Set the byte order of the image to
74.Ar byte-order .
75Valid byte orders are
76.Ql 4321 ,
120.Ql big
77.Ql big ,
121or
122.Ql be
123for big endian, and
124.Ql 1234 ,
78or
79.Ql be
80for big endian, and
81.Ql 1234 ,
125.Ql little
82.Ql little ,
126or
127.Ql le
128for little endian.
129Some file systems may have a fixed byte order; in those cases this
130argument will be ignored.
83or
84.Ql le
85for little endian.
86Some file systems may have a fixed byte order; in those cases this
87argument will be ignored.
131.It Fl S Ar sector-size
132Set the file system sector size to
133.Ar sector-size .
134Defaults to 512.
135.It Fl M Ar minimum-size
136Set the minimum size of the file system image to
137.Ar minimum-size .
138.It Fl m Ar maximum-size
139Set the maximum size of the file system image to
140.Ar maximum-size .
141An error will be raised if the target file system needs to be larger
142than this to accommodate the provided directory tree.
143.It Fl s Ar image-size
144Set the size of the file system image to
145.Ar image-size .
146.It Fl b Ar free-blocks
147Ensure that a minimum of
148.Ar free-blocks
149free blocks exist in the image.
150An optional
151.Ql %
152suffix may be provided to indicate that
153.Ar free-blocks
88.It Fl b Ar free-blocks
89Ensure that a minimum of
90.Ar free-blocks
91free blocks exist in the image.
92An optional
93.Ql %
94suffix may be provided to indicate that
95.Ar free-blocks
154indicates a percentage of the calculated image size
155.It Fl f Ar free-files
156Ensure that a minimum of
157.Ar free-files
158free files (inodes) exist in the image.
159An optional
160.Ql %
161suffix may be provided to indicate that
162.Ar free-files
163indicates a percentage of the calculated image size
96indicates a percentage of the calculated image size.
97.It Fl d Ar debug-mask
98Enable various levels of debugging, depending upon which bits are
99set in
100.Ar debug-mask .
101XXX: document these
164.It Fl F Ar specfile
165Use
166.Ar specfile
167as an
168.Xr mtree 8
169.Sq specfile
170specification.
171.Pp
102.It Fl F Ar specfile
103Use
104.Ar specfile
105as an
106.Xr mtree 8
107.Sq specfile
108specification.
109.Pp
172If a specfile entry exists in the underlying file system, its permissions and
173modification time will be used unless specifically overridden by the specfile.
174An error will be raised if the type of entry in the specfile conflicts
175with that of an existing entry.
110If a specfile entry exists in the underlying file system, its
111permissions and modification time will be used unless specifically
112overridden by the specfile.
113An error will be raised if the type of entry in the specfile
114conflicts with that of an existing entry.
176.Pp
115.Pp
177In the opposite case
178(where a specfile entry does not have an entry in the underlying file system)
179the following occurs:
116In the opposite case (where a specfile entry does not have an entry
117in the underlying file system) the following occurs:
180If the specfile entry is marked
181.Sy optional ,
182the specfile entry is ignored.
118If the specfile entry is marked
119.Sy optional ,
120the specfile entry is ignored.
183Otherwise, the entry will be created in the image,
184and it is necessary to specify at least the following parameters
185in the specfile:
121Otherwise, the entry will be created in the image, and it is
122necessary to specify at least the following parameters in the
123specfile:
186.Sy type ,
187.Sy mode ,
124.Sy type ,
125.Sy mode ,
188.Sy gname
126.Sy gname ,
189or
190.Sy gid ,
191and
192.Sy uname
193or
194.Sy uid ,
195.Sy device
196(in the case of block or character devices), and
197.Sy link
198(in the case of symbolic links).
199If
200.Sy time
201isn't provided, the current time will be used.
202If
203.Sy flags
204isn't provided, the current file flags will be used.
205Missing regular file entries will be created as zero-length files.
127or
128.Sy gid ,
129and
130.Sy uname
131or
132.Sy uid ,
133.Sy device
134(in the case of block or character devices), and
135.Sy link
136(in the case of symbolic links).
137If
138.Sy time
139isn't provided, the current time will be used.
140If
141.Sy flags
142isn't provided, the current file flags will be used.
143Missing regular file entries will be created as zero-length files.
206.It Fl x
207Exclude file system nodes not explicitly listed in the specfile.
144.It Fl f Ar free-files
145Ensure that a minimum of
146.Ar free-files
147free files (inodes) exist in the image.
148An optional
149.Ql %
150suffix may be provided to indicate that
151.Ar free-files
152indicates a percentage of the calculated image size.
153.It Fl M Ar minimum-size
154Set the minimum size of the file system image to
155.Ar minimum-size .
156.It Fl m Ar maximum-size
157Set the maximum size of the file system image to
158.Ar maximum-size .
159An error will be raised if the target file system needs to be larger
160than this to accommodate the provided directory tree.
208.It Fl N Ar dbdir
209Use the user database text file
210.Pa master.passwd
211and group database text file
212.Pa group
213from
214.Ar dbdir ,
215rather than using the results from the system's
216.Xr getpwnam 3
217and
218.Xr getgrnam 3
219(and related) library calls.
161.It Fl N Ar dbdir
162Use the user database text file
163.Pa master.passwd
164and group database text file
165.Pa group
166from
167.Ar dbdir ,
168rather than using the results from the system's
169.Xr getpwnam 3
170and
171.Xr getgrnam 3
172(and related) library calls.
173.It Fl o Ar fs-options
174Set file system specific options.
175.Ar fs-options
176is a comma separated list of options.
177Valid file system specific options are detailed below.
178.It Fl S Ar sector-size
179Set the file system sector size to
180.Ar sector-size .
181.\" XXX: next line also true for cd9660?
182Defaults to 512.
183.It Fl s Ar image-size
184Set the size of the file system image to
185.Ar image-size .
186.It Fl t Ar fs-type
187Create an
188.Ar fs-type
189file system image.
190The following file system types are supported:
191.Bl -tag -width cd9660 -offset indent
192.It Sy ffs
193BSD fast file system (default).
194.It Sy cd9660
195ISO 9660 file system.
220.El
196.El
197.It Fl x
198Exclude file system nodes not explicitly listed in the specfile.
199.El
221.Pp
222Where sizes are specified, a decimal number of bytes is expected.
223Two or more numbers may be separated by an
224.Dq x
225to indicate a product.
226Each number may have one of the following optional suffixes:
227.Bl -tag -width 3n -offset indent -compact
228.It b
229Block; multiply by 512
230.It k
200.Pp
201Where sizes are specified, a decimal number of bytes is expected.
202Two or more numbers may be separated by an
203.Dq x
204to indicate a product.
205Each number may have one of the following optional suffixes:
206.Bl -tag -width 3n -offset indent -compact
207.It b
208Block; multiply by 512
209.It k
231Kilo; multiply by 1024 (1 KB)
210Kibi; multiply by 1024 (1 KiB)
232.It m
211.It m
233Mega; multiply by 1048576 (1 MB)
212Mebi; multiply by 1048576 (1 MiB)
234.It g
213.It g
235Giga; multiply by 1073741824 (1 GB)
214Gibi; multiply by 1073741824 (1 GiB)
236.It t
215.It t
237Tera; multiply by 1099511627776 (1 TB)
216Tebi; multiply by 1099511627776 (1 TiB)
238.It w
239Word; multiply by the number of bytes in an integer
240.El
241.\"
242.\"
243.Ss FFS-specific options
244.Sy ffs
245images have ffs-specific optional parameters that may be provided.
217.It w
218Word; multiply by the number of bytes in an integer
219.El
220.\"
221.\"
222.Ss FFS-specific options
223.Sy ffs
224images have ffs-specific optional parameters that may be provided.
246Each of the options consists of a keyword, an equals sign
225Each of the options consists of a keyword, an equal sign
247.Pq Ql = ,
248and a value.
249The following keywords are supported:
250.Pp
251.Bl -tag -width optimization -offset indent -compact
252.It Sy avgfilesize
226.Pq Ql = ,
227and a value.
228The following keywords are supported:
229.Pp
230.Bl -tag -width optimization -offset indent -compact
231.It Sy avgfilesize
253Expected average file size
232Expected average file size.
254.It Sy avgfpdir
233.It Sy avgfpdir
255Expected number of files per directory
234Expected number of files per directory.
256.It Sy bsize
235.It Sy bsize
257Block size
236Block size.
258.It Sy density
237.It Sy density
259Bytes per inode
238Bytes per inode.
260.It Sy fsize
239.It Sy fsize
261Fragment size
240Fragment size.
262.It Sy maxbpg
241.It Sy maxbpg
263Maximum blocks per file in a cylinder group
242Maximum blocks per file in a cylinder group.
264.It Sy minfree
243.It Sy minfree
265Minimum % free
244Minimum % free.
266.It Sy optimization
267Optimization preference; one of
268.Ql space
269or
270.Ql time .
271.It Sy extent
245.It Sy optimization
246Optimization preference; one of
247.Ql space
248or
249.Ql time .
250.It Sy extent
272Maximum extent size
251Maximum extent size.
273.It Sy maxbpcg
252.It Sy maxbpcg
274Maximum total number of blocks in a cylinder group
253Maximum total number of blocks in a cylinder group.
275.It Sy version
254.It Sy version
276UFS version. 1 for FFS (default), 2 for UFS2
255UFS version.
2561 for FFS (default), 2 for UFS2.
277.El
257.El
258.Ss CD9660-specific options
259.Sy cd9660
260images have ISO9660-specific optional parameters that may be
261provided.
262The arguments consist of a keyword and, optionally, an equal sign
263.Pq Ql = ,
264and a value.
265The following keywords are supported:
266.Pp
267.Bl -tag -width omit-trailing-period -offset indent -compact
268.It Sy allow-deep-trees
269Allow the directory structure to exceed the maximum specified in
270the spec.
271.\" .It Sy allow-illegal-chars
272.\" Unknown
273.\" .It Sy allow-lowercase
274.\" Unknown
275.It Sy allow-max-name
276Allow 37 instead of 33 characters for filenames by omitting the
277version id.
278.It Sy allow-multidot
279Allow multiple dots in a filename.
280.It Sy applicationid
281Application ID of the image.
282.It Sy archimedes
283Use the
284.Ql ARCHIMEDES
285extension to encode
286.Tn RISC OS
287metadata.
288.It Sy boot-load-segment
289Set load segment for the boot image.
290.It Sy bootimage
291Filename of a boot image in the format
292.Dq sysid;filename ,
293where
294.Dq sysid
295is one of
296.Ql i386 ,
297.Ql mac68k ,
298.Ql macppc ,
299or
300.Ql powerpc .
301.It Sy generic-bootimage
302Load a generic boot image into the first 32K of the cd9660 image.
303.It Sy hard-disk-boot
304Boot image is a hard disk image.
305.It Sy keep-bad-images
306Don't throw away images whose write was aborted due to an error.
307For debugging purposes.
308.It Sy label
309Label name of the image.
310.It Sy no-boot
311Boot image is not bootable.
312.It Sy no-emul-boot
313Boot image is a
314.Dq no emulation
315ElTorito image.
316.It Sy no-trailing-padding
317Do not pad the image (apparently Linux needs the padding).
318.\" .It Sy omit-trailing-period
319.\" Unknown
320.It Sy preparer
321Preparer ID of the image.
322.It Sy publisher
323Publisher ID of the image.
324.It Sy rockridge
325Use RockRidge extensions (for longer filenames, etc.).
326.It Sy volumeid
327Volume set identifier of the image.
328.El
278.Sh SEE ALSO
279.Xr mtree 8 ,
280.Xr newfs 8
281.Sh HISTORY
282The
283.Nm
284utility appeared in
285.Nx 1.6 .
286.Sh AUTHORS
287.An Luke Mewburn
329.Sh SEE ALSO
330.Xr mtree 8 ,
331.Xr newfs 8
332.Sh HISTORY
333The
334.Nm
335utility appeared in
336.Nx 1.6 .
337.Sh AUTHORS
338.An Luke Mewburn
288.Aq lukem@NetBSD.org .
339.Aq lukem@NetBSD.org
340(original program)
341.An Daniel Watt ,
342.An Walter Deignan ,
343.An Ryan Gabrys ,
344.An Alan Perez-Rathke ,
345.An Ram Vedam
346(cd9660 support)