blob: 70cfdc6499b9d806f66c6c9428f4f1b7e5488914 [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.
Theodore Ts'ofac95252006-03-27 01:05:26 -0500134.SH THE [fs_types] STANZA
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500135Each tag in the
136.I [fs_types]
Theodore Ts'ofac95252006-03-27 01:05:26 -0500137stanza names a filesystem type which can be specified via the
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500138.B -T
139option to
140.BR mke2fs (8).
141The value of the tag is a subsection where the relations in that
142subsection define the defaults for that filesystem type. For
143example:
144.P
145[fs_types]
146.br
147 small = {
148.br
149 blocksize = 1024
150.br
151 inode_ratio = 4096
152.br
153 }
154.br
155 floppy = {
156.br
157 blocksize = 1024
158.br
159 }
160.P
Theodore Ts'ofac95252006-03-27 01:05:26 -0500161For each filesystem type, the following tags may be used in that
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500162fs_type's subsection:
163.TP
164.I base_features
165This relation specifies the features which are enabled for this
166filesystem type.
167.TP
168.I default_features
169This relation specifies set of features which should be enabled or
170disabled to the features listed in the
171.I base_features
Theodore Ts'o9447f382006-05-22 17:59:37 -0400172relation. It may be overridden by the
Theodore Ts'o9dc6ad12006-03-23 22:00:01 -0500173.B -O
174command-line option to
175.BR mke2fs (8).
176.TP
177.I blocksize
178This relation specifies the default blocksize if the user does not
179specify a blocksize on the command line.
180.TP
181.I inode_ratio
182This relation specifies the default inode ratio if the user does not
183specify one on the command line.
184.SH FILES
185.TP
186.I /etc/mke2fs.conf
187The configuration file for
188.BR mke2fs (8).
189.SH SEE ALSO
190.BR mke2fs (8)