1TAR2SQFS(1)                      User Commands                     TAR2SQFS(1)
2
3
4

NAME

6       tar2sqfs - create a SquashFS image from a tar archive
7

SYNOPSIS

9       tar2sqfs [OPTIONS...] <sqfsfile>
10

DESCRIPTION

12       Quickly  and  painlessly turn a tar ball into a SquashFS filesystem im‐
13       age.
14
15       By default, the program reads the archive  from  standard  input.  Com‐
16       pressed archives are supported.
17
18       Possible options:
19
20       --root-becomes, -r <dir>
21              If  set, only pack entries that are underneath the specified di‐
22              rectory. The prefix is stripped and the meta data for the direc‐
23              tory  itself  is  copied  to the root inode (i.e. the ownership,
24              permissions, extended attributes, modification time).
25
26              If this option is not set, tar2sqfs implicitly treats ./ or  ab‐
27              solute paths this way, i.e. if the archive contains an entry for
28              ./, it becomes the root node and the prefix is stripped from all
29              paths (and similar for absolute paths and /).
30
31       --no-symlink-retarget, -S
32              If --root-becomes is used, link targets are adjusted if they are
33              prefixed by the root path. By default, this is also done on sym‐
34              bolic  links,  that  have  a target that is prefixed by the root
35              path and they are converted to aboluste paths  with  the  prefix
36              removed.  However,  because  symlinks  can  point  across  mount
37              points, this may actually be intended for some use cases.
38
39              This flag allows changing the default behaviour,  so  only  hard
40              links are retargeted.
41
42       --compressor, -c <name>
43              Select the compressor to use.  Run tar2sqfs --help to get a list
44              of all available compressors and the default selection.
45
46       --comp-extra, -X <options>
47              A comma separated list of extra options for  the  selected  com‐
48              pressor. Specify help to get a list of available options.
49
50       --num-jobs, -j <count>
51              If  libsquashfs  was compiled with a thread pool based, parallel
52              data compressor, this option can be used to set  the  number  of
53              compressor  threads.  If  not  set, the default is the number of
54              available CPU cores.
55
56       --queue-backlog, -Q <count>
57              Maximum number of data blocks in the thread worker queue  before
58              the  packer starts waiting for the block processors to catch up.
59              Higher values result in higher memory consumption.  Defaults  to
60              10 times the number of workers.
61
62       --block-size, -b <size>
63              Block size to use for SquashFS image.  Defaults to 131072.
64
65       --dev-block-size, -B <size>
66              Device block size to padd the image to.  Defaults to 4096.
67
68       --defaults, -d <options>
69              A  comma separated list of default values for implicitly created
70              directories.  The following values can be set:
71
72              ┌──────────────┬────────────────────────────────────────┐
73Option        Default                                
74              ├──────────────┼────────────────────────────────────────┤
75              │uid=<value>   │ 0                                      │
76              ├──────────────┼────────────────────────────────────────┤
77              │gid=<value>   │ 0                                      │
78              ├──────────────┼────────────────────────────────────────┤
79              │mode=<value>  │ 0755                                   │
80              ├──────────────┼────────────────────────────────────────┤
81              │mtime=<value> │ $SOURCE_DATE_EPOCH if set, 0 otherwise │
82              └──────────────┴────────────────────────────────────────┘
83
84       --no-keep-time, -k
85              Replace the time stamps from the tar archive with  default  time
86              stamps for all entries.
87
88              The default behavior is to preserve the time stamps from the ar‐
89              chive to the extent possible (SquashFS has second resolution and
90              32  bit  time  stamps;  tar  can  use extensions to specify much
91              larger timestamps with arbitrary precision). The root inode (un‐
92              less  --root-becomes  is  used) and the modification time on the
93              SquashFS image itself will still be set to defaults.
94
95       --no-xattr, -x
96              Do not copy extended attributes from archive. Default  behaviour
97              is to copy all extended attributes and skip the ones that cannot
98              be encoded in SquashFS.
99
100       --no-skip, -s
101              Abort if a tar record cannot be read instead of skipping it.
102
103       --exportable, -e
104              Generate an export table for NFS support.
105
106       --no-tail-packing, -T
107              Do not perform tail end packing on files that  are  larger  than
108              the specified block size.
109
110       --force, -f
111              Overwrite the output file if it exists.
112
113       --quiet, -q
114              Do not print out progress reports.
115
116       --help, -h
117              Print help text and exit.
118
119       --version, -V
120              Print version information and exit.
121

COMPATIBILITY

123       Currently the program can process v7 format, pre-POSIX ustar, POSIX tar
124       and GNU tar archives. PAX extension headers are also supported.  Global
125       PAX headers are ignored.
126
127       The support for GNU tar is limited to a commonly used subset (i.e. some
128       legacy extensions that GNU tar itself no longer generates are not  sup‐
129       ported; neither are multi volume archives).
130
131       The input tar file can either be uncompressed, or stream compressed us‐
132       ing gzip, xz, zstd or bzip2. The program transparently auto-detects and
133       unpacks any stream compressed archive. The exact list of supported com‐
134       pressors depends on the compile configuration.
135
136       Extended attributes are supported through  the  SCHILY.xattr  extension
137       (favoured  by  GNU tar and star) or through the LIBARCHIVE.xattr exten‐
138       sion.
139
140       If any unsupported section or extended attribute key is encountered  in
141       an  archive,  a  warning message is written to stderr. If the --no-skip
142       option is set, processing aborts. By default, unknown sections and  un‐
143       supported  extended attributes are simply skipped after issuing a warn‐
144       ing.
145

ENVIRONMENT

147       If the command line switch --defaults is not used or no  default  mtime
148       is  specified,  the value of the environment variable SOURCE_DATE_EPOCH
149       is used for all file and filesystem timestamps.
150
151       If SOURCE_DATE_EPOCH is not set, not a parsable number or it is out  of
152       range, the timestamps default to 0.
153
154       Environment  variables  are  only  used  if  no  explicit  command line
155       switches are set. Explicit command line switches are  always  preferred
156       over the environment variables.
157

EXAMPLES

159       Turn an uncompressed tar archive into a SquashFS image:
160
161              tar2sqfs rootfs.sqfs < rootfs.tar.gz
162

SEE ALSO

164       gensquashfs(1), rdsquashfs(1), sqfs2tar(1)
165

AUTHOR

167       Written by David Oberhollenzer.
168
170       Copyright  © 2019 David Oberhollenzer License GPLv3+: GNU GPL version 3
171       or later <https://gnu.org/licenses/gpl.html>.
172       This is free software: you are free  to  change  and  redistribute  it.
173       There is NO WARRANTY, to the extent permitted by law.
174
175
176
177tar2sqfs                           June 2019                       TAR2SQFS(1)
Impressum