Ubuntu Core: how the file-system works

Oliver Grawert ogra at ubuntu.com
Fri Jan 20 14:14:14 UTC 2017

Am Freitag, den 20.01.2017, 14:59 +0100 schrieb Luca Dionisi:
> Hi all,
> I am planning to build a raspberry-based gadget and I would rather
> use
> Ubuntu Core on it. So I am right now using it on a KVM in order to
> see
> how it works.
> First of all I need to understand how the file-system works. Because
> I
> need to edit some system files.
> My first question to the list is: why don't I see two partitions on
> the disk? I recall having read that Ubuntu Core was able to rollback
> to
> the previous version of "core" snap thanks to a second partition.
> Do I miss something?
two readonly partitions were the 15.04 way when we still used image
based upgrades (a technology that was developed for the phone images)

with 16.04 snappy images switched to have everything as a snap this
includes kernel, bootloader (gadget) and the rootfs (core).

during boot the initrd mounts the readonly core snap (which is a
squashfs) and bind-mounts a few required files into writable
directories so they become writable (typically this are a bunch of
selected cache and config files for system services). 

rollback of kernel or core is done by switching back and forth between
the different revisions of the snaps now, not by hopping between
partitions any more, this way snappy can now use a single partition
(the snaps just sit on the writeable partition) which reduces the
complexity a lot. it also has the advantage that the core and kernel
snaps are signed readonly squashfses and can not just be modified which
adds a great amount of extra security.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170120/e11cd3a3/attachment.sig>

More information about the Snapcraft mailing list