summaryrefslogtreecommitdiff
path: root/doc/tar2sqfs.1
blob: 8c7d20d9cab266fb61a0833e8dce68f6f5fc1212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.TH TAR2SQFS "1" "June 2019" "tar2sqfs" "User Commands"
.SH NAME
tar2sqfs \- create a squashfs image from a tar archive
.SH SYNOPSIS
.B tar2sqfs
[\fI\,OPTIONS\/\fR...] \fI\,<sqfsfile>\/\fR
.SH DESCRIPTION
Read an uncompressed tar archive from stdin and turn it into a squashfs
filesystem image.

The idea is to quickly and painlessly turn a tar ball into a squashfs
filesystem image, so existing tools that work with tar can be used for
squashfs.
.PP
Possible options:
.TP
\fB\-\-compressor\fR, \fB\-c\fR <name>
Select the compressor to use.
Run \fBtar2sqfs \-\-help\fR to get a list of all available compressors
and the default selection.
.TP
\fB\-\-comp\-extra\fR, \fB\-X\fR <options>
A comma seperated list of extra options for the selected compressor. Specify
\fBhelp\fR to get a list of available options.
.TP
\fB\-\-block\-size\fR, \fB\-b\fR <size>
Block size to use for Squashfs image.
Defaults to 131072.
.TP
\fB\-\-dev\-block\-size\fR, \fB\-B\fR <size>
Device block size to padd the image to.
Defaults to 4096.
.TP
\fB\-\-defaults\fR, \fB\-d\fR <options>
A comma seperated list of default values for
implicitly created directories.
The following values can be set:
.TS
tab(;) allbox;
l l
l l
l l
l l
l l
rd.
\fBOption\fR;\fBDefault\fR
uid=<value>;0
gid=<value>;0
mode=<value>;0755
mtime=<value>;0
.TE
.TP
.TP
\fB\-\-no\-xattr\fR, \fB\-s\fR
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.
.TP
\fB\-\-no\-skip\fR, \fB\-s\fR
Abort if a tar record cannot be read instead of skipping it.
.TP
\fB\-\-exportable\fR, \fB\-e\fR
Generate an export table for NFS support.
.TP
\fB\-\-force\fR, \fB\-f\fR
Overwrite the output file if it exists.
.TP
\fB\-\-quiet\fR, \fB\-q\fR
Do not print out progress reports.
.TP
\fB\-\-help\fR, \fB\-h\fR
Print help text and exit.
.TP
\fB\-\-version\fR, \fB\-V\fR
Print version information and exit.
.SH COMPATIBILITY
The tool is designed to support a broad variety of commonly used tar archives.
Currently the tool can process v7 format, pre-POSIX ustar, POSIX tar and GNU
tar archives. PAX extension headers are supported.

The support for GNU tar is limited to commonly used header formats (i.e. some
older, legacy headers are not supported) and extensions like sparse files.

Hard links are currently not supported and silently converted to symlinks.
Furthermore, none of the various xattr extensions are currently implemented.

Extended attributes are supported through the SCHILY.xattr PAX extension
(favoured by GNU tar and star) or through the LIBARCHIVE.xattr PAX extension.

If any unsupported section or extended attribute key is encountered in an
archive a warning message is written to stderr. If the \fB\-\-no\-skip\fR
option is set, processing aborts. By default, unknown sections and unsupported
extended attributes are simply skipped after issuing a warning.
.SH EXAMPLES
.TP
Turn an uncompressed tar archive into a squashfs image:
.IP
tar2sqfs rootfs.sqfs < rootfs.tar
.TP
Turn a gzip'ed tar archive into a squashfs image:
.IP
zcat rootfs.tar.gz | tar2sqfs rootfs.sqfs
.TP
Turn an LZMA2 compressed tar archive into a squashfs image:
.IP
xzcat rootfs.tar.xz | tar2sqfs rootfs.sqfs
.SH AUTHOR
Written by David Oberhollenzer.
.SH COPYRIGHT
Copyright \(co 2019 David Oberhollenzer
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.