Environment: Centos 8, Digital Ocean Droplet
I've recently found 2 strange, seemingly unconnected errors in my OS.
Michael Hampton suggested this may be the result of a corrupt SELinux policy. I followed his instructions and reinstalled selinux but the error persisted.
Tonight I got a warning that my servers SSL certificate was not renewing even though it was set up to automatically renew with snap.
I checked and certbot.renew was disabled and inactive.
$ snap services
Service Startup Current Notes
certbot.renew disabled inactive -
When I attempted to force renewal with a refresh I got this error.
$ snap refresh
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
/tmp/sanity-mountpoint-019949784: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error.
Then I tested cerbot without snap and got an error.
$ sudo certbot renew --dry-run
internal error, please report: running "certbot" failed: cannot find installed snap "certbot" at revision 952: missing file /var/lib/snapd/snap/certbot/952/meta/snap.yaml
Question: Am I right to suspect that my OS may be corrupt? If so is there a tool or method I can use to restore Centos back to its original, healthy state?
To fix this error, Follow the below steps:
Run this command:
$ 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
If the output looks like the one above, run this command:
$ sudo semodule -i /usr/share/selinux/packages/snappy.pp.bz2
and restart your system:
$ sudo reboot
Source:https://tecrobust.com/how-to-fix-error-system-does-not-fully-support-snapd-fedora-31/