6

Recently I heard about Snaps which are described as "universal Linux packages". This seems like a really nice thing and although I didn't read much about it yet, there are some real improvements over traditional app management, like the ability to have the app sandboxed without interfering with others.

Now, on the page where we can list the available snaps we can see on the types Kernel Snaps.

But wait a minute, when I first read about snaps it seemed just like a new way to manage apps which we can install on the machine, like "a better apt-get". In that way it seemed pretty much to be userspace stuff.

What are those Kernel Snaps? What they are they used for?

1 Answer 1

7

A kernel snap is a bundle containing the kernel (which might be different from the underlying OS) and drivers; providing the developer a way to deliver a customised OS configuration with its own drives, patches, and configuration.

The security whitepaper defines the architecture:

In general, the base system is delivered via three snaps that work together:

  • OS: provided by Canonical
  • Kernel: provided by either Canonical or the vendor of a particular device
  • Gadget: provided by either Canonical or the vendor of a particular device

The kernel snap provides the kernel and drivers, the OS snap provides the rest of operating system and the gadget snap provides boot, kernel, OS and application configuration. Each of these snaps may be updated independently of one another.

4
  • Thanks for the answer @techraf. So in the end, snaps are much more than just one improved apt-get, right? The whole OS will end up being built from snaps, including both Kernel and userspace stuff? So in the end of the day the idea is that it will be possible to assemble a Linux OS from packages, which are the snaps? Aug 12, 2016 at 2:59
  • 1
    Yes, the idea seems more akin to Docker than APT.
    – techraf
    Aug 12, 2016 at 3:31
  • 4
    From the perspective of an app, a snap is just a package like a deb or rpm, but with bundled dependencies and the expectation that it runs confined and can run on any distro. You can also use snaps to make a whole distro - like Ubuntu Core - and then you need snaps for the kernel and base OS. You could put all of that in one snap and then it would be just like CoreOS, but with Ubuntu Core we separate kernel and OS to enable people to use their own kernel very easily. Having snaps for the apps means you get to choose your flavour of docker or apps, compared to CoreOS which is locked down. Aug 13, 2016 at 13:21
  • 3
    Snaps and Docker are nicely orthogonal. Docker gives you easy scale by putting each process behind its own IP and giving each process its own entire filesystem, so all of them are really loosely coupled. With snaps, the base filesystem is shared and you can only install one copy of a snap on any machine. Use docker for stateless scale-out apps, and snaps for commands or services you want to place on a specific device or VM. Aug 13, 2016 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .