TAR2SQFS(1) | User Commands | TAR2SQFS(1) |
tar2sqfs - create a SquashFS image from a tar archive
tar2sqfs [OPTIONS...] <sqfsfile>
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:
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 /).
This flag allows changing the default behaviour, so only hard links are retargeted.
Option | Default |
uid=<value> | 0 |
gid=<value> | 0 |
mode=<value> | 0755 |
mtime=<value> | $SOURCE_DATE_EPOCH if set, 0 otherwise |
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.
Currently the program can process v7 format, pre-POSIX ustar, POSIX tar and GNU tar archives. PAX extension headers are also supported. Global PAX headers are ignored.
The support for GNU tar is limited to a commonly used subset (i.e. some legacy extensions that GNU tar itself no longer generates are not supported; neither are multi volume archives).
The input tar file can either be uncompressed, or stream compressed using gzip, xz, zstd or bzip2. The program transparently auto-detects and unpacks any stream compressed archive. The exact list of supported compressors depends on the compile configuration.
Extended attributes are supported through the SCHILY.xattr extension (favoured by GNU tar and star) or through the LIBARCHIVE.xattr extension.
If any unsupported section or extended attribute key is encountered in an archive, a warning message is written to stderr. If the --no-skip option is set, processing aborts. By default, unknown sections and unsupported extended attributes are simply skipped after issuing a warning.
If the command line switch --defaults is not used or no default mtime is specified, the value of the environment variable SOURCE_DATE_EPOCH is used for all file and filesystem timestamps.
If SOURCE_DATE_EPOCH is not set, not a parsable number or it is out of range, the timestamps default to 0.
Environment variables are only used if no explicit command line switches are set. Explicit command line switches are always preferred over the environment variables.
Written by David Oberhollenzer.
Copyright © 2019 David Oberhollenzer License GPLv3+: GNU
GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
June 2019 | tar2sqfs |