Yesterday I tried installing snapd on my Ubuntu 18.04 dedicated server, but after I did I had this error:
system does not fully support snapd: cannot mount squashfs image using “squashfs”: mount: /tmp/sanity-mountpoint-876234364: unknown filesystem type ‘squashfs’.
I though a reboot might help, so I rebooted my server. But then I was not able to access my remote server anymore. My hosting provider tried to ping it without success, so it automatically rebooted it in rescue mode. At first I thought that something was preventing my server to boot altogether, but after I connected to the rescue console, mounted the filesystem to have a look at syslog, I didn’t see anything suspicious. And then I found this topic that seems to indicate that there are known issues with snapd and certain kernel versions. So now I’m thinking that maybe my problem is just that my server takes too much time to boot, which triggers a premature reaction from my hosting provider’s monitoring system and doesn’t let snapd do its seeding.
Is that possible? If so, how can I fix that? Is it possible to manually neutralize or remove snapd from the boot sequence so that I can get access to my server again and update everything?
The default kernels that are shipped with Ubuntu should include squashfs. Therefore, it is likely that your installation is running a non-standard kernel. You will need to get the system to use a kernel with squashfs built-in (a loadable module might be sufficient, but I’m not sure on that) to be able to use Snaps.
I see, but in the current state of things, I cannot switch to another kernel or anything, because my server won’t boot fast enough for me to have full access to it. So how can I disable snapd manually?
you can just
apt purge snapd or
systemctl stop --disable snapd
but i’d also file a bug at https://bugs.launchpad.net/snapd/+filebug snapd should check /proc/filesystems on startup and refuse to start with a useful error message if there is no squashfs support …
When I run “sudo apt purge snapd”, it says “Unable to locate package snapd”, which I think is related to the fact that I’m in rescue mode, so I don’t have APT packages installed like in normal mode.
And “systemctl stop --disable snapd” gives me “systemctl: unrecognized option ‘–disable’”
The only think I can do in rescue mode is mount filesystem to /mnt and modify files from there. Is there any way to neutralize snapd without access to APT, by modifying configuration files?
You could try removing the link
/etc/systemd/system/multi-user.target.wants/snapd.service - assuming you’re booting in multi-user target, which is likely. It has the same effect you’re trying to accomplish with systemctl.