LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   SquashFS corrupt when mounted but using unsquashfs extracts all files without issues (https://www.linuxquestions.org/questions/linux-software-2/squashfs-corrupt-when-mounted-but-using-unsquashfs-extracts-all-files-without-issues-4175634030/)

Refractor 07-14-2018 03:07 PM

SquashFS corrupt when mounted but using unsquashfs extracts all files without issues
 
Hello everyone!

I have a particular system running kernel 3.18.67 (exact version is required for a specific vendor kernel module) and I need to make it work with SquashFS.
I also have the root file system in two images - an ext4 and a squashfs one.
When I boot the ext4 image everything works like a charm. Booting the SquashFS however shows a lot of corrupt blocks and inability to run /sbin/init or /bin/sh.

When attaching both filesystems to the machine and booting from ext4, I can mount the squashfs image and can browse some files and access some folders with success - others are returning an I/O error.

However, from the same machine, I can run unsquashfs on the squashfs filesystem and all files and folders are accessible and work as intended.

At this point I've tried changing the block size of the squashfs filesystem which results in less accessible file/folders the bigger the block size gets. So I tried going with the minimum block size (which screwed up compression rates) and still produced a minimal amount of inaccessible files/folders.

I read that BCJ filters can cause issues with SQFS but I cannot understand the issue this causes well enough to make sure whether this is the cause or not.

Any hints of what I can do next are greatly appreciated!
Thank you!

jefro 07-16-2018 12:57 PM

Squashfs had some version issues as I recall as it relates to kernel and to it's own versions.

Take a few of the suspect folders out of the squash file maybe and re-test.

Refractor 07-21-2018 03:59 PM

Thank you,
I've managed to bypass the issue by forcing GZIP compression. Got a larger filesystem, but it'll do until I figure out what's wrong with XZ.

Thanks again for pointing me in the right correction.

Kind regards,
Iskren

jefro 07-23-2018 01:31 PM

Thanks for the update and solution.


All times are GMT -5. The time now is 02:07 PM.