AppArmor fails at boot

Hello. I am getting AppArmor error of loading profiles on boot.
When I try to reconfigure AppArmor with
dpkg-reconfigure apparmor
I get this error:

AppArmor parser error for /etc/apparmor.d in /etc/apparmor.d/usr.lib.snapd.snap-confine.real at line 11: Could not open '/var/lib/snapd/apparmor/snap-confine'
Skipping profile in /etc/apparmor.d/disable: usr.bin.thunderbird
Skipping profile in /etc/apparmor.d/disable: usr.bin.thunderbird
AppArmor parser error for /etc/apparmor.d/usr.lib.snapd.snap-confine.real in /etc/apparmor.d/usr.lib.snapd.snap-confine.real at line 11: Could not open '/var/lib/snapd/apparmor/snap-confine'

So I’ve checked out usr.lib.snapd.snap-confine.real and at line 11 I found this
#include "/var/lib/snapd/apparmor/snap-confine"
But when I tried to find that file I noticed that it doesn’t exist. An only existing folder was /var/lib/snapd/apparmor/snap-confine.d
So what I have to do, just ignore that lib?

1 Like

Have you tried sudo before the command it says no permission

Yes, the result was same. Luckily I found out it was an error connecting to swap partition, which didn’t exist. I had two Linux systems with two swap-partiotions (yeah, im dumb). so i fixed it with blksid, got the UID of correct swap partiotion and fixed it in /etc/fstab.

Thank’s.

ill have to remember this for the future, ive never considered this possibility when troubleshooting this issue so thank you. do you not utilize btrfs? I have an unnecessary ammount of RAM so I tend to not even think swap anymore with btrfs instead of ext4

No, I actually have never heard of btrfs =).

As I had two swaps when I’ve installed ParrotOS, ParotOS got the second one as it’s main swap (which can be seen in /etc/fstab. But when I deleted second swap partition, I was getting this error until fixing it in the same fstab.

What iso version did you use when installing? The 4.3 I think was the first version that used btrfs as default, if you dont mind a quick configuration catchup/redo and have 4gb or more than 4gb ram on your machine I reccomend re installing to be able to use btrfs for snapshots if you ever break the system you can just roll back instead of reinstall. And you dont even need to create a swap partition

Currently I’m on Parrot 4.4 and I have 8gb ram, so am I able to use btrfs?

Yes.

You shouldn’t need swap. But swap can just be a file anyway, it doesnt have to be a partition. So you can easily add it later if needed.

1 Like