Closed m94mni closed 2 years ago
rdsquashfs can read the image, so I suspect unsquashfs.
Hi @m94mni ,
this is related to issue #85.
To summarize the underlying problem: SquashFS stores the on-disk size of a directory redundantly: Every entry has it's own size field and the inode stores the total sum. However, the sum is stored off-by-3, and the kernel uses that magic offset to fudge in the entries for .
and ..
, but in the actual reading loop uses the individual entry size. This means, that the kernel implementation works perfectly fine if the exact size is mistakenly stored in the inode. A directory with at least 1 entry will always be >3 bytes, because meta data is also accounted for.
Squashfs-tools-ng started out by reverse engineering the format (none of this was documented before) and primarily testing against the kernel implementation. While the kernel side worked, squashfs-tools and 7zip (see #85) rely on the value in the inode, so they could not unpack such archives generated by squashfs-tools-ng.
A fix is included in most recent 1.1.3 release and has been backported to the 1.0.x branch, where it is part of the 1.0.6 release.
Thanks for the context, newer versions do work!
I reported this here:
https://github.com/plougher/squashfs-tools/issues/168
But I'm not sure if perhaps the issue is in this package. In short:
Mounting the image works ok though.