How to handle squashfs in Windows

Sriram Chowdary picture Sriram Chowdary · Apr 7, 2016 · Viewed 20.1k times · Source

I have to update some files in a squashfs image file. I found a tool in Linux but not in Windows.

Can anyone help?

Answer

Eirik Fuller picture Eirik Fuller · Apr 27, 2016

7-Zip is capable of opening squashfs images and extracting their files. I tested this on 7-Zip version 15.14 [64-bit] on Windows 10 with a squashfs image which uses xz compression.

7-Zip does not appear to list squashfs among the archive formats when creating an archive, so you'll need to look elsewhere if you want to generate a squashfs image with modified files. The Wikipedia page for squashfs indicates that mksquashfs and unsquashfs have been ported to some versions of Windows (it also mentions 7-Zip).

André's answer suggests Cygwin as a way to compile and run commands from squashfs-tools. The Windows Subsystem for Linux provides another way to run mksquashfs and unsquashfs. On my Windows 10 system in which Ubuntu 14.04.4 is running via WSL, the following command installed squashfs-tools, after which mksquashfs and unsquashfs are available.

sudo apt install squashfs-tools

With either approach to using squashfs-tools (Cygwin or WSL), 7-Zip is unnecessary for updating files in a squashfs image.