Ubuntu - cubic: Install snap applications from chroot in customized iso fails


I try to customize a Lubuntu 18.04 iso using cubic.
Packages are installed in a chroot console:

  • Packages installed with apt are correctly installed in the iso (they can be then launched from the customized live usb), for exemple:
    apt install gimp

  • If a snap package is installed as follow from the same chroot console, it won’t be installed in the customized iso, but in the host system itself (here ubuntu 18.04), example:
    snap install darktable
    In this last case, darktable can be run from the host system and not from the live-usb.

Is it a cubic bug, or is there a right way to install the snap package in the iso with cubic?


We have done no work to integrate with cubic, nor is it clear whether we should. As it stands I’d say it’s a cubic bug — if there is integration work that needs to happen on the snapd side, cubic hasn’t told us what it is nor asked for it.


I also noticed this problem with Cubic. I customize the Ubuntu and Kubuntu ISO.
If I try to install an APP snap chroot, the APP installs in the host system.


Also: what advantage would running a snap inside cubic have?


For example: pre-install LibreOffice snap, then in chroot I remove LibreOffice “deb” to install the snap version.
Or preinstall spotify, as well as other APP snap.


As you can see from the screenshots, snap shows what I have in the host system, apt shows what I have in the chroot system, in this case the Ubuntu ISO.
In this case I can’t preinstall any APP on the ISO chroot and then find it after installation on the system.


I think that translates to “cubic does not support snaps”.


on a sidenote i dont think even in official ubuntu images the seeding of snaps involves installing them in the target system, but instead they get downloaded to the seed directory of the image, assertions are copied in the right place and the seed.yaml file is adjusted … the actual installation of the snaps happens during first boot of the installed image AFAIK.

EDIT: the ubuntu code that seeds snaps into images is at


Suppose the target machine to install have no or poor internet connection.


From the cubic chroot console, would it possible to download the snap packages, without installation’, store them in /opt directory of the iso? The idea would be to post install the snap packages from a customized ubuntu iso.


no, you would have to use the correct directory, snapd does not look in /opt … and you will also have to modify the seed.yaml file in the correct way, similar to the livecd-rootfs code i linked above. best if you talk to the cubic guys so they implement it cleanly in their tool.