Usage: /usr/bin/mkfs.erofs [OPTIONS] FILE SOURCE(s)
Generate EROFS image (FILE) from SOURCE(s).
General options:
-V, --version print the version number of mkfs.erofs and exit
-h, --help display this help and exit
-b# set block size to # (# = page size by default)
-d<0-9> set output verbosity; 0=quiet, 9=verbose (default=2)
-x# set xattr tolerance to # (< 0, disable xattrs; default 2)
-zX[,level=Y] X=compressor (Y=compression level, Z=dictionary size, optional)
[,dictsize=Z] alternative compressors can be separated by colons(:)
[:...] supported compressors and their option ranges are:
lz4
lz4hc
[,level=<0-12>] (default=9)
deflate
[,level=<0-9>] (default=1)
[,dictsize=<dictsize>] (default=32768, max=32768)
zstd
[,level=<0-22>] (default=3)
[,dictsize=<dictsize>] (default=<auto>, max=1048576)
-C# specify the size of compress physical cluster in bytes
-EX[,...] X=extended options
-L volume-label set the volume label (maximum 15 bytes)
-m#[:X] enable metadata compression (# = physical cluster size in bytes;
X = another compression algorithm for metadata)
-T# specify a fixed UNIX timestamp # as build time
--all-time the timestamp is also applied to all files (default)
--mkfs-time the timestamp is applied as build time only
-UX use a given filesystem UUID
--zD[=<0|1>] specify directory compression: 0=disable [default], 1=enable
--MZ[=<0|[id]>] put inode metadata ('i') and/or directory data ('d') into the separate metadata zone.
--all-root make all files owned by root
--async-queue-limit=# specify the maximum number of entries in the multi-threaded job queue
--blobdev=X specify an extra device X to store chunked data
--chunksize=# generate chunk-based files with #-byte chunks
--clean=X run full clean build (default) or:
--incremental=X run incremental build
X = data|rvsp|0 (data: full data, rvsp: space fallocated
0: inodes zeroed)
--compress-hints=X specify a file to configure per-file compression strategy
--dsunit=# align all data block addresses to multiples of #
--exclude-path=X avoid including file X (X = exact literal path)
--exclude-regex=X avoid including files that match X (X = regular expression)
--force-uid=# set all file uids to # (# = UID)
--force-gid=# set all file gids to # (# = GID)
--fsalignblks=# specify the alignment of the primary device size in blocks
--uid-offset=# add offset # to all file uids (# = id offset)
--gid-offset=# add offset # to all file gids (# = id offset)
--hard-dereference dereference hardlinks, add links as separate inodes
--ignore-mtime use build time instead of strict per-file modification time
--max-extent-bytes=# set maximum decompressed extent size # in bytes
--mount-point=X X=prefix of target fs path (default: /)
--preserve-mtime keep per-file modification time strictly
--offset=# skip # bytes at the beginning of IMAGE.
--root-xattr-isize=# ensure the inline xattr size of the root directory is # bytes at least
--aufs replace aufs special files with overlayfs metadata
--sort=<path,none> data sorting order for tarballs as input (default: path)
--tar=X generate a full or index-only image from a tarball(-ish) source
(X = f|i|headerball; f=full mode, i=index mode,
headerball=file data is omitted in the source stream)
--ovlfs-strip=<0,1> strip overlayfs metadata in the target image (e.g. whiteouts)
--quiet quiet execution (do not write anything to standard output.)
--ungzip[=X] try to filter the tarball stream through gzip
(and optionally dump the raw stream to X together)
--gzinfo[=X] generate AWS SOCI-compatible zinfo in order to support random gzip access
--vmdk-desc=X generate a VMDK descriptor file to merge sub-filesystems
--workers=# set the number of worker threads to # (default: 64)
--xattr-inode-digest=X specify extended attribute name X ("erofs.fingerprint.v1" if omitted) to record inode digests
--xattr-prefix=X X=extra xattr name prefix
--zfeature-bits=# toggle filesystem compression features according to given bits #
Options (57)
| Option | Description | Source |
|---|---|---|
-V, --version | print the version number of mkfs.erofs and exit | help + man |
-h, --help | Display help string and exit. | help + man |
-b# | set block size to # (# = page size by default) | help |
-d 0-9 | Specify the level of debugging messages. | help + man |
-x# | set xattr tolerance to # (< 0, disable xattrs; | help |
-zX | X=compressor (Y=compression level, Z=dictionary size, optional) [,dictsize=Z] alternative compressors can be separated by colons(:) [:...] supported compressors and their option ranges are: lz4 lz4hc… | help |
-C# | specify the size of compress physical cluster in bytes | help |
-EX | X=extended options | help |
-L volume-label | Set the volume label for the filesystem to volume-label. | help + man |
-m# :X | enable metadata compression (# = physical cluster size in bytes; | help |
-T# | specify a fixed UNIX timestamp # as build time | help |
--all-time | (used together with -T) set all files to the fixed timestamp. | help + man |
--mkfs-time | (used together with -T) the given timestamp is only applied to the build time. | help + man |
-UX | use a given filesystem UUID | help |
--zD 0|1 | specify directory compression: 0=disable [default], 1=enable | help |
--MZ 0|[id | put inode metadata ('i') and/or directory data ('d') into the separate metadata zone. | help |
--all-root | Make all files owned by root. | help + man |
--async-queue-limit # | Specify the maximum number of entries in the multi-threaded job queue. | help + man |
--blobdev X | Specify an extra blob device to store chunk-based data. | help + man |
--chunksize # | Generate chunk-based files with #-byte chunks. | help + man |
--clean X | Run full clean build with the given MODE, which could be one of data, rvsp, or 0. | help + man |
--incremental X | Run an incremental build where DESTINATION is an existing EROFS image, and the data specified by SOURCE will be incrementally appended to the image. | help + man |
--compress-hints X | specify a file to configure per-file compression strategy | help + man |
--dsunit # | Align all data block addresses to multiples of #. | help + man |
--exclude-path X | Ignore file that matches the exact literal path. | help + man |
--exclude-regex X | Ignore files that match the given extended regular expression. | help + man |
--force-uid # | set all file uids to # (# = UID) | help + man |
--force-gid # | set all file gids to # (# = GID) | help + man |
--fsalignblks # | Specify the alignment of the primary device size (usually the filesystem size) in blocks. | help + man |
--uid-offset # | add offset # to all file uids (# = id offset) | help + man |
--gid-offset # | add offset # to all file gids (# = id offset) | help + man |
--hard-dereference | Dereference hardlinks and add links as separate inodes. | help + man |
--ignore-mtime | Ignore the file modification time whenever it would cause mkfs.erofs to use extended inodes over compact inodes. | help + man |
--max-extent-bytes # | Specify maximum decompressed extent size in bytes. | help + man |
--mount-point X | Specify the prefix of target filesystem path (default: /). | help + man |
--preserve-mtime | Use extended inodes instead of compact inodes if the file modification time would overflow compact inodes. | help + man |
--offset # | Skip # bytes at the beginning of the image. | help + man |
--root-xattr-isize # | Ensure the inline xattr size of the root directory is # bytes at least. | help + man |
--aufs | Replace aufs special files with overlayfs metadata. | help + man |
--sort path | data sorting order for tarballs as input (default: path) | help + man |
--tar X | generate a full or index-only image from a tarball(-ish) source (X = f|i|headerball; | help + man |
--ovlfs-strip 0 | strip overlayfs metadata in the target image (e.g. whiteouts) | help |
--quiet | quiet execution (do not write anything to standard output.) | help + man |
--ungzip X | try to filter the tarball stream through gzip (and optionally dump the raw stream to X together) | help |
--gzinfo X | generate AWS SOCI-compatible zinfo in order to support random gzip access | help |
--vmdk-desc X | Generate a VMDK descriptor file to merge sub-filesystems, which can be used for tar index or rebuild mode. | help + man |
--workers # | Set the number of worker threads to # (default: number of CPUs). | help + man |
--xattr-prefix X | Specify a customized extended attribute namespace prefix for space saving, e.g. "trusted.overlay.". | help + man |
--zfeature-bits # | Toggle filesystem compression features according to given bits #. | help + man |
-b block-size | Set the fundamental block size of the filesystem in bytes. (in the manual page but not in --help) | man |
-C max-pcluster-size | Specify the maximum size of compress physical cluster in bytes. (in the manual page but not in --help) | man |
-x # | Limit how many xattrs will be inlined. (in the manual page but not in --help) | man |
-T # | Specify a UNIX timestamp for image creation time for reproducible builds. (in the manual page but not in --help) | man |
-U UUID | Set the universally unique identifier (UUID) of the filesystem to UUID. (in the manual page but not in --help) | man |
--file-contexts file | Read SELinux label configuration/overrides from file in the selinux_file(5) format. (in the manual page but not in --help) | man |
--s3 endpoint | Generate an image from S3-compatible object store. (in the manual page but not in --help) | man |
--xattr-inode-digest name | Specify extended attribute name to record inode digests. (in the manual page but not in --help) | man |