logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

tar2sqfs.1 (6193B)


  1. .TH TAR2SQFS "1" "June 2019" "tar2sqfs" "User Commands"
  2. .SH NAME
  3. tar2sqfs \- create a SquashFS image from a tar archive
  4. .SH SYNOPSIS
  5. .B tar2sqfs
  6. [\fI\,OPTIONS\/\fR...] \fI\,<sqfsfile>\/\fR
  7. .SH DESCRIPTION
  8. Quickly and painlessly turn a tar ball into a SquashFS filesystem image.
  9. .PP
  10. By default, the program reads the archive from standard input. Compressed
  11. archives are supported.
  12. .PP
  13. Possible options:
  14. .TP
  15. \fB\-\-root\-becomes\fR, \fB\-r\fR <dir>
  16. If set, only pack entries that are underneath the specified directory. The
  17. prefix is stripped and the meta data for the directory itself is copied to the
  18. root inode (i.e. the ownership, permissions, extended attributes,
  19. modification time).
  20. If this option is not set, tar2sqfs implicitly treats \fB./\fR or absolute
  21. paths this way, i.e. if the archive contains an entry for \fB./\fR, it becomes
  22. the root node and the prefix is stripped from all paths (and similar for
  23. absolute paths and \fB/\fR).
  24. .TP
  25. \fB\-\-no\-symlink\-retarget\fR, \fB\-S\fR
  26. If \-\-root\-becomes is used, link targets are adjusted if they are prefixed by
  27. the root path. By default, this is also done on symbolic links, that have a
  28. target that is prefixed by the root path and they are converted to aboluste
  29. paths with the prefix removed. However, because symlinks can point across mount
  30. points, this may actually be intended for some use cases.
  31. This flag allows changing the default behaviour, so only hard links are
  32. retargeted.
  33. .TP
  34. \fB\-\-compressor\fR, \fB\-c\fR <name>
  35. Select the compressor to use.
  36. Run \fBtar2sqfs \-\-help\fR to get a list of all available compressors
  37. and the default selection.
  38. .TP
  39. \fB\-\-comp\-extra\fR, \fB\-X\fR <options>
  40. A comma separated list of extra options for the selected compressor. Specify
  41. \fBhelp\fR to get a list of available options.
  42. .TP
  43. \fB\-\-num\-jobs\fR, \fB\-j\fR <count>
  44. If libsquashfs was compiled with a thread pool based, parallel data
  45. compressor, this option can be used to set the number of compressor
  46. threads. If not set, the default is the number of available CPU cores.
  47. .TP
  48. \fB\-\-queue\-backlog\fR, \fB\-Q\fR <count>
  49. Maximum number of data blocks in the thread worker queue before the packer
  50. starts waiting for the block processors to catch up. Higher values result
  51. in higher memory consumption. Defaults to 10 times the number of workers.
  52. .TP
  53. \fB\-\-block\-size\fR, \fB\-b\fR <size>
  54. Block size to use for SquashFS image.
  55. Defaults to 131072.
  56. .TP
  57. \fB\-\-dev\-block\-size\fR, \fB\-B\fR <size>
  58. Device block size to padd the image to.
  59. Defaults to 4096.
  60. .TP
  61. \fB\-\-defaults\fR, \fB\-d\fR <options>
  62. A comma separated list of default values for
  63. implicitly created directories.
  64. The following values can be set:
  65. .TS
  66. tab(;) allbox;
  67. l l
  68. l l
  69. l l
  70. l l
  71. l l
  72. rd.
  73. \fBOption\fR;\fBDefault\fR
  74. uid=<value>;0
  75. gid=<value>;0
  76. mode=<value>;0755
  77. mtime=<value>;\fB$SOURCE\_DATE\_EPOCH\fR if set, 0 otherwise
  78. .TE
  79. .TP
  80. .TP
  81. \fB\-\-no\-keep\-time\fR, \fB\-k\fR
  82. Replace the time stamps from the tar archive with default time stamps for all
  83. entries.
  84. The default behavior is to preserve the time stamps from the archive to the
  85. extent possible (SquashFS has second resolution and 32 bit time stamps; tar can
  86. use extensions to specify much larger timestamps with arbitrary precision). The
  87. root inode (unless \fB\-\-root\-becomes\fR is used) and the modification time on
  88. the SquashFS image itself will still be set to defaults.
  89. .TP
  90. \fB\-\-no\-xattr\fR, \fB\-x\fR
  91. Do not copy extended attributes from archive. Default behaviour is to copy all
  92. extended attributes and skip the ones that cannot be encoded in SquashFS.
  93. .TP
  94. \fB\-\-no\-skip\fR, \fB\-s\fR
  95. Abort if a tar record cannot be read instead of skipping it.
  96. .TP
  97. \fB\-\-exportable\fR, \fB\-e\fR
  98. Generate an export table for NFS support.
  99. .TP
  100. \fB\-\-no\-tail\-packing\fR, \fB\-T\fR
  101. Do not perform tail end packing on files that are larger than the
  102. specified block size.
  103. .TP
  104. \fB\-\-force\fR, \fB\-f\fR
  105. Overwrite the output file if it exists.
  106. .TP
  107. \fB\-\-quiet\fR, \fB\-q\fR
  108. Do not print out progress reports.
  109. .TP
  110. \fB\-\-help\fR, \fB\-h\fR
  111. Print help text and exit.
  112. .TP
  113. \fB\-\-version\fR, \fB\-V\fR
  114. Print version information and exit.
  115. .SH COMPATIBILITY
  116. Currently the program can process v7 format, pre-POSIX ustar, POSIX tar and GNU
  117. tar archives. PAX extension headers are also supported. Global PAX headers are
  118. ignored.
  119. The support for GNU tar is limited to a commonly used subset (i.e. some legacy
  120. extensions that GNU tar itself no longer generates are not supported; neither
  121. are multi volume archives).
  122. The input tar file can either be uncompressed, or stream compressed using
  123. \fBgzip\fR, \fBxz\fR, \fBzstd\fR or \fBbzip2\fR. The program transparently
  124. auto-detects and unpacks any stream compressed archive. The exact list of
  125. supported compressors depends on the compile configuration.
  126. Extended attributes are supported through the \fBSCHILY.xattr\fR extension
  127. (favoured by GNU tar and star) or through the \fBLIBARCHIVE.xattr\fR extension.
  128. If any unsupported section or extended attribute key is encountered in an
  129. archive, a warning message is written to stderr. If the \fB\-\-no\-skip\fR
  130. option is set, processing aborts. By default, unknown sections and unsupported
  131. extended attributes are simply skipped after issuing a warning.
  132. .SH ENVIRONMENT
  133. If the command line switch \fB\-\-defaults\fR is not used or no default mtime
  134. is specified, the value of the environment variable \fBSOURCE\_DATE\_EPOCH\fR
  135. is used for all file and filesystem timestamps.
  136. If \fBSOURCE\_DATE\_EPOCH\fR is not set, not a parsable number or it is out of
  137. range, the timestamps default to 0.
  138. Environment variables are only used if no explicit command line switches
  139. are set. Explicit command line switches are always preferred over the
  140. environment variables.
  141. .SH EXAMPLES
  142. .TP
  143. Turn an uncompressed tar archive into a SquashFS image:
  144. .IP
  145. tar2sqfs rootfs.sqfs < rootfs.tar.gz
  146. .SH SEE ALSO
  147. gensquashfs(1), rdsquashfs(1), sqfs2tar(1)
  148. .SH AUTHOR
  149. Written by David Oberhollenzer.
  150. .SH COPYRIGHT
  151. Copyright \(co 2019 David Oberhollenzer
  152. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
  153. .br
  154. This is free software: you are free to change and redistribute it.
  155. There is NO WARRANTY, to the extent permitted by law.