ayufan-rock64 / linux-build

Rock64 Linux build scripts, tools and instructions
MIT License
562 stars 98 forks source link

snapd and squashfs config #260

Open mikescandy opened 6 years ago

mikescandy commented 6 years ago

i'm trying to install the rocket.chat snap and it fails, can't mount the snap. dmesg says: squashfs: SQUASHFS error: Filesystem uses "xz" compression. This is not supported

is this fixable with a kernl config?

NetDwarf commented 6 years ago

My suspicion is, that this problem is related to AppArmor, because AppArmor is not enabled by default and a requirement for snap(s). AppArmor is enabled in the kernel though, but I couldn't manage to activate it. I tried GRUB2 with the usual boot options (apparmor=1 security=apparmor), but to no avail, because GRUB2 doesn't seem to work, which is another issue.

NetDwarf commented 6 years ago

Ok, I was wrong. I didn't even know that the XZ part for SQUASHFS is a kernel feature. Yesterday I compiled kernel with

CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
CONFIG_DEFAULT_SECURITY_APPARMOR=y
CONFIG_DEFAULT_SECURITY="apparmor"
# CONFIG_DEFAULT_SECURITY_DAC
CONFIG_SQUASHFS_XZ=y

And that worked. I tried only with APPARMOR enabled, but that worked only for apparmor itself, so the error message is actually correct however I think snap would not work without apparmor either, but I didn't test it.

cyberb commented 5 years ago

Do you have an image with squashfs enabled?

I am trying to test Syncloud on it (https://github.com/syncloud/platform/issues/329)

Syncloud uses modified snapd with disabled apparmor.