Squashfs

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Added link for magic bytes, only for FormatInfo. Added magic bytes for both little-endian and big-endian, depending on source machine. Fixed typo where magic was missing one byte at the end for little-endian.)
(FormatInfo template: Added developed by and maintained by. Likely developed by Phillip Lougher, with references to the earliest possible citation.)
Line 6: Line 6:
 
|compression=lossless, mandatory
 
|compression=lossless, mandatory
 
|magic=[https://github.com/file/file/blob/master/magic/Magdir/filesystems#L2194 68 73 71 73] (little-endian)<br />[https://github.com/file/file/blob/master/magic/Magdir/filesystems#L2191 73 71 73 68] (big-endian)
 
|magic=[https://github.com/file/file/blob/master/magic/Magdir/filesystems#L2194 68 73 71 73] (little-endian)<br />[https://github.com/file/file/blob/master/magic/Magdir/filesystems#L2191 73 71 73 68] (big-endian)
 +
|developed by=Phillip Lougher<ref>[https://sourceforge.net/p/squashfs/mailman/message/67563/ (Squashfs-announce) Squashfs1.2 released - 2003-03-13 05:30:45 - SourceForge mailman]</ref>
 +
|maintained by=Phillip Lougher
 
|released=2002
 
|released=2002
 
}}
 
}}

Revision as of 16:18, 17 August 2025

File Format
Name Squashfs
Ontology
Extension(s) .sfs[1]
Wikidata ID Q389314
Compression lossless, mandatory
Magic Bytes 68 73 71 73 (little-endian)
73 71 73 68 (big-endian)
Developed By Phillip Lougher[2]
Maintained By Phillip Lougher
Released 2002

Squashfs is a compressed read-only filesystem for Linux. Typically used as a "live image" for booting Linux off a removable storage (e.g. USB, CD/DVD), minus components like the bootloader, kernel and initramfs.[3] It is also used in modern AppImage,[4], or Snap[5] as a way portable software distribution on Linux. Squashfs can also be used to store other data, such as disk images.[6] Under Windows, Squashfs contents can be opened/extracted via 7-Zip.[7]

See also cramfs.

Contents

Identification

SquashFS files created on little-endian machines begins with hexadecimal 68 73 71 73, which translates to "hsqs" in ASCII. SquashFS files created on big-endian machines with hexadecimal 73 71 73 68, which translates to "sqsh" in ASCII.

Examples

Create a Squashfs (file system) image from current/present directory and output it into its parent directory:

 $ mksquashfs . ../example.squashfs -b 1048576 -comp xz -Xdict-size 100%

Open a Squashfs image (as root) from present directory and have its contents visible in /mnt:

 # mount example.squashfs /mnt

Open a Squashfs image (as user) from present directory and have its contents visible in /mnt/temp:

 $ squashfuse example.squashfs /mnt/temp

Software

Sample files

Links

References

  1. What are the commonly accepted file name extension for squashfs? #259 - GitHub
  2. (Squashfs-announce) Squashfs1.2 released - 2003-03-13 05:30:45 - SourceForge mailman
  3. EROFS For Live Media - Fedora Project
  4. History of AppImage - Wikipedia
  5. Snap - support section - Wikipedia
  6. Squashfs As a Forensic Container - foo.be
  7. python2.7 How to handle squashfs in Windows - StackOverflow
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox