squashfs-tools

plougherGPL-2.0活跃维护

创建和解压 Squashfs 只读文件系统的命令行工具集,常用于制作 Linux 镜像、嵌入式根文件系统和压缩归档包。

tools to create and extract Squashfs filesystems

4.7.5发布于 2026-03-01 23:05 UTC933star237fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
cd squashfs-tools && make
sudo make install
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

官方 Squashfs 工具集,用来创建和解包只读压缩文件系统镜像

创建和解压 Squashfs 只读文件系统的命令行工具集,常用于制作 Linux 镜像、嵌入式根文件系统和压缩归档包。

核心能力

  • 提供 mksquashfs 生成 Squashfs 镜像
  • 提供 unsquashfs 解包并提取镜像内容
  • 在 squashfs-tools 目录执行 make 即可构建
  • 可编辑 Makefile 选择压缩算法与安装路径
  • 支持配置 XATTR 与并行读取线程数

容易踩的坑

构建前需进入 squashfs-tools 源码子目录,顶层目录直接 make 无效;压缩算法、XATTR 支持和安装路径需改 Makefile 而非命令行参数;具体用法和安装细节在 Documentation/4.7.5 下的 README.md 与 INSTALL.md,README 本身未展开

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本4.7.5
  1. 4.7.5Squashfs tools 4.7.5最新正式版2026-03-01 · 2026-03-01 23:05 UTC

    4.7.5 (01 MAR 2026): Bug fix release (mostly)

    1. New options & improvements

      1. Mksquashfs/Sqfstar: new -numeric-owner option which uses the numeric uid and gid in the tarfile rather than the user name or the group name.
      2. Error messages produced by the date command and symbolic mode parser printed by the pager rather than to stderr.
    2. Major bug fixes

      1. Fix possible corruption of Squashfs filesystems if sparse files present (caused by elimination of "fragment block stall" in 4.7).
      2. Fix pseudo file f/F definition (create file from output of command) when input has greater than a block of contiguous zeros (caused by sparse file reading optimisation in 4.7.3).
      3. Fix issue where files which are larger than available buffer space will not be found to be a duplicate (caused by elimination of "fragment block stall" in 4.7).
      4. Fix broken Mksquashfs -max-depth option.
    3. Minor bug fixes

      1. Mksquashfs: segmentation fault if no sources and pseudo file root ("/") definition only defines an Xattr but no metadata.
      2. Mksquashfs/Sqfstar: -offset should be rejected if -stream option used.
      3. Mksquashfs: hard links to symbolic links may be ignored (first access to symbolic link after creation).
      4. Pseudo files: a M (modify with timestamp) definition on a directory causes pseudo file definitions below it in hierarchy to be ignored.
      5. Pseudo files: a m/M modify definition breaks checks that a directory exists and it is a directory (rather than something else).
      6. Mksquashfs: -max-depth option marks empty directories as having excluded files.
      7. Mksquashfs/Sqfstar should produce identical output with only pseudo files.
      8. Define SEEK_DATA if not defined by C library.
  2. 4.7.4Squashfs tools 4.7.42025-11-09 · 2025-11-09 23:32 UTC
    查看更新说明

    4.7.4 (09 NOV 2025): Bug fix release

    1. Fix regression introduced by SEEK_DATA optimisation
    2. Fix regression introduced by -stream option
    3. Fix build on big-endian machines (Daniel Néri)
  3. 4.7.3Squashfs tools 4.7.32025-11-05 · 2025-11-05 23:13 UTC
    查看更新说明

    Note: please download squashfs-tools-4.7.3.tar.gz, not the auto-generated files. The .gitattributes file unexpectedly deleted README.md in Documentation/4.7.3 in addition to the top-level README.md. The squashfs-tools-4.7.3.tar.gz has this fixed.

    4.7.3 (05 NOV 2025): Mksquashfs streaming output, optimised reading of Sparse files using SEEK_DATA, new aligned action, documentation formatted in markdown.

    1. Mksquashfs/Sqfstar can now stream output filesystem to STDOUT.

      1. New -stream option which directs filesystem to STDOUT. This can be used to send the output of Mksquashfs to another computer via ssh, where there isn't enough disk space on the host computer.
      2. New -fix option to fix-up the streamed filesystem. The streamed filesystem will have the super-block written to the end of the filesystem. The -fix option writes the super-block to the usual start of the filesystem.
      3. Unsquashfs has been extended to recognise a streamed filesystem with the super-block at the end.
    2. Reading of sparse files has been optimised

      1. If the filesystem supports the SEEK_DATA lseek operation, this is used to skip holes when reading sparse files. This can produce a 240 times speed improvement.
      2. Holes which are multiple Squashfs data blocks in size are now handled as large multi-block sparse regions, which further speed up sparse file handling. This can produce a six times speed improvement (in total 1500 times).
    3. New Align(value) action, which will align file to <value>

      1. Any file which matches test operator(s) will be aligned to <value> byte boundary, where <value> is a pure power of two and 64 Megabytes or less.
      2. Any file which has an alignment applied will be separately compressed and not packed into a fragment block.
    4. Squashfs tools documentation has been formatted in GitHub markdown

      1. New CHANGES.md changelog file
      2. New 4.7.3 README.md
      3. New USAGE.md, USAGE-MKSQUASHFS.md, USAGE-UNSQUASHFS.md, USAGE-SQFSTAR.md and USAGE-SQFSCAT.md
  4. 4.7.2Squashfs tools 4.7.22025-08-18 · 2025-08-18 20:35 UTC
    查看更新说明
    4.7.2   18 AUG 2025     Fix build with non-static inline
    
            1. print_pager: make inline quoted_bs_char() static.
    
  5. 4.7.1Squashfs tools 4.7.12025-08-18 · 2025-08-18 18:04 UTC
    查看更新说明
    4.7.1   18 AUG 2025     Minor improvements and bug fix release
    
            1. Fix regression in -offset (-o) where it stopped working in Mksquashfs
               and Sqfstar.
            2. Allow arguments (spaces) in the PAGER environment variable, rather
               than just a command name.  Also support quoted strings, string
               concatenation and backslashes.
            3. Don't use a pager to display the help text if the PAGER environment
               variable is empty.
            4. Add -no-pager option which if specified means a pager won't be used
               to display the help text.
            5. Add -cols option which specifies the number of columns used to
               display the help text.  This is useful if output is not to a
               terminal.
            6. Fix regression in tar file reading, where file exclusion would leak
               cache (memory) leading in some cases to Sqfstar hanging.
            7. Handle negative dates in tar files (before the start of the epoch of
               1970-01-01), and round them up to the start of the epoch.
            8. Add --version spelling in addition to -version, as this appears to be
               a common mistake.
            9. Add missing include files in print_pager.c (Ros Burton).
            10. Add missing include file in thread.c (Shiji Yang).
            11. Fix BLOCK_READER_THREADS typo in Makefile (Alexandru Ardelean).
    

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Welcome to Squashfs-tools!

    This is the official Squashfs-tools repository.

    To build and install the tools please read the Documentation/4.7.5/INSTALL.md file

    To find out how use the latest release please start by reading Documentation/4.7.5/README.md

    The latest 4.7.5 release may have already been packaged for your distribution, please see "Packaging status" below.

    Thanks

    Contents of the repository

    The top-level directory contains the following files:

    • ACKNOWLEDGEMENTS - This contains some historical acknowlegements, this file has mostly been replaced by the Github issues tracker.
    • CHANGES - a reverse chronological list of changes from the latest release to the earliest release.
    • CHANGES.md - the above file in markdown format.
    • CONTRIBUTING.md - how to ask for features (feature requests), and the way to do Pull requests.
    • COPYING - GNU general public license file.
    • INSTALL - where to get the INSTALL file for your version of squashfs-tools.
    • README - where to get the README for your version of squashfs-tools.
    • README.md - The file displayed here.
    • SECURITY.md - Where to report security issues.
    • USAGE - where to get the USAGE files for your version of squashfs-tools.

    The top-level directory has the following directories:

    • Documentation - this directory contains documentation for various versions of squashfs-tools, and it is split into subdirectories for versions 4.5 through to 4.7.6, the latest released version is 4.7.5, and the development version will become 4.7.6. It also has a directory containing prebuilt manpages for the latest development version of squashfs-tools.
    • squashfs-tools - the source code directory, enter this directory and type make to build, or sudo make install to install. Edit the Makefile to change the compression algorithms built and other defaults including install PATH, XATTR support, and number of parallel reader threads.