Installing core snap fails on Crostini (Chromebook)

So I have a Pixelbook with Devmode enabled and Crostini installed, and thought I’d give snaps a try. When trying to install the core snap, it currently fails with:

error: cannot perform the following tasks:
- Mount snap "core" (4571) ([start snap-core-4571.mount] failed with exit status 1: Job for snap-core-4571.mount failed.
See "systemctl status snap-core-4571.mount" and "journalctl -xe" for details.
)

The output of those commands is:

$ systemctl status snap-core-4571.mount
● snap-core-4571.mount
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: exit-code) since Thu 2018-05-10 04:48:15 UTC; 1min 15s ago

$ sudo journalctl -xe
[..]
-- Unit snap-core-4571.mount has begun starting up.
May 10 04:48:15 penguin mount[26970]: mount: /snap/core/4571: mount failed: Operation not permitted.
May 10 04:48:15 penguin systemd[1]: snap-core-4571.mount: Mount process exited, code=exited status=1
May 10 04:48:15 penguin systemd[1]: snap-core-4571.mount: Failed with result 'exit-code'.
May 10 04:48:15 penguin systemd[1]: Failed to mount Mount unit for core.
-- Subject: Unit snap-core-4571.mount has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit snap-core-4571.mount has failed.
[..]

I don’t know what Crostini is, exactly (is it a chroot? a container? etc.), but it not letting you mount things throws using snaps directly out the window for the conceivable future.

You could sorta-kinda use them for development if you unpacked them first and then used snap try. For example,

snap download core
unsquashfs -d unsquashed-core core*.snap
snap try unsquashed-core

this is only good for experimenting and/or developing stuff, and is in no way a production-ready nor a productive way of doing things. But maybe it’s all you need.

Hum, but thinking about it I think this also mounts things (it does a bind mount). Augh.

Can’t use run kvm?

@chipaca - I believe Crostini is a LXD container under the hood. I haven’t tried it, but I seem to remember that snaps have a similar problem inside a LXD container.

@niemeyer, fyi.

OK so when running unsquashfs, I get a bunch of errors like this:

create_inode: failed to create character device unsquashed-core/dev/tty4, because Operation not permitted

The command finishes and the subsequent ‘try’ commend completes successfully.

sudo apt install squashfuse might solve your problems, you might want to nudge LP: #1628289.

Hey! sorry for being off-topic but since you are the first person I found who actually have a PixelBook, can you check somehow which technology they use for Crostini, some say they are using KVM and others suggest its some custom containers technology cooked by Google.

EDIT Just asked Stéphane and he confirms Crostini uses LXD.