I have to update some files in a squashfs image file. I found a tool in Linux but not in Windows.
Can anyone help?
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.
Eirik's answer solved the "unzip" part. I'll give you the entire squashfs-tools in Windows, so you can both "unzip" (unsquashfs.exe
) and "zip" (mksquashfs.exe
).
gcc-core
cygwin64-gcc-core
gcc-core
cygwin32-gcc-core
xz
liblzma5
(not sure this is needed)liblzma-devel
squashfs-tools/Makefile
:
XZ_SUPPORT = 1
LZMA_XZ_SUPPORT = 1
squashfs-tools
directory and compile with:copy-paste this
make EXTRA_CFLAGS="-Dlinux -DFNM_EXTMATCH='(1<<5)' -D'sigtimedwait(a,b,c)=sigwaitinfo(a,b)'"
make install
Now you have the squashfs tools in a Cygwin command line just like if it was Linux. As stated above, the tools are unsquashfs.exe
and mksquashfs.exe
.
Source and credits of this answer: http://domoticx.com/bestandssysteem-squashfs-tools-software/ (Dutch, I used Google Translate)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With