Hi all, I was hoping to get some help with figuring out how I can seed a custom ubuntu-server image with some snaps such as subiquity
. Essentially, I am attempting to create an appliance image of ubuntu-server that includes the subiquity
snap for the first time appliance setup. Ideally, we would like to make modifications to subiquity, and then preload that directly into the image.
I have gone ahead and setup a basic script pipeline that will prepare and build the ISO using deboostrap
. Normally, when I am attempting to install a package onto the image, I would chroot
into the base FS that was created by deboostrap
, and install all my dependencies. With snap
, it seems to complicate it quite a bit because you can’t run it without systemd
, and even mounting /run
into the chroot
env just seems to insatll subiquity
on the base system instead of the custom image.
I found out that there is the ability to preseed snaps with the seed.yml
file located in /var/lib/snapd/seed
, but even when I create my seed.yaml
file and place the model assertion in the correct folder, it only appears to install core22
but skips the subiquity
installation all together.
Below is the seed.yaml
definition I have created for my image:
snaps:
-
name: core
channel: stable
file: core22_1621.snap
-
name: subiquity
channel: stable
file: subiquity_5741.snap
classic: true
On first boot, there are no snap warnings either, and the snap list only shows core22
as installed
ubuntu@ubuntu:~$ snap list
Name Version Rev Tracking Publisher Notes
core22 20240904 1621 latest/stable canonical✓ base
Any help would be greatly appreciated!!