Snap mount errors (Ubuntu Bionic L4T ARM64)

Some apps install just fine, but most applications run into one of these two errors on installation:

chromium as an example:

- Run configure hook of "chromium" snap if present (run hook "configure": cannot perform operation: mount --bind -o ro /mnt/snap/core/12837/usr/lib/snapd /tmp/snap.rootfs_OMpI7b/usr/lib/snapd: No such file or directory)

I should note after running this, I do not see a /mnt/snap folder at all. snapd and snap had no errors on install.

and alacritty:

error: cannot perform the following tasks:

- Mount snap "alacritty" (48) (systemctl command [start snap-alacritty-48.mount] failed with exit status 1: Job for snap-alacritty-48.mount failed.
See "systemctl status snap-alacritty-48.mount" and "journalctl -xe" for details.

output from systemctl status snap-alacritty-48.mount

● snap-alacritty-48.mount
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: exit-code) since Wed 2022-04-06 21:08:01 EDT; 59s ago

Apr 06 21:08:01 jetson systemd[1]: Mounting Mount unit for alacritty, revision 48...
Apr 06 21:08:01 jetson mount[7822]: mount: /snap/alacritty/48: wrong fs type, bad option, bad superblock on /dev/loop8, missing codepage or help
Apr 06 21:08:01 jetson systemd[1]: snap-alacritty-48.mount: Mount process exited, code=exited status=32
Apr 06 21:08:01 jetson systemd[1]: snap-alacritty-48.mount: Failed with result 'exit-code'.
Apr 06 21:08:01 jetson systemd[1]: Failed to mount Mount unit for alacritty, revision 48.

I’ve tried these on multiple systems and the neither function. This is not a problem with these specific applications I don’t think because it happens on almost everything I try.

the L4T kernel is most likely missing bits and pieces (default config options you would find a normal ubuntu kernel, possibly patch sets to enable security features etc)

the above looks like you are missing basic squashfs support …

Could you run snap version on this system, and include it’s output here? My first guess is that you’re running a kernel without squashfs support, or possibly without support for the required compression schemes.

these are two separate systems with slightly different kernel versions. the chromium error happens on both kernels, and the error with alacritty happens only on the kernel with these configs:

CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
# CONFIG_SQUASHFS_XATTR is not set
CONFIG_SQUASHFS_ZLIB=y
# CONFIG_SQUASHFS_LZ4 is not set
# CONFIG_SQUASHFS_LZO is not set
CONFIG_SQUASHFS_XZ=y
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
snap    2.54.4
snapd   2.54.4
series  16
ubuntu  18.04
kernel  4.9.253-tegra

the other kernel has a couple more of the compression algorithms enabled:

CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_FILE_CACHE is not set
CONFIG_SQUASHFS_FILE_DIRECT=y
CONFIG_SQUASHFS_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
# CONFIG_SQUASHFS_XATTR is not set
CONFIG_SQUASHFS_ZLIB=y
CONFIG_SQUASHFS_LZ4=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
snap    2.54.4
snapd   2.54.4
series  16
ubuntu  18.04
kernel  4.9.140-l4t

you might want to take a look at:

that repo is very out of date (doesn’t contain the latest l4t releases) and I don’t see how it is relevant, this isn’t a snap based system, I don’t need any of those snaps.

lets focus on the chromium mount error since I’m assuming the other error was because of missing CONFIG_SQUASHFS_LZ4 and CONFIG_SQUASHFS_LZO

I will note, for anyone that does the online snapcraft store UI development, please add a way to filter the results by cpu architecture. Practically 99% of results are amd64 only and thats not helpful for finding snaps to install on arm64

it has the defconfigs needed to have all options enabled for general snap support … the nvidia kernels lack a lot of them OOTB …

Ignore the nvidia kernel defconfigs. look at the defconfigs in the “other kernel has a couple more compression algorithms enabled” in my post above. this kernel isn’t from nvidia and I built it myself and run it.

here is an example of another snap which errors. similar error to chromium but this happens at runtime. there was no error on install

snap run mari0

cannot perform operation: mount --bind -o ro /mnt/snap/core/12837/usr/lib/snapd /tmp/snap.rootfs_5beL30/usr/lib/snapd: No such file or directory

and just to confirm, there are no mount errors in systemctl output:

● snap-mari0-11.mount - Mount unit for mari0, revision 11
   Loaded: loaded (/etc/systemd/system/snap-mari0-11.mount; enabled; vendor preset: enabled)
   Active: active (mounted) since Thu 2022-04-07 10:09:33 EDT; 4min 47s ago
    Where: /snap/mari0/11
     What: /dev/loop7
  Process: 27078 ExecMount=/bin/mount /var/lib/snapd/snaps/mari0_11.snap /snap/mari0/11 -t squashfs -o nodev,ro,x-gdu.hide,x-gvfs-hide (code=exited, status=0/S
    Tasks: 0 (limit: 4201)
   CGroup: /system.slice/snap-mari0-11.mount

Apr 07 10:09:33 user systemd[1]: Mounting Mount unit for mari0, revision 11...
Apr 07 10:09:33 user systemd[1]: Mounted Mount unit for mari0, revision 11.

well, then you should take the defconfig from alfonso as a blueprint to get all bits and pieces enabled …

you can also take a look at the typically required config patches (properly split by tasks) at:

do you not maintain a list of absolute minimum kernel modules required for snap compliance? rather than referring to patches?

I’ve seen you mention before running snap debug sandbox-features as a way to check for something so I’ll give you the output here:

snap debug sandbox-features

confinement-options:  classic devmode
dbus:                 mediated-bus-access
kmod:                 mediated-modprobe
mount:                freezer-cgroup-v1 layouts mount-namespace per-snap-persistency per-snap-profiles per-snap-updates per-snap-user-profiles stale-base-invalidation
seccomp:              bpf-actlog bpf-argument-filtering
udev:                 device-cgroup-v1 device-filtering tagging

the ubuntu kernel team used to have this under

but i dont think it is maintained anymore … (note that it is irrelevant if you use that kernel on Ubuntu Core or Classic installs … the feature set is definitely the same for both … some missing features can be worked around by snapd to provide you degraded sandboxing for your snaps, but some can’t)

I’ll diff/patch these in and report back in a day or two what was missing or if there are any other issues. thanks

1 Like

Hi @theofficialgma,

Did you get any solution for this?