Cannot mount squashfs

what am I doing wrong here? Tried creating squashfs with lzma(according to https://openwrt.org/docs/techref/filesystems) and gzip(the only one built into shfs-tools-mk). Both compressions fail with the error about compression not supported in kernel message.

Thx, KN

root@novitk:/mnt# mount -t squashfs -o loop /mnt/backup/oldroot-X7SPA.sqsh /mnt/oldroot-X7SPA
mount: mounting /dev/loop0 on /mnt/oldroot-X7SPA failed: Invalid argument
root@novitk:/mnt# dmesg | tail -n 1
[491431.807170] squashfs: SQUASHFS error: Filesystem uses "lzma" compression. This is not supported

You need to install "xz" tools (contains support for xz and lzma) on your host system (where you try to mount the file).

Didn't help. Also this only changes user space, no? The issue I think is in the kernel.

root@novitk:~# opkg list | grep xz
xz - 5.2.4-5
xz-utils - 5.2.4-5
root@novitk:~# opkg list | grep lzma
liblzma - 5.2.4-5
python3-lzma - 3.7.7-3
root@novitk:~# opkg list | grep zlib
kmod-lib-zlib-deflate - 4.14.180-1
kmod-lib-zlib-inflate - 4.14.180-1
zlib - 1.2.11-3

I thought xz is enough. But maybe it is stripped for embedded systems. Anyway try to install liblzma. xz-utils looks to me like a "complete package" including liblzma?

You would need kernel support if you want to start/mount images during system start. So e. g. initramfs should have support for it. But that should be handled by the Makefiles already.

For just mounting/reading xz (tools) should be enough.

not embedded, the install is from
https://downloads.openwrt.org/releases/19.07.3/targets/x86/64/openwrt-19.07.3-x86-64-combined-ext4.img.gz
perhaps it's stripped there, as it's not squashfs based.