Quickly and painlessly turn a tar ball into a SquashFS filesystem image.
By default, the program reads the archive from standard input. Compressed archives are supported.
Possible options:
--root-becomes, -r <dir>
If set, only pack entries that are underneath the specified directory. The prefix is stripped and
the meta data for the directory itself is copied to the root inode (i.e. the ownership,
permissions, extended attributes, modification time).
If this option is not set, tar2sqfs implicitly treats ./ or absolute paths this way, i.e. if the
archive contains an entry for ./, it becomes the root node and the prefix is stripped from all
paths (and similar for absolute paths and /).
--no-symlink-retarget, -S
If --root-becomes is used, link targets are adjusted if they are prefixed by the root path. By
default, this is also done on symbolic links, that have a target that is prefixed by the root path
and they are converted to aboluste paths with the prefix removed. However, because symlinks can
point across mount points, this may actually be intended for some use cases.
This flag allows changing the default behaviour, so only hard links are retargeted.
--exclude, -E <pattern>
Test paths against a given shell-style globbing pattern and exclude all matches, e.g. --excludeboot/* keeps the boot directory in the final SquashFS archive, but drops all of its contents.
--compressor, -c <name>
Select the compressor to use. Run tar2sqfs--help to get a list of all available compressors and
the default selection.
--comp-extra, -X <options>
A comma separated list of extra options for the selected compressor. Specify help to get a list of
available options.
--num-jobs, -j <count>
If libsquashfs was compiled with a thread pool based, parallel data compressor, this option can be
used to set the number of compressor threads. If not set, the default is the number of available
CPU cores.
--queue-backlog, -Q <count>
Maximum number of data blocks in the thread worker queue before the packer starts waiting for the
block processors to catch up. Higher values result in higher memory consumption. Defaults to 10
times the number of workers.
--block-size, -b <size>
Block size to use for SquashFS image. Defaults to 131072.
--dev-block-size, -B <size>
Device block size to padd the image to. Defaults to 4096.
--defaults, -d <options>
A comma separated list of default values for implicitly created directories. The following values
can be set:
┌───────────────┬────────────────────────────────────────┐
│ Option │ Default │
├───────────────┼────────────────────────────────────────┤
│ uid=<value> │ 0 │
├───────────────┼────────────────────────────────────────┤
│ gid=<value> │ 0 │
├───────────────┼────────────────────────────────────────┤
│ mode=<value> │ 0755 │
├───────────────┼────────────────────────────────────────┤
│ mtime=<value> │ $SOURCE_DATE_EPOCH if set, 0 otherwise │
└───────────────┴────────────────────────────────────────┘
--no-keep-time, -k
Replace the time stamps from the tar archive with default time stamps for all entries.
The default behavior is to preserve the time stamps from the archive to the extent possible
(SquashFS has second resolution and 32 bit time stamps; tar can use extensions to specify much
larger timestamps with arbitrary precision). The root inode (unless --root-becomes is used) and
the modification time on the SquashFS image itself will still be set to defaults.
--no-xattr, -x
Do not copy extended attributes from archive. Default behaviour is to copy all extended attributes
and skip the ones that cannot be encoded in SquashFS.
--no-skip, -s
Abort if a tar record cannot be read instead of skipping it.
--exportable, -e
Generate an export table for NFS support.
--no-tail-packing, -T
Do not perform tail end packing on files that are larger than the specified block size.
--no-pad
Do not pad the resulting image to device block size. May result in an image that cannot be loop
mounted.
--force, -f
Overwrite the output file if it exists.
--quiet, -q
Do not print out progress reports.
--help, -h
Print help text and exit.
--version, -V
Print version information and exit.