Error: System does not fully support snapd

Hello! I’m getting the following error while trying to install a snap package on fedora 31

[asdrubalivan@localhost ~]$ snap install spotify
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
   /tmp/sanity-mountpoint-322815779: wrong fs type, bad option, bad superblock on /dev/loop0,
   missing codepage or helper program, or other error.

Trying sudo modprobe squashfs has been unsuccessful

Here is my journalctl log

Jan 04 16:10:53 localhost.localdomain systemd[1]: snapd.service: Succeeded.
Jan 04 16:10:53 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=snapd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succe>
Jan 04 16:10:53 localhost.localdomain audit[7247]: USER_ACCT pid=7247 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="asdrubalivan" exe="/us>
Jan 04 16:10:53 localhost.localdomain sudo[7247]: asdrubalivan : TTY=pts/0 ; PWD=/home/asdrubalivan ; USER=root ; COMMAND=/usr/sbin/modprobe squashfs -v
Jan 04 16:10:53 localhost.localdomain audit[7247]: USER_CMD pid=7247 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/asdrubalivan" cmd=6D6F6470726F6265207371756173686673202D76 exe="/usr>
Jan 04 16:10:53 localhost.localdomain audit[7247]: CRED_REFR pid=7247 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostn>
Jan 04 16:10:53 localhost.localdomain sudo[7247]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 04 16:10:53 localhost.localdomain audit[7247]: USER_START pid=7247 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_s>
Jan 04 16:10:53 localhost.localdomain sudo[7247]: pam_unix(sudo:session): session closed for user root
Jan 04 16:10:53 localhost.localdomain audit[7247]: USER_END pid=7247 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_sy>
Jan 04 16:10:53 localhost.localdomain audit[7247]: CRED_DISP pid=7247 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostn>
Jan 04 16:10:54 localhost.localdomain systemd[1]: Starting Snappy daemon...
Jan 04 16:10:54 localhost.localdomain snapd[7267]: AppArmor status: apparmor not enabled
Jan 04 16:10:54 localhost.localdomain snapd[7267]: daemon.go:346: started snapd/2.42.2-1.fc31 (series 16; classic; devmode) fedora/31 (amd64) linux/5.3.16-300.fc31.x86_64.
Jan 04 16:10:54 localhost.localdomain kernel: SELinux: security_context_str_to_sid(system_u:object_r:snappy_snap_t:s0) failed for (dev loop0, type squashfs) errno=-22
Jan 04 16:10:54 localhost.localdomain snapd[7267]: main.go:123: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/sanity-mountpoint-322815779: wrong fs type, bad option, bad superblock on /dev>
Jan 04 16:10:54 localhost.localdomain snapd[7267]: daemon.go:439: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
Jan 04 16:10:54 localhost.localdomain systemd[1]: Started Snappy daemon.
Jan 04 16:10:54 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=snapd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succ>
Jan 04 16:10:59 localhost.localdomain snapd[7267]: daemon.go:540: gracefully waiting for running hooks
Jan 04 16:10:59 localhost.localdomain snapd[7267]: daemon.go:542: done waiting for running hooks
Jan 04 16:10:59 localhost.localdomain snapd[7267]: daemon stop requested to wait for socket activation
Jan 04 16:10:59 localhost.localdomain systemd[1]: snapd.service: Succeeded.
Jan 04 16:10:59 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=snapd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succe>
Jan 04 16:11:11 localhost.localdomain systemd[1]: Starting Snappy daemon...
Jan 04 16:11:11 localhost.localdomain snapd[7427]: AppArmor status: apparmor not enabled
Jan 04 16:11:11 localhost.localdomain snapd[7427]: daemon.go:346: started snapd/2.42.2-1.fc31 (series 16; classic; devmode) fedora/31 (amd64) linux/5.3.16-300.fc31.x86_64.
Jan 04 16:11:11 localhost.localdomain snapd[7427]: main.go:123: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/sanity-mountpoint-749589428: wrong fs type, bad option, bad superblock on /dev>
Jan 04 16:11:11 localhost.localdomain snapd[7427]: daemon.go:439: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
Jan 04 16:11:11 localhost.localdomain kernel: SELinux: security_context_str_to_sid(system_u:object_r:snappy_snap_t:s0) failed for (dev loop0, type squashfs) errno=-22
Jan 04 16:11:11 localhost.localdomain systemd[1]: Started Snappy daemon.
Jan 04 16:11:11 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=snapd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succ>
Jan 04 16:11:16 localhost.localdomain snapd[7427]: daemon.go:540: gracefully waiting for running hooks
Jan 04 16:11:16 localhost.localdomain snapd[7427]: daemon.go:542: done waiting for running hooks
Jan 04 16:11:16 localhost.localdomain snapd[7427]: daemon stop requested to wait for socket activation
Jan 04 16:11:16 localhost.localdomain systemd[1]: snapd.service: Succeeded.
Jan 04 16:11:16 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=snapd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succe>
Jan 04 16:11:20 localhost.localdomain systemd[1]: Starting Snappy daemon...
Jan 04 16:11:20 localhost.localdomain snapd[7530]: AppArmor status: apparmor not enabled
Jan 04 16:11:20 localhost.localdomain snapd[7530]: daemon.go:346: started snapd/2.42.2-1.fc31 (series 16; classic; devmode) fedora/31 (amd64) linux/5.3.16-300.fc31.x86_64.
Jan 04 16:11:20 localhost.localdomain snapd[7530]: main.go:123: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/sanity-mountpoint-437835333: wrong fs type, bad option, bad superblock on /dev>
Jan 04 16:11:20 localhost.localdomain snapd[7530]: daemon.go:439: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
Jan 04 16:11:20 localhost.localdomain kernel: SELinux: security_context_str_to_sid(system_u:object_r:snappy_snap_t:s0) failed for (dev loop0, type squashfs) errno=-22
Jan 04 16:11:20 localhost.localdomain systemd[1]: Started Snappy daemon.
Jan 04 16:11:20 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=snapd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succ>
Jan 04 16:11:25 localhost.localdomain snapd[7530]: daemon.go:540: gracefully waiting for running hooks
Jan 04 16:11:25 localhost.localdomain snapd[7530]: daemon.go:542: done waiting for running hooks
Jan 04 16:11:25 localhost.localdomain snapd[7530]: daemon stop requested to wait for socket activation
Jan 04 16:11:25 localhost.localdomain systemd[1]: snapd.service: Succeeded.
Jan 04 16:11:25 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=snapd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succe>
Jan 04 16:12:51 localhost.localdomain systemd[1]: flatpak-system-helper.service: Succeeded.
Jan 04 16:12:51 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=flatpak-system-helper comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? term>
Jan 04 16:12:58 localhost.localdomain rtkit-daemon[2713]: Supervising 8 threads of 4 processes of 2 users.
Jan 04 16:12:58 localhost.localdomain rtkit-daemon[2713]: Supervising 8 threads of 4 processes of 2 users.
lines 29218-29271/29271 (END)

Any help will be appreciated :slight_smile:

Hi, are you able to mount squashfs filesystems normally? i.e. can you do:

$ snap download hello-world
$ mkdir snap-test
$ sudo mount hello-world*.snap snap-test

?

Also this sounds suspiciously similar to System does not fully support snapd, can you try the suggested remedy there:

Looks like SELinux is enabled. Can you double check that snapd-selinux package is installed? If so, can you run semodule -l |grep snappy and check whether it prints snappy in the output?

Hi. I have a similar problem (Fedora 31 recent install, trying to install Spotify via snap and get a similar error message) so I’ll add my responses to above questions.

@ijohnson In my case I am able to mount squashfs fyllesystem:

[user@localhost snaps]$ mkdir snap-test
[user@localhost snaps]$ sudo mount hello-world*.snap snap-test
[sudo] password for user: 
[user@localhost snaps]$ df
Filesystem                              1K-blocks     Used Available Use% Mounted on
<stuff>
/dev/loop0                                    128      128         0 100% /home/user/somedir/snaps/snap-test 

@mborzecki Again in my case semodule -l does not list snappy.

What’s the output of sestatus ?

$ sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      31

Is snapd-selinux package installed?

I think it is:

$ dnf list installed | grep snapd-selinux
snapd-selinux.noarch                               2.42.2-1.fc31                       @updates

@Conan_Kudo any ideas? Looks like the package with selinux policy is installed, but the module was not loaded.

What happens when you manually do:

$ sudo semodule -i /usr/share/selinux/packages/snappy.pp.bz2
$ sudo semodule -i /usr/share/selinux/packages/snappy.pp.bz2
[sudo] password for user: 
Conflicting name type transition rules
Binary policy creation failed at /var/lib/selinux/targeted/tmp/modules/200/container/cil:1784
Failed to generate binary
semodule:  Failed!

Looks like it’s related to https://bugzilla.redhat.com/show_bug.cgi?id=1782225

1 Like