0
I've created a squashfs from a small rootfs directory for emebedded devices:
mksquashfs rootfs_image rootfs.squashfs -b 1024k -comp xz -Xbcj x86
I've successfully copied this squashfs into the device's NOR flash and setup the bootloader (U-boot) and the kernel to use this NOR as the rootfs.
However, some files are good (i.e. I can cat them), but some are not!
Let's see these in concrete examples:
# cat /var/www/hello.html
# hi, hello
# head /lib/modules/3.10.14/rtl8189es.ko
[ 21.940062] SQUASHFS error: xz_dec_run error, data probably corrupt
[ 21.946652] SQUASHFS error: squashfs_read_data failed to read block 0x1b9f76
[ 21.953963] SQUASHFS error: Unable to read fragment cache entry [1b9f76]
[ 21.960960] SQUASHFS error: Unable to read page, block 1b9f76, size 3c9d8
... (last 2 lines are repeated for a while
head: rtl8189es.ko: Input/output error
#
What is the problem here and how can I solve it? Is there any easy way to check a squashfs if it's corrupted?
Please note that the squashfs file is not corrupted, as it can be unsquashfs-ed on the host machine without any problems.