blob: 608903130baf841ad677ba652fb05c8105474e1b [file] [log] [blame]
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -05001.\" -*- nroff -*-
2.\" Copyright 2006 by Theodore Ts'o. All Rights Reserved.
3.\" This file may be copied under the terms of the GNU Public License.
4.\"
5.TH mke2fs.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6.SH NAME
7mke2fs.conf \- Configuration file for mke2fs
8.SH DESCRIPTION
9.I mke2fs.conf
10is the configuration file for
11.BR mke2fs (8).
12It controls the default parameters used by
13.BR mke2fs (8)
14when it is creating ext2 or ext3 filesystems.
15.PP
16The
17.I mke2fs.conf
Theodore Ts'ofac95252006-03-27 01:05:26 -050018file uses an INI-style format. Stanzas, or top-level sections, are
19delimited by square braces: [ ]. Within each section, each line
20defines a relation, which assigns tags to values, or to a subsection,
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050021which contains further relations or subsections.
22.\" Tags can be assigned multiple values
23An example of the INI-style format used by this configuration file
24follows below:
25.P
Theodore Ts'ofac95252006-03-27 01:05:26 -050026 [section1]
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050027.br
Theodore Ts'ofac95252006-03-27 01:05:26 -050028 tag1 = value_a
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050029.br
Theodore Ts'ofac95252006-03-27 01:05:26 -050030 tag1 = value_b
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050031.br
Theodore Ts'ofac95252006-03-27 01:05:26 -050032 tag2 = value_c
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050033.P
Theodore Ts'ofac95252006-03-27 01:05:26 -050034 [section 2]
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050035.br
Theodore Ts'ofac95252006-03-27 01:05:26 -050036 tag3 = {
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050037.br
Theodore Ts'ofac95252006-03-27 01:05:26 -050038 subtag1 = subtag_value_a
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050039.br
Theodore Ts'ofac95252006-03-27 01:05:26 -050040 subtag1 = subtag_value_b
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050041.br
Theodore Ts'ofac95252006-03-27 01:05:26 -050042 subtag2 = subtag_value_c
43.br
44 }
45.br
46 tag1 = value_d
47.br
48 tag2 = value_e
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050049.br
50 }
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050051.P
Theodore Ts'ofac95252006-03-27 01:05:26 -050052Comments are delimited by a semicolon (';') or a hash ('#') character
53at the beginning of the comment, and are terminated by the end of
54line character.
55.P
56Tags and values must be quoted using double quotes if they contain
57spaces. Within a quoted string, the standard backslash interpretations
58apply: "\en" (for the newline character),
59"\et" (for the tab character), "\eb" (for the backspace character),
60and "\e\e" (for the backslash character).
61.P
Theodore Ts'o9447f382006-05-22 17:59:37 -040062The following stanzas are used in the
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050063.I mke2fs.conf
64file. They will be described in more detail in future sections of this
65document.
66.TP
67.I [defaults]
68Contains relations which define the default parameters
69used by
70.BR mke2fs (8).
71In general, these defaults may be overridden by a definition in the
72.B fs_types
Theodore Ts'ofac95252006-03-27 01:05:26 -050073stanza, or by an command-line option provided by the user.
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050074.TP
75.I [fs_types]
76Contains relations which define defaults that should be used for specific
77filesystem types. The filesystem type can be specified explicitly using
78the
79.B -T
80option to
81.BR mke2fs (8).
82If no filesystem type is specified,
83.BR mke2fs (8)
84will use the filesystem type
85.I floppy
86if the filesystem size is less than or equal to 3 megabytes.
87If the filesystem size is greater than 3 but less than or equal to
88512 megabytes,
89.BR mke2fs (8)
90will use the filesystem
91.IR small .
92Otherwise,
93.BR mke2fs (8)
94will use the default filesystem type
95.IR default .
Theodore Ts'ofac95252006-03-27 01:05:26 -050096.SH THE [defaults] STANZA
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -050097The following relations are defined in the
98.I [defaults]
Theodore Ts'ofac95252006-03-27 01:05:26 -050099stanza.
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500100.TP
101.I base_features
102This relation specifies the filesystems features which are enabled in
Theodore Ts'o9447f382006-05-22 17:59:37 -0400103newly created filesystems. It may be overridden by the
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500104.I base_features
105relation found in the filesystem-type-specific subsection of
106the
107.I [fs_types]
Theodore Ts'ofac95252006-03-27 01:05:26 -0500108stanza.
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500109.TP
110.I default_features
111This relation specifies a set of features that should be added or
112removed to the features listed in the
113.I base_features
Theodore Ts'o9447f382006-05-22 17:59:37 -0400114relation. It may be overridden by the filesystem-specific
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500115.I default_features
Theodore Ts'o9447f382006-05-22 17:59:37 -0400116in the filesystem-type subsection of
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500117.IR [fs_types] ,
118and by the
119.B -O
120command-line option
121to
122.BR mke2fs (8).
123.TP
124.I blocksize
125This relation specifies the default blocksize if the user does not
126specify a blocksize on the command line, and the filesystem-type
127specific section of the configuration file does not specify a blocksize.
128.TP
129.I inode_ratio
130This relation specifies the default inode ratio if the user does not
131specify one on the command line, and the filesystem-type
132specific section of the configuration file does not specify a default
133inode ratio.
Andreas Dilger067911a2006-07-15 22:08:20 -0400134.TP
135.I inode_size
136This relation specifies the default inode size if the user does not
137specify one on the command line, and the filesystem-type
138specific section of the configuration file does not specify a default
139inode size.
Theodore Ts'ofac95252006-03-27 01:05:26 -0500140.SH THE [fs_types] STANZA
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500141Each tag in the
142.I [fs_types]
Theodore Ts'ofac95252006-03-27 01:05:26 -0500143stanza names a filesystem type which can be specified via the
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500144.B -T
145option to
146.BR mke2fs (8).
147The value of the tag is a subsection where the relations in that
148subsection define the defaults for that filesystem type. For
149example:
150.P
151[fs_types]
152.br
153 small = {
154.br
155 blocksize = 1024
156.br
157 inode_ratio = 4096
158.br
159 }
160.br
161 floppy = {
162.br
163 blocksize = 1024
164.br
165 }
166.P
Theodore Ts'ofac95252006-03-27 01:05:26 -0500167For each filesystem type, the following tags may be used in that
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500168fs_type's subsection:
169.TP
170.I base_features
171This relation specifies the features which are enabled for this
172filesystem type.
173.TP
174.I default_features
175This relation specifies set of features which should be enabled or
176disabled to the features listed in the
177.I base_features
Theodore Ts'o9447f382006-05-22 17:59:37 -0400178relation. It may be overridden by the
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500179.B -O
180command-line option to
181.BR mke2fs (8).
182.TP
183.I blocksize
184This relation specifies the default blocksize if the user does not
185specify a blocksize on the command line.
186.TP
187.I inode_ratio
188This relation specifies the default inode ratio if the user does not
189specify one on the command line.
Andreas Dilger067911a2006-07-15 22:08:20 -0400190.TP
191.I inode_size
192This relation specifies the default inode size if the user does not
193specify one on the command line.
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500194.SH FILES
195.TP
196.I /etc/mke2fs.conf
197The configuration file for
198.BR mke2fs (8).
199.SH SEE ALSO
200.BR mke2fs (8)