Detecting unsupported kernels

On a few occasions we’re seeing people reporting that snaps don’t install or run on their system. Once we dig further it’s the case that they’re running on kernels which are either very old (2.6.x) and/or have been tweaked by their hardware vendor or VPS provider. They expect it to work because they believe they’re running a supported system. This is obviously a sub-optimal for the user. Stepping aside from the issue of something being called “Ubuntu” when it clearly isn’t, can we help these people somehow? I’m thinking perhaps we could detect that there are missing kernel features when snapd or snaps are installed and let the user know they’re going to have a bad time?

Something like:-

apt install snapd
<apt output here>
Sorry, your system kernel '2.6.foo.bar' does not support snaps. Please contact your system administrator or provider to obtain a supported kernel. 

5 Likes

snapd also depends on some kernel features, a recent version does not guarantee the features is update-to-date or enabled. (eg, apparmor with needed patch, namespace patch if running in contatiner.)

I would suggest snapd should check the kernel capability at the first run.

1 Like

You should probably fix your documentation / reign in the marketing team as well. Try googling “what is ubuntu snap” for example and you get stuff like this:

Snaps are universal Linux packages

Snaps work on any distribution or device.

I’m not really surprised people take that stuff at face value.