Squashfs
m (Add Snap link.) |
m (Adjusted layout in the top area for better legibility.) |
||
(4 intermediate revisions by one user not shown) | |||
Line 3: | Line 3: | ||
|subcat=Filesystem | |subcat=Filesystem | ||
|extensions={{ext|sfs}}<ref>[https://github.com/plougher/squashfs-tools/issues/259 What are the commonly accepted file name extension for squashfs? #259 - GitHub]</ref> | |extensions={{ext|sfs}}<ref>[https://github.com/plougher/squashfs-tools/issues/259 What are the commonly accepted file name extension for squashfs? #259 - GitHub]</ref> | ||
+ | |wikidata={{wikidata|Q389314}} | ||
+ | |compression=lossless, optional | ||
+ | |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 | ||
}} | }} | ||
− | '''Squashfs''' is | + | '''Squashfs''' is read-only filesystem that features optional compression<ref>[https://github.com/plougher/squashfs-tools/issues/206 <nowiki>[</nowiki>feature request<nowiki>]</nowiki>: mksquashfs: Add --no-compression flag to disable all compression #206 - squashfs-tools - GitHub]</ref> 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.<ref>[https://fedoraproject.org/wiki/Changes/EROFSforLiveMedia EROFS For Live Media - Fedora Project]</ref> It is also used in: |
+ | * Embedded devices like network routers<ref>[https://openwrt.org/docs/techref/flash.layout The OpenWrt Flash Layout - Technical Reference - openwrt.org]</ref><ref>[https://github.com/ReFirmLabs/binwalk/issues/301 problems extracting squashfs-image #301 - binwalk - GitHub]</ref><ref>[https://embeddedbits.org/reverse-engineering-my-routers-firmware-with-binwalk-embeddedbits/ Reverse engineering my router's firmware with binwalk - embeddedbits.org]</ref>, or in Android powered devices.<ref>[https://android.stackexchange.com/questions/258236/squashfs-explanation-for-android-system SquashFS explanation for Android system - Android Enthusiasts - Stack Exchange]</ref> | ||
+ | * Modern AppImage,<ref>[[wikipedia:AppImage#History|History of AppImage - Wikipedia]]</ref>, or [[Snap]]<ref>[[wikipedia:Snap_(software)#Support|Snap - support section - Wikipedia]]</ref> as a way portable software distribution on Linux. | ||
+ | * Storage of other data, such as disk images.<ref>[https://www.foo.be/2017/01/Squashfs_As_A_Forensic_Container Squashfs As a Forensic Container - foo.be]</ref> | ||
+ | |||
+ | Under [[Microsoft Windows|Windows]], SquashFS contents can be opened/extracted via [[7-Zip]].<ref>[https://stackoverflow.com/a/36877207 python2.7 How to handle squashfs in Windows - StackOverflow]</ref> | ||
See also [[cramfs]]. | See also [[cramfs]]. | ||
+ | |||
+ | == Identification == | ||
+ | SquashFS files created on little-endian machines begins with hexadecimal {{magic|68 73 71 73}}, which translates to "hsqs" in ASCII. SquashFS files created on big-endian machines with hexadecimal {{magic|73 71 73 68}}, which translates to "sqsh" in ASCII. | ||
== Examples == | == Examples == | ||
Line 25: | Line 38: | ||
== Sample files == | == Sample files == | ||
* {{DexvertSamples|archive/squashFS}} | * {{DexvertSamples|archive/squashFS}} | ||
+ | * [https://discmaster.textfiles.com/search?mode=deep&extension=.sfs&format=squashFS Search results for .sfs extension and is squashFS format - Discmaster.textfiles.com] | ||
== Links == | == Links == | ||
* [[Wikipedia: SquashFS]] | * [[Wikipedia: SquashFS]] | ||
− | * [ | + | * [https://squashfs.sourceforge.net/ Squashfs website] |
* [https://sourceforge.net/projects/squashfs/ SourceForge project page] | * [https://sourceforge.net/projects/squashfs/ SourceForge project page] | ||
* [https://github.com/plougher/squashfs-tools GitHub project page] | * [https://github.com/plougher/squashfs-tools GitHub project page] |
Latest revision as of 06:55, 20 August 2025
Squashfs is read-only filesystem that features optional compression[3] 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.[4] It is also used in:
- Embedded devices like network routers[5][6][7], or in Android powered devices.[8]
- Modern AppImage,[9], or Snap[10] as a way portable software distribution on Linux.
- Storage of other data, such as disk images.[11]
Under Windows, SquashFS contents can be opened/extracted via 7-Zip.[12]
See also cramfs.
Contents |
[edit] 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.
[edit] 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
[edit] Software
- 7-Zip
- Squashfuse (Unix-like only)
[edit] Sample files
- dexvert samples — archive/squashFS
- Search results for .sfs extension and is squashFS format - Discmaster.textfiles.com
[edit] Links
[edit] References
- ↑ What are the commonly accepted file name extension for squashfs? #259 - GitHub
- ↑ (Squashfs-announce) Squashfs1.2 released - 2003-03-13 05:30:45 - SourceForge mailman
- ↑ [feature request]: mksquashfs: Add --no-compression flag to disable all compression #206 - squashfs-tools - GitHub
- ↑ EROFS For Live Media - Fedora Project
- ↑ The OpenWrt Flash Layout - Technical Reference - openwrt.org
- ↑ problems extracting squashfs-image #301 - binwalk - GitHub
- ↑ Reverse engineering my router's firmware with binwalk - embeddedbits.org
- ↑ SquashFS explanation for Android system - Android Enthusiasts - Stack Exchange
- ↑ History of AppImage - Wikipedia
- ↑ Snap - support section - Wikipedia
- ↑ Squashfs As a Forensic Container - foo.be
- ↑ python2.7 How to handle squashfs in Windows - StackOverflow