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

sqfs2tar.1 (4441B)


  1. .TH SQFS2TAR "1" "June 2019" "sqfs2tar" "User Commands"
  2. .SH NAME
  3. sqfs2tar \- turn a SquashFS image into a tar archive
  4. .SH SYNOPSIS
  5. .B sqfs2tar
  6. [\fI\,OPTIONS\/\fR...] \fI\,<sqfsfile>\/\fR
  7. .SH DESCRIPTION
  8. Quickly and painlessly turn a SquashFS filesystem image into a tar archive
  9. that can then be examined and processed by any tool that can work on tar
  10. archives. The resulting archive is written to stdout.
  11. .PP
  12. Possible options:
  13. .TP
  14. \fB\-\-compressor\fR, \fB\-c\fR <name>
  15. By default the result is a raw, uncompressed tar ball. Using this option
  16. it is possible to select a stream compression format (such as \fBgzip\fR,
  17. \fBxz\fR, \fBzstd\fR or \fBbzip2\fR) to use for the output archive.
  18. Run \fBsqfs2tar \-\-help\fR to get a list of all available compressors.
  19. .TP
  20. \fB\-\-root\-becomes\fR, \fB\-r\fR <dir>
  21. Prefix all paths in the tarball with the given directory name and add an
  22. entry for this directory that receives all meta data (permissions, ownership,
  23. extended attributes, et cetera) of the root inode.
  24. The special value \fB.\fR can be used since many tar archivers themselves pack
  25. the attributes of the root directory that way and naturally support this.
  26. If this option is not used, all meta data from the root inode IS LOST!
  27. .TP
  28. \fB\-\-subdir\fR, \fB\-d\fR <dir>
  29. Unpack the given sub directory instead of the filesystem root. Can be specified
  30. more than once to select multiple directories. If only one is specified, it
  31. becomes the new root of the archive filesystem tree.
  32. .TP
  33. \fB\-\-keep\-as\-dir\fR, \fB\-k\fR
  34. If \fB\-\-subdir\fR is used only once, don't make the subdir the archive root,
  35. instead keep it as prefix for all unpacked files. Using \fB\-\-subdir\fR more
  36. than once implies \fB\-\-keep\-as\-dir\fR.
  37. .TP
  38. \fB\-\-no\-xattr\fR, \fB\-X\fR
  39. Discard extended attributes from the SquashFS image. The default behavior is
  40. to copy all xattrs attached to SquashFS inodes into the resulting tar archive.
  41. .TP
  42. \fB\-\-no\-hard\-links\fR, \fB\-L\fR
  43. Normally, sqfs2tar runs hard link detection and generates hard links for
  44. entries that refer to the same inode. If this flag is set, hard link
  45. detection is not performed and duplicate data records are generated
  46. instead.
  47. .TP
  48. \fB\-\-no\-skip\fR, \fB\-s\fR
  49. Abort if a file cannot be stored in a tar archive. For instance, the tar format
  50. does not support socket files, but SquashFS does. The default behaviour of
  51. \fBsqfs2tar\fR is to emit a warning to stderr and skip the entry. If this flag
  52. is set, processing is aborted and \fBsqfs2tar\fR exits with an error status.
  53. .TP
  54. \fB\-\-help\fR, \fB\-h\fR
  55. Print help text and exit.
  56. .TP
  57. \fB\-\-version\fR, \fB\-V\fR
  58. Print version information and exit.
  59. .SH COMPATIBILITY
  60. The output format is pre-POSIX ustar using GNU extensions where necessary.
  61. Experimentation determined that this is most widely supported by activeley
  62. used tar implementations (besides GNU tar), even more than the newer POSIX
  63. format with PAX extensions.
  64. If any file or directory is encountered that cannot be converted, it is
  65. skipped and a warning is written to stderr. Unless the \fB\-\-no\-skip\fR
  66. option is set, which aborts processing if a file cannot be converted.
  67. This mainly affects socket files which are supported by SquashFS but not by
  68. POSIX tar, GNU tar or PAX.
  69. Since the tar format contains a sequence of files with absolute names, it has
  70. no direct concept of a tree or an unnamed root node. Consequently, meta data
  71. from the SquashFS root inode is lost, unless the \fB\-\-root\-becomes\fR option
  72. is used.
  73. The output archive can optionally be compressed. Default settings are used for
  74. the supported compressors and there is currently no intention to expose finer
  75. grained control over them. To set custom compressor flags, create an
  76. uncompressed archive and pipe it into a dedicated compressor process.
  77. .SH EXAMPLES
  78. Turn a SquashFS image into a tar archive:
  79. .IP
  80. sqfs2tar rootfs.sqfs > rootfs.tar
  81. .TP
  82. Creating a compressed archive with gzip headers:
  83. .IP
  84. sqfs2tar --compressor gzip rootfs.sqfs > rootfs.tar.gz
  85. .TP
  86. Compressing the output archive, but using custom compressor flags:
  87. .IP
  88. sqfs2tar rootfs.sqfs | xz -9e > rootfs.tar.xz
  89. .SH SEE ALSO
  90. rdsquashfs(1), tar2sqfs(1)
  91. .SH AUTHOR
  92. Written by David Oberhollenzer.
  93. .SH COPYRIGHT
  94. Copyright \(co 2019 David Oberhollenzer
  95. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
  96. .br
  97. This is free software: you are free to change and redistribute it.
  98. There is NO WARRANTY, to the extent permitted by law.