SquashFS

Last updated
Squashfs
Developer(s) Phillip Lougher, Robert Lougher
Introduced2002 with Linux
Limits
Max volume size16 EiB (264) bytes
Max file size16 EiB (264) bytes
Features
Attributes POSIX and extended attributes
Transparent
compression
gzip LZMA LZO LZMA2 LZ4 Zstd
Other
Supported
operating systems
Linux
Website github.com/plougher/squashfs-tools

Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is also the name of free software, licensed under the GPL, for accessing Squashfs filesystems.

Contents

Squashfs is intended for general read-only file-system use and in constrained block-device memory systems (e.g. embedded systems) where low overhead is needed.

Uses

Squashfs is used by the Live CD versions of Arch Linux, Clonezilla, Debian, Fedora, Gentoo Linux, KDE neon, Kali Linux, Linux Mint, NixOS, Salix, Ubuntu, openSUSE and on embedded distributions such as the OpenWrt [1] and DD-WRT router firmware. It is also used in Chromecast, [2] in Tiny Core Linux for packaging extensions, and for the system partitions of some Android releases (Android Nougat). [3] It is often combined with a union mount filesystem, such as UnionFS, OverlayFS, or aufs, to provide a read-write environment for live Linux distributions. This takes advantage of both Squashfs's high-speed compression abilities and the ability to alter the distribution while running it from a live CD. Distributions such as Debian Live, Mandriva One, Puppy Linux, Salix Live and Slax use this combination. The AppImage project, which aims to create portable Linux applications, uses Squashfs for creating AppImages. The Snappy package manager also uses Squashfs for its ".snap file format".

Squashfs is also used by Linux Terminal Server Project and Splashtop. The tools unsquashfs and mksquashfs have been ported to Windows NT [4] Windows 8.1. [5] 7-Zip also supports Squashfs. [6]

History

Squashfs was initially maintained as an out-of-tree Linux patch. The initial version 1.0 was released on 23 October 2002. [7] In 2009 Squashfs was merged into Linux mainline as part of Linux 2.6.29. [8] [9] In that process, the backward-compatibility code for older formats was removed. Since then the Squashfs kernel-space code has been maintained in the Linux mainline tree, while the user-space tools remain on the project's GitHub page. [10]

The original version of Squashfs used gzip compression, although Linux kernel 2.6.34 added support for LZMA [11] and LZO compression, [12] Linux kernel 2.6.38 added support for LZMA2 compression (which is used by xz), [13] Linux kernel 3.19 added support for LZ4 compression, [14] and Linux kernel 4.14 added support for Zstandard compression. [15]

Linux kernel 2.6.35 added support for extended file attributes. [16]

See also

Related Research Articles

XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3. XFS was ported to the Linux kernel in 2001; as of June 2014, XFS is supported by most Linux distributions; Red Hat Enterprise Linux uses it as its default file system.

ReiserFS is a general-purpose, journaling file system initially designed and implemented by a team at Namesys led by Hans Reiser and licensed under GPLv2. Introduced in version 2.4.1 of the Linux kernel, it was the first journaling file system to be included in the standard kernel. ReiserFS was the default file system in Novell's SUSE Linux Enterprise until Novell decided to move to ext3 for future releases on October 12, 2006.

ext2, or second extended file system, is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same principles as the Berkeley Fast File System from BSD, it was the first commercial-grade filesystem for Linux.

<span class="mw-page-title-main">7-Zip</span> Open-source file archiver

7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as "archives". It is developed by Igor Pavlov and was first released in 1999. 7-Zip has its own archive format called 7z, but can read and write several others.

vmlinux Executable file containing the Linux kernel

vmlinux is a statically linked executable file that contains the Linux kernel in one of the object file formats supported by Linux, which includes Executable and Linkable Format (ELF) and Common Object File Format (COFF). The vmlinux file might be required for kernel debugging, symbol table generation or other operations, but must be made bootable before being used as an operating system kernel by adding a multiboot header, bootsector and setup routines.

seccomp is a computer security facility in the Linux kernel. seccomp allows a process to make a one-way transition into a "secure" state where it cannot make any system calls except exit , sigreturn , read and write to already-open file descriptors. Should it attempt any other system calls, the kernel will either just log the event or terminate the process with SIGKILL or SIGSYS. In this sense, it does not virtualize the system's resources but isolates the process from them entirely.

In Linux systems, initrd is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted.

A kernel is a component of a computer operating system. A comparison of system kernels can provide insight into the design and architectural choices made by the developers of particular operating systems.

The following tables compare general and technical information for a number of file systems.

ext4 is a journaling file system for Linux, developed as the successor to ext3.

Btrfs is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager, developed together. It was founded by Chris Mason in 2007 for use in Linux, and since November 2013, the file system's on-disk format has been declared stable in the Linux kernel.

<span class="mw-page-title-main">Xarchiver</span>

Xarchiver is a front-end to various command line archiving tools for Linux and BSD operating systems, designed to be independent of the desktop environment. It is the default archiving application of Xfce and LXDE. Deepin's archive manager is based on Xarchiver.

<span class="mw-page-title-main">Linux kernel</span> Operating system kernel

The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally written in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU operating system, which was written to be a free (libre) replacement for Unix.

A trim command allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered to be "in use" and therefore can be erased internally.

"Everything is a file" is an idea that Unix, and its derivatives, handle input/output to and from resources such as documents, hard-drives, modems, keyboards, printers and even some inter-process and network communications as simple streams of bytes exposed through the filesystem name space. Exceptions include semaphores, processes and threads.

lzip Data compression utility

lzip is a free, command-line tool for the compression of data; it employs the Lempel–Ziv–Markov chain algorithm (LZMA) with a user interface that is familiar to users of usual Unix compression tools, such as gzip and bzip2.

LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.

Zstandard is a lossless data compression algorithm developed by Yann Collet at Facebook. Zstd is the corresponding reference implementation in C, released as open-source software on 31 August 2016.

Bcachefs is a copy-on-write (COW) file system for Linux-based operating systems. Its primary developer, Kent Overstreet, first announced it in 2015, and it was added to the Linux kernel beginning with 6.7. It is intended to compete with the modern features of ZFS or Btrfs, and the speed and performance of ext4 or XFS. It self-describes as "stable", as of December 2022.

EROFS is a lightweight read-only file system initially developed by Huawei, originally for the Linux kernel and now maintained by an open-source community from all over the world.

References

  1. "The OpenWrt Flash Layout – OpenWrt Wiki". OpenWrt.org. 2018-06-07. Retrieved 2018-06-11.
  2. "Exploitee.rs » Blog Archive » Chromecast: Exploiting the Newest Device By Google".
  3. Amadeo, Ron (May 18, 2016). "Android N Borrows Chrome OS Code for 'Seamless' Update Installation". Ars Technica.
  4. "Squashfs tools for Windows" . Retrieved 2017-09-22.
  5. "Squashfs Tools (Linux/Windows)" (in Dutch). Retrieved 2017-09-22.
  6. "7-Zip". www.7-zip.org.
  7. "Squashfs CHANGES file". 2014-08-08. Retrieved 19 April 2017.
  8. "Linux 2 6 29 -- Linux Kernel Newbies". Linux Kernel Newbies. 2009-06-10. Retrieved 19 April 2017.
  9. "Btrfs and Squashfs merged into Linux kernel - The H Open: News and Features". The H Open. 2009-01-10. Retrieved 2017-04-19.
  10. "Squashfs README file". GitHub . 2021-07-23. Retrieved 23 July 2021.
  11. "Official Squashfs LZMA". Squashfs-LZMA.org. Retrieved 2012-11-08.
  12. "Linux 2 6 34 - Linux Kernel Newbies". KernelNewbies.org. Retrieved 2012-11-08.
  13. "Linux 2 6 38 - Linux Kernel Newbies". KernelNewbies.org. Retrieved 2012-11-08.
  14. Merge of LZ4 Squashfs support to Linus Torvalds tree.
  15. "squashfs: Add zstd support · torvalds/linux@87bf54b". GitHub. Retrieved 2018-04-15.
  16. "Linux 2 6 35 - Linux Kernel Newbies". KernelNewbies.org. Retrieved 2012-11-08.