1MKFS.EROFS(1)               General Commands Manual              MKFS.EROFS(1)
2
3
4

NAME

6       mkfs.erofs - tool to create an EROFS filesystem
7

SYNOPSIS

9       mkfs.erofs [OPTIONS] DESTINATION SOURCE
10

DESCRIPTION

12       EROFS  is  a  new  enhanced lightweight linux read-only filesystem with
13       modern designs (eg. no  buffer  head,  reduced  metadata,  inline  xat‐
14       trs/data, etc.) for scenarios which need high-performance read-only re‐
15       quirements, e.g. Android OS for smartphones and LIVECDs.
16
17       It also provides fixed-sized output compression support, which improves
18       storage  density,  keeps relatively higher compression ratios, which is
19       more useful to achieve high performance for embedded devices with  lim‐
20       ited  memory  since  it  has unnoticable memory overhead and page cache
21       thrashing.
22
23       mkfs.erofs is used to create such EROFS  filesystem  DESTINATION  image
24       file from SOURCE directory.
25

OPTIONS

27       -z compression-algorithm [,#]
28              Set  an algorithm for file compression, which can be set with an
29              optional compression level separated by a comma.
30
31       -C max-pcluster-size
32              Specify the maximum size of compress physical cluster in  bytes.
33              It may enable big pcluster feature if needed (Linux v5.13+).
34
35       -d #   Specify the level of debugging messages. The default is 2, which
36              shows basic warning messages.
37
38       -x #   Specify the upper limit of an xattr which is still inlined.  The
39              default is 2.  Disable storing xattrs if < 0.
40
41       -E extended-option [,...]
42              Set  extended  options  for the filesystem. Extended options are
43              comma separated, and may take an argument using the equals ('=')
44              sign.  The following extended options are supported:
45
46                   force-inode-compact
47                          Forcely  generate compact inodes (32-byte inodes) to
48                          output.
49
50                   force-inode-extended
51                          Forcely generate extended inodes (64-byte inodes) to
52                          output.
53
54                   force-inode-blockmap
55                          Forcely  generate inode chunk format in 4-byte block
56                          address array.
57
58                   force-chunk-indexes
59                          Forcely generate inode chunk format in 8-byte  chunk
60                          indexes (with device id).
61
62                   legacy-compress
63                          Drop "inplace decompression" and "compacted indexes"
64                          support, which is used to generate compatible  EROFS
65                          images for Linux v4.19 - 5.3.
66
67                   noinline_data
68                          Don't inline regular files to enable FSDAX for these
69                          files (Linux v5.15+).
70
71                   ztailpacking
72                          Pack the tail part (pcluster)  of  compressed  files
73                          into  its  metadata  to save more space and the tail
74                          part I/O. (Linux v5.17+)
75
76       -T #   Set all files to the given UNIX timestamp.  Reproducible  builds
77              requires setting all to a specific one.
78
79       -U UUID
80              Set  the  universally unique identifier (UUID) of the filesystem
81              to UUID.  The format of the UUID is a series of hex digits sepa‐
82              rated          by          hyphens,          like          this:
83              "c1b9d5a2-f162-11cf-9ece-0020afc76f16".
84
85       --all-root
86              Make all files owned by root.
87
88       --blobdev file
89              Specify another extra blob device to store chunk-based data.
90
91       --chunksize #
92              Generate chunk-based files with #-byte chunks.
93
94       --compress-hints file
95              If  the  optional  --compress-hints  file  argument  is   given,
96              mkfs.erofs  uses  it to apply the per-file compression strategy.
97              Each line is defined by tokens separated by spaces in  the  fol‐
98              lowing form:
99                   <pcluster-in-bytes> <match-pattern>
100
101       --exclude-path=path
102              Ignore  file  that matches the exact literal path.  You may give
103              multiple `--exclude-path' options.
104
105       --exclude-regex=regex
106              Ignore files that match the given regular expression.   You  may
107              give multiple `--exclude-regex` options.
108
109       --file-contexts=file
110              Specify a file_contexts file to setup / override selinux labels.
111
112       --force-uid=UID
113              Set all file uids to UID.
114
115       --force-gid=GID
116              Set all file gids to GID.
117
118       --help Display this help and exit.
119
120       --ignore-mtime
121              File  modification  time  is  ignored  whenever  it  would cause
122              mkfs.erofs to use extended inodes over compact inodes. When  not
123              using a fixed timestamp, this can reduce total metadata size.
124
125       --max-extent-bytes #
126              Specify maximum decompressed extent size # in bytes.
127
128       --preserve-mtime
129              File  modification time is preserved whenever mkfs.erofs decides
130              to use extended inodes over compact inodes.
131

AUTHOR

133       This  version  of  mkfs.erofs  is  written   by   Li   Guifu   <blucer‐
134       lee@gmail.com>, Miao Xie <miaoxie@huawei.com> and Gao Xiang <xiang@ker‐
135       nel.org> with continuously improvements from others.
136
137       This manual page was written by Gao Xiang <xiang@kernel.org>.
138

AVAILABILITY

140       mkfs.erofs is  part  of  erofs-utils  package  and  is  available  from
141       git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git.
142

SEE ALSO

144       mkfs(8).
145
146
147
148                                                                 MKFS.EROFS(1)
Impressum