Lines Matching +full:squashfs +full:- +full:root
1 SQUASHFS 4.3 - A squashed read-only filesystem for Linux
3 Copyright 2002-2014 Phillip Lougher <phillip@lougher.demon.co.uk>
7 Welcome to Squashfs version 4.3. Please read the README-4.3 and CHANGES files
10 Squashfs is a highly compressed read-only filesystem for Linux.
16 Squashfs is intended for general read-only filesystem use, for archival
21 1. SQUASHFS OVERVIEW
22 --------------------
26 2. Squashfs stores full uid/gids (32 bits), and file creation time.
36 5. Squashfs can use block sizes up to 1Mbyte (the default size is 128K).
46 --------------------------------
48 Squashfs filesystems now have extended attribute support. The
55 5. Inline and out-of-line xattr values supported for higher performance
57 de-duplication.
71 2. USING SQUASHFS
72 -----------------
74 Squashfs filesystems should be mounted with 'mount' with the filesystem type
75 'squashfs'. If the filesystem is on a block device, the filesystem can be
78 %mount -t squashfs /dev/sda1 /mnt
80 Will mount the squashfs filesystem on "/dev/sda1" under the directory "/mnt".
82 If the squashfs filesystem has been written to a file, the loopback device
85 %mount -t squashfs image /mnt -o loop
87 Will mount the squashfs filesystem in the file "image" under
91 -------------
94 -----------------------------------
96 As squashfs is a read-only filesystem, the mksquashfs program must be used to
97 create populated squashfs filesystems.
99 SYNTAX:./mksquashfs source1 source2 ... dest [options] [-e list of exclude
103 -comp <comp> select <comp> compression
109 -b <block_size> set data block to <block_size>. Default 128 Kbytes
112 -no-exports don't make the filesystem exportable via NFS
113 -no-sparse don't detect sparse files
114 -no-xattrs don't store extended attributes
115 -xattrs store extended attributes (default)
116 -noI do not compress inode table
117 -noD do not compress data blocks
118 -noF do not compress fragment blocks
119 -noX do not compress extended attributes
120 -no-fragments do not use fragments
121 -always-use-fragments use fragment blocks for files larger than block size
122 -no-duplicates do not perform duplicate checking
123 -all-root make all files owned by root
124 -force-uid uid set all file uids to uid
125 -force-gid gid set all file gids to gid
126 -nopad do not pad filesystem to a multiple of 4K
127 -keep-as-directory if one source directory is specified, create a root
132 -p <pseudo-definition> Add pseudo file definition
133 -pf <pseudo-file> Add list of pseudo file definitions
134 -sort <sort_file> sort files according to priorities in <sort_file>. One
135 file or dir with priority per line. Priority -32768 to
137 -ef <exclude_file> list of exclude dirs/files. One per line
138 -wildcards Allow extended shell wildcards (globbing) to be used in
140 -regex Allow POSIX regular expressions to be used in exclude
144 -noappend do not append to existing filesystem
145 -root-becomes <name> when appending source files/directories, make the
146 original root become a subdirectory in the new root
148 to the original root
151 -version print version, licence and copyright message
152 -exit-on-error treat normally ignored errors as fatal
153 -recover <name> recover filesystem data using recovery file <name>
154 -no-recovery don't generate a recovery file
155 -info print files written to filesystem
156 -no-progress don't display the progress bar
157 -progress display progress bar when using the -info option
158 -processors <number> Use <number> processors. By default will use number of
160 -mem <size> Use <size> physical memory. Currently set to 1922M
165 -root-owned alternative name for -all-root
166 -noInodeCompression alternative name for -noI
167 -noDataCompression alternative name for -noD
168 -noFragmentCompression alternative name for -noF
169 -noXattrCompression alternative name for -noX
171 -Xhelp print compressor options for selected compressor
175 -Xcompression-level <compression-level>
176 <compression-level> should be 1 .. 9 (default 9)
177 -Xwindow-size <window-size>
178 <window-size> should be 8 .. 15 (default 15)
179 -Xstrategy strategy1,strategy2,...,strategyN
185 -Xalgorithm <algorithm>
192 -Xcompression-level <compression-level>
193 <compression-level> should be 1 .. 9 (default 8)
196 -Xhc
199 -Xbcj filter1,filter2,...,filterN
203 -Xdict-size <dict-size>
204 Use <dict-size> as the XZ dictionary size. The dictionary size
209 Example dict-sizes are 75%, 50%, 37.5%, 25%, or 32K, 16K, 8K
213 files/directories that will form the squashfs filesystem. If a single
214 directory is specified (i.e. mksquashfs source output_fs) the squashfs
215 filesystem will consist of that directory, with the top-level root
219 the specified sources into a single filesystem, with the root directory
233 This will generate a squashfs filesystem with root entries
240 This will create a squashfs filesystem with the root containing
256 The -keep-as-directory option can be used when only one source directory
257 is specified, and you wish the root to contain that directory, rather than
262 %mksquashfs /home/phillip/test output_fs -keep-as-directory
264 This is the same as example 1, except for -keep-as-directory.
265 This will generate a root directory containing directory "test",
268 The Dest argument is the destination where the squashfs filesystem will be
270 doesn't exist it will be created, if it does exist and a squashfs
271 filesystem exists on it, mksquashfs will append. The -noappend option will
276 -------------------------------------------------------------------
279 algorithm. This algorithm offers a good trade-off between compression
282 Squashfs also supports LZ4, LZO and XZ (LZMA2) compression. LZO offers worse
287 its usefulness is currently limited to using Squashfs with Mksquashfs/Unsquashfs
290 If you're not building the squashfs-tools and kernel from source, then
298 -Xcompression-level <compression-level>
299 <compression-level> should be 1 .. 9 (default 9)
300 -Xwindow-size <window-size>
301 <window-size> should be 8 .. 15 (default 15)
302 -Xstrategy strategy1,strategy2,...,strategyN
308 -Xalgorithm <algorithm>
315 -Xcompression-level <compression-level>
316 <compression-level> should be 1 .. 9 (default 8)
319 -Xhc
322 -Xbcj filter1,filter2,...,filterN
326 -Xdict-size <dict-size>
327 Use <dict-size> as the XZ dictionary size. The dictionary size
332 Example dict-sizes are 75%, 50%, 37.5%, 25%, or 32K, 16K, 8K
344 for LZO/LZ4 best means a tradeoff between compression and (de)-compression
348 -----------------------------------------------------------
362 The -noI, -noD and -noF options (also -noInodeCompression, -noDataCompression
363 and -noFragmentCompression) can be used to force mksquashfs to not compress
367 The -no-fragments tells mksquashfs to not generate fragment blocks, and rather
368 generate a filesystem similar to a Squashfs 1.x filesystem. It will of course
369 still be a Squashfs 4.0 filesystem but without fragments, and so it won't be
370 mountable on a Squashfs 1.x system.
372 The -always-use-fragments option tells mksquashfs to always generate
378 is because to do so leads to a 10 - 20% drop in sequential I/O performance, as a
384 The -no-duplicates option tells mksquashfs to not check the files being
389 The -b option allows the block size to be selected, both "K" and "M" postfixes
394 ---------------------------------------------------
400 The options -all-root and -root-owned (both do exactly the same thing) force all
401 file uids/gids in the generated Squashfs filesystem to be root. This allows
402 root owned filesystems to be built without root access on the host machine.
404 The "-force-uid uid" option forces all files in the generated Squashfs
406 name (i.e. "root") or by number.
408 The "-force-gid gid" option forces all files in the generated Squashfs
410 either by name (i.e. "root") or by number.
413 ---------------------------------------
415 The -e and -ef options allow files/directories to be specified which are
416 excluded from the output filesystem. The -e option takes the exclude
417 files/directories from the command line, the -ef option takes the
427 ----------------------------
435 %mksquashfs /tmp/source1 source2 output_fs -e ex1 /tmp/source1/ex2 out/ex3
441 ------------------------------------
444 regex expression. To enable wildcard matching specify the -wildcards
445 option, and to enable regex matching specify the -regex option. In most
446 cases the -wildcards option should be used rather than -regex because wildcard
450 "non-anchored". An anchored exclude is one which matches from the root of the
451 directory and nowhere else, a non-anchored exclude matches anywhere. For
453 "a/b" will match "a/b" at the root of the directory hierarchy, but
454 it will not match the "/a/b" sub-directory within directory "c", whereas a
455 non-anchored exclude would.
461 1. mksquashfs example image.sqsh -wildcards -e 'test/*.gz'
465 2. mksquashfs example image.sqsh -wildcards -e '*/[Tt]est/example*'
472 3. mksquashfs example image.sqsh -wildcards -e 'test/!(*data*).gz'
477 Non-anchored excludes
481 For this non-anchored excludes can be used, specified by pre-fixing the
486 1. mksquashfs example image.sqsh -wildcards -e '... *.gz'
492 2. mksquashfs example image.sqsh -wildcards -e '... [Tt]est/*.gz'
499 3. mksquashfs example image.sqsh -wildcards -e '... !(*data*).gz'
505 ---------------------------
507 The -e and -ef exclude options are usefully used in archiving the entire
511 %mksquashfs / /tmp/root.sqsh -e proc /tmp/root.sqsh
513 Multiple -ef options can be specified on the command line, and the -ef
514 option can be used in conjuction with the -e option.
516 3.6 Appending to squashfs filesystems
517 -------------------------------------
519 Running squashfs with the destination directory containing an existing
521 the source items are added to the existing root directory.
523 To make this clear... An existing filesystem "image" contains root entries
531 Will create a new "image" with root entries "old1", "old2", "file1", "file2" and
536 %mksquashfs /home/phillip/test image -keep-as-directory
538 Will create a new "image" with root entries "old1", "old2", and "test".
540 '-keep-as-directory' adds the source directory rather than the
545 %mksquashfs /home/phillip/test image -keep-as-directory -root-becomes
546 original-root
548 Will create a new "image" with root entries "original-root", and "test". The
549 '-root-becomes' option specifies that the original root becomes a subdirectory
550 in the new root, with the specified name.
552 The append option with file duplicate detection, means squashfs can be
553 used as a simple versioning archiving filesystem. A squashfs filesystem can
554 be created with for example the linux-2.4.19 source. Appending the linux-2.4.20
560 -----------------------------------
562 Recovery files are created when appending to existing Squashfs
572 avoid cluttering the filesystem. If Mksquashfs aborts, the "-recover"
576 mksquashfs dummy image.sqsh -recover squashfs_recovery_image.sqsh_1234
579 "-no-recovery" option.
582 -----------------------
585 and block devices to be specified and added to the Squashfs filesystem being
588 requiring root access.
596 Two Mksquashfs options are supported, -p allows one pseudo file to be specified
597 on the command line, and -pf allows a pseudo file to be specified containing a
601 ------------------------------
612 by running "/bin/sh -c command". The stdout becomes the contents of
618 -----------------------
620 /somedir/dmesg f 444 root root dmesg
625 ----------------------
627 RELEASE f 444 root root \
628 if [ ! -e /tmp/ver ]; then \
634 echo -n `cat /tmp/release`; \
635 echo "-dev #"$ver `date` "Build host" `hostname`
638 an incrementing version number. The incrementing version is a side-effect
648 --------------------------------------------
650 input f 444 root root dd if=/dev/sda1 bs=1024 count=10
654 Squashfs filesystem, the above allows input from these special files to be
655 captured and placed in the Squashfs filesystem.
658 -------------------------------------------
665 b - for block devices, and
666 c - for character devices
674 /dev/chr_dev c 666 root root 100 1
678 a block device "/dev/blk_dev" with major:minor 200:200, both with root
679 uid/gid and a mode of rw-rw-rw.
682 ---------------------------
694 /pseudo_dir d 666 root root
696 creates a directory "/pseudo_dir" with root uid/gid and mode of rw-rw-rw.
699 -----------------------------------------------
711 dmesg m 666 root root
714 root uid/gid and a mode of rw-rw-rw, overriding the attributes obtained
718 -------------------------
720 The -info option displays the files/directories as they are compressed and
725 The -nopad option informs mksquashfs to not pad the filesystem to a 4K multiple.
732 -------------
734 Unsquashfs allows you to decompress and extract a Squashfs filesystem without
741 -v[ersion] print version, licence and copyright information
742 -d[est] <pathname> unsquash to <pathname>, default "squashfs-root"
743 -n[o-progress] don't display the progress bar
744 -no[-xattrs] don't extract xattrs in file system
745 -x[attrs] extract xattrs in file system (default)
746 -u[ser-xattrs] only extract user xattrs in file system.
748 -p[rocessors] <number> use <number> processors. By default will use
750 -i[nfo] print files as they are unsquashed
751 -li[nfo] print files as they are unsquashed with file
752 attributes (like ls -l output)
753 -l[s] list filesystem, but don't unsquash
754 -ll[s] list filesystem with file attributes (like
755 ls -l output), but don't unsquash
756 -f[orce] if file already exists then overwrite
757 -s[tat] display filesystem superblock information
758 -e[f] <extract file> list of directories or files to extract.
760 -da[ta-queue] <size> Set data queue to <size> Mbytes. Default 256
762 -fr[ag-queue] <size> Set fragment queue to <size> Mbytes. Default
764 -r[egex] treat extract names as POSIX regular expressions
777 files/directories as they appear within the Squashfs filesystem. The
781 The extract files can also be given in a file using the "-e[f]" option.
806 ----------------------
808 The "-ls" option can be used to list the contents of a filesystem without
809 decompressing the filesystem data itself. The "-lls" option is similar
810 but it also displays file attributes (ls -l style output).
812 The "-info" option forces Unsquashfs to print each file as it is decompressed.
813 The -"linfo" is similar but it also displays file attributes.
815 The "-dest" option specifies the directory that is used to decompress
817 decompressed to the directory "squashfs-root" in the current working directory.
819 The "-force" option forces Unsquashfs to output to the destination
822 filled directory. Without the "-force" option, Unsquashfs will
825 so the "-force" option should be used with caution.
827 The "-stat" option displays filesystem superblock information. This is
831 Unsquashfs can decompress all Squashfs filesystem versions, 1.x, 2.x, 3.x and
835 --------------------
837 A squashfs filesystem consists of a maximum of nine parts, packed together on a
840 ---------------
842 |---------------|
845 |---------------|
848 |---------------|
850 |---------------|
853 |---------------|
856 |---------------|
859 |---------------|
862 |---------------|
865 ---------------
869 written the completed super-block, compression options, inode, directory,
873 -----------------------
876 dictionary size). If non-default compression options have been used, then
880 ----------
884 block is uncompressed. A block will be uncompressed if the -noI option is set,
889 by a 48-bit number which encodes the location of the compressed metadata block
903 ---------------
933 -------------
936 compressed fragment block (tail-end packed block). The compressed size
944 The index cache allows Squashfs to handle large files (up to 1.75 TiB) while
945 retaining a simple and space-efficient block list on disk. The cache
952 -------------------------
962 ------------------------
965 converted to 32-bit uids/gids using an id look up table. This table is
971 ----------------
973 To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems
974 can optionally (disabled with the -no-exports Mksquashfs option) contain
976 enable Squashfs to map inode numbers passed in filehandles to the inode
985 ---------------
996 also allows values to be de-duplicated, the value being stored once, and
1000 To reduce overhead in inodes, rather than storing the on-disk
1001 location of the xattr list inside each inode, a 32-bit xattr id
1006 --------------
1008 Squashfs was written by Phillip Lougher, email phillip@lougher.demon.co.uk,