UC20 Custom build (snap command not found)

Hi everyone.

I’m trying to build a UC20 image for my CM4, which is being built,
two things:

It complains about the snap command not found
/usr/share/subiquity/console-conf-wrapper: line32: snap: command not found
It seems like it does not import my system-user assert file on a USB drive, due to the “broken” ‘snap: command not found’?
I tried to set up the thing with my account, but it does not proceed to the email account(crashes at the next step, returns to “press enter to continue”), just the IP address assignment seems to be working.

This image is being built by ubuntu-image on edge channel, 1.10+snap1 classic install.
model file:{
“type”: “model”,
“series”: “16”,
“model”: “mycustom-ubuntucore”,
“display-name”:“Ubuntu Core 20 (armhf)”,
“architecture”: “armhf”,
“kernel”: “pi-kernel”,
“gadget”: “”,
“base”: “core20”,
“required-snaps”: [ “network-manager” ]
“authority-id”: “”,
“brand-id”: “”,
“timestamp”: “2020-11-25T16:50:51+00:00”

But upon building the core20 image, i noticed that one of my own snaps depends on the core snap (my snaps work from Core 16 onwards, not in the model file for privacy sakes. ) and thus ubuntu-image downloads both core20 and core snaps for usage.

I removed the snaps requiring “core”, and the “snap: command not found” error still persists.
I also tried to include the “snapd” snap, but it seems ubuntu-image downloads it anyway if not specified.
I have been struggling for days on end, with no solutions.
Any advice?

you are using a core16/18 model assertion … UC20 needs a new format … see:

1 Like

Thank you.
I have been building the image the wrong way using the wrong model assertion type.
But how do I add my own gadget-snap without defining the ID for it?
EDIT: I found this while trying to sign my assertion:
error: cannot assemble assertion model: grade for model must be secured|signed|dangerous, not "unsigned" Trying “dangerous” seems to be not requiring an snap-id.
AFAIK, snap-id is the ID you get when you register the snap on the snap store, correct?
This Core20 build of mine is all experimental, do not want to make my gadget available for now.

well, i think is it actually generated with the first upload or release (or it is generated earlier but not visible before that step) … in either case you should be able to work around a missing id by using --snap with ubuntu-image pointing to a local snap file.

as long as the name matches the id should be ignored then … (this might only work with a dangerous model in UC20 … note that model grades are a new thing)

1 Like

Will keep you updated on the dangerous build grade.
Seems my internet has slowed down considerably, will try a build tomorrow (UTC +2 time here on my side)
Sometimes you just have to dig a little bit deeper to gain more insight on the new stuffs.