.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1. .TH SQFSTAR "1" "March 2022" "sqfstar version 4.5.1" "User Commands" .SH NAME sqfstar - tool to create a squashfs filesystem from a tar archive .SH SYNOPSIS cat xxx.tar | sqfstar [OPTIONS] FILESYSTEM [exclude files] zcat xxx.tgz | sqfstar [OPTIONS] FILESYSTEM [exclude files] xzcat xxx.tar.xz | sqfstar [OPTIONS] FILESYSTEM [exclude files] zstdcat xxx.tar.zst | sqfstar [OPTIONS] FILESYSTEM [exclude files] .SH DESCRIPTION Squashfs is a highly compressed read-only filesystem for Linux. It uses either gzip/xz/lzo/lz4/zstd compression to compress both files, inodes and directories. Inodes in the system are very small and all blocks are packed to minimise data overhead. Block sizes greater than 4K are supported up to a maximum of 1Mbytes (default block size 128K). Squashfs is intended for general read-only filesystem use, for archival use (i.e. in cases where a .tar.gz file may be used), and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed. .SH OPTIONS .SS "Filesystem build options:" .TP \fB\-comp\fR COMP select COMP compression. Compressors available: gzip (default), lzo, lz4, xz, zstd, lzma. .TP \fB\-b\fR BLOCK_SIZE set data block to BLOCK_SIZE. Default 128 Kbytes. Optionally a suffix of K or M can be given to specify Kbytes or Mbytes respectively. .TP \fB\-reproducible\fR build filesystems that are reproducible (default). .TP \fB\-not\-reproducible\fR build filesystems that are not reproducible. .TP \fB\-mkfs\-time\fR TIME set filesystem creation timestamp to TIME, which is an unsigned 32\-bit int indicating seconds since the epoch (1970\-01\-01). .TP \fB\-fstime\fR TIME synonym for mkfs\-time. .TP \fB\-all\-time\fR TIME set all file timestamps to TIME, which is an unsigned 32\-bit int indicating seconds since the epoch (1970\-01\-01). .TP \fB\-exports\fR make the filesystem exportable via NFS. .TP \fB\-no\-sparse\fR don't detect sparse files. .TP \fB\-no\-xattrs\fR don't store extended attributes. .TP \fB\-xattrs\fR store extended attributes (default). .TP \fB\-noI\fR do not compress inode table. .TP \fB\-noId\fR do not compress the uid/gid table (implied by \fB\-noI\fR). .TP \fB\-noD\fR do not compress data blocks. .TP \fB\-noF\fR do not compress fragment blocks. .TP \fB\-noX\fR do not compress extended attributes. .TP \fB\-no\-fragments\fR do not use fragments. .TP \fB\-no\-tailends\fR don't pack tail ends into fragments. .TP \fB\-no\-duplicates\fR do not perform duplicate checking. .TP \fB\-no\-hardlinks\fR do not hardlink files, instead store duplicates. .TP \fB\-all\-root\fR make all files owned by root. .TP \fB\-root\-time\fR TIME set root directory time to TIME. .TP \fB\-root\-mode\fR MODE set root directory permissions to octal MODE. .TP \fB\-root\-uid\fR UID set root directory owner to UID. .TP \fB\-root\-gid\fR GID set root directory group to GID. .TP \fB\-force\-uid\fR UID set all file uids to UID. .TP \fB\-force\-gid\fR GID set all file gids to GID. .SS "Filesystem filter options:" .TP \fB\-ef\fR EXCLUDE_FILE list of exclude dirs/files. One per line. .TP \fB\-regex\fR Allow POSIX regular expressions to be used in exclude dirs/files. .SS "Sqfstar runtime options:" .TP \fB\-version\fR print version, licence and copyright message. .TP \fB\-force\fR force Sqfstar to write to block device or file. .TP \fB\-exit\-on\-error\fR treat normally ignored errors as fatal. .TP \fB\-quiet\fR no verbose output. .TP \fB\-info\fR print files written to filesystem. .TP \fB\-no\-progress\fR don't display the progress bar. .TP \fB\-progress\fR display progress bar when using the \fB\-info\fR option. .TP \fB\-throttle\fR PERCENTAGE throttle the I/O input rate by the given percentage. This can be used to reduce the I/O and CPU consumption of Mksquashfs. .TP \fB\-limit\fR PERCENTAGE limit the I/O input rate to the given percentage. This can be used to reduce the I/O and CPU consumption of Mksquashfs (alternative to \fB\-throttle\fR). .TP \fB\-processors\fR NUMBER Use NUMBER processors. By default will use number of processors available. .TP \fB\-mem\fR SIZE Use SIZE physical memory. Optionally a suffix of K, M or G can be given to specify Kbytes, Mbytes or Gbytes respectively. .SS "Expert options (these may make the filesystem unmountable):" .TP \fB\-nopad\fR do not pad filesystem to a multiple of 4K. .TP \fB\-offset\fR OFFSET Skip OFFSET bytes at the beginning of FILESYSTEM. Optionally a suffix of K, M or G can be given to specify Kbytes, Mbytes or Gbytes respectively. Default 0 bytes. .TP \fB\-o\fR OFFSET synonym for \fB\-offset\fR. .SS "Miscellaneous options:" .TP \fB\-root\-owned\fR alternative name for \fB\-all\-root\fR. .TP \fB\-noInodeCompression\fR alternative name for \fB\-noI\fR. .TP \fB\-noIdTableCompression\fR alternative name for \fB\-noId\fR. .TP \fB\-noDataCompression\fR alternative name for \fB\-noD\fR. .TP \fB\-noFragmentCompression\fR alternative name for \fB\-noF\fR. .TP \fB\-noXattrCompression\fR alternative name for \fB\-noX\fR. .TP \fB\-help\fR output this options text to stdout. .TP \fB\-h\fR output this options text to stdout. .TP \fB\-Xhelp\fR print compressor options for selected compressor. .SH "COMPRESSORS AVAILABLE AND COMPRESSOR SPECIFIC OPTIONS" .SS "gzip (default):" .TP \fB\-Xcompression\-level\fR COMPRESSION\-LEVEL COMPRESSION\-LEVEL should be 1 .. 9 (default 9). .TP \fB\-Xwindow\-size\fR WINDOW\-SIZE WINDOW\-SIZE should be 8 .. 15 (default 15). .TP \fB\-Xstrategy\fR strategy1,strategy2,...,strategyN Compress using strategy1,strategy2,...,strategyN in turn and choose the best compression. Available strategies: default, filtered, huffman_only, run_length_encoded and fixed. .SS "lzo:" .TP \fB\-Xalgorithm\fR ALGORITHM Where ALGORITHM is one of: lzo1x_1, lzo1x_1_11, lzo1x_1_12, lzo1x_1_15, lzo1x_999 (default). .TP \fB\-Xcompression\-level\fR COMPRESSION\-LEVEL COMPRESSION\-LEVEL should be 1 .. 9 (default 8) Only applies to lzo1x_999 algorithm. .SS "lz4:" .TP \fB\-Xhc\fR Compress using LZ4 High Compression. .SS "xz:" .TP \fB\-Xbcj\fR filter1,filter2,...,filterN Compress using filter1,filter2,...,filterN in turn (in addition to no filter), and choose the best compression. Available filters: x86, arm, armthumb, powerpc, sparc, ia64. .TP \fB\-Xdict\-size\fR DICT\-SIZE Use DICT\-SIZE as the XZ dictionary size. The dictionary size can be specified as a percentage of the block size, or as an absolute value. The dictionary size must be less than or equal to the block size and 8192 bytes or larger. It must also be storable in the xz header as either 2^n or as 2^n+2^(n+1). Example dict\-sizes are 75%, 50%, 37.5%, 25%, or 32K, 16K, 8K etc. .SS "zstd:" .TP \fB\-Xcompression\-level\fR COMPRESSION\-LEVEL COMPRESSION\-LEVEL should be 1 .. 22 (default 15). .SS "lzma:" .IP (no options) (deprecated \- no kernel support) .SH ENVIRONMENT .TP SOURCE_DATE_EPOCH If set, this is used as the filesystem creation timestamp. Also any file timestamps which are after SOURCE_DATE_EPOCH will be clamped to SOURCE_DATE_EPOCH. See https://reproducible\-builds.org/docs/source\-date\-epoch/ for more information. .SH EXAMPLES .TP sqfstar IMAGE.SQFS < archive.tar Create a Squashfs filesystem from the uncompressed tar file "archive.tar". Sqfstar will use the default compressor (normally gzip), and block size of 128 Kbytes. .TP zcat archive.tgz | sqfstar IMAGE.SQFS Create a Squashfs filesystem from the compressed tar file "archive.tgz". Sqfstar will use the default compressor (normally gzip), and block size of 128 Kbytes. .TP sqfstar -b 1M -comp zstd IMAGE.SQFS < archive.tar Use a block size of 1 Mbyte and Zstandard compression to create the filesystem. .TP sqfstar -root-uid 0 -root-gid 0 IMAGE.SQFS < archive.tar Tar files do not supply a definition for the root directory, and the default is to make the directory owned/group owned by the user running Sqfstar. The above command sets the ownership/group ownership to root. .TP sqfstar -root-mode 0755 IMAGE.SQFS < archive.tar The default permissions for the root directory is 0777 (rwxrwxrwx). The above command sets the permissions to 0755 (rwxr-xr-x). .TP sqfstar IMAGE.SQFS file1 file2 < archive.tar Exclude file1 and file2 from the tar file when creating filesystem. .TP sqfstar IMAGE.SQFS "*.gz" < archive.tar Exclude any files in the top level directory which matches the wildcard pattern "*.gz". .TP sqfstar IMAGE.SQFS "... *.gz" < archive.tar Exclude any file which matches the wildcard pattern "*.gz" anywhere within the tar file. The initial "..." indicates the wildcard pattern is "non-anchored" and will match anywhere. .PP Note: when passing wildcarded names to Sqfstar, they should be quoted (as in the above examples), to ensure that they are not processed by the shell. .SH AUTHOR Written by Phillip Lougher .SH COPYRIGHT Copyright \(co 2022 Phillip Lougher .PP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .SH "SEE ALSO" mksquashfs(1), unsquashfs(1), sqfscat(1) .PP The README for the Squash\-tools 4.5.1 release, describing the new features can be read here https://github.com/plougher/squashfs\-tools/blob/master/README\-4.5.1 .PP The Squashfs\-tools USAGE guide can be read here https://github.com/plougher/squashfs\-tools/blob/master/USAGE