System-seed role error while building ubuntu core image with local gadget snap

It looks to me that we can create customized Ubuntu Core image with local snaps using --snap arguments. But I got the following error while building my UC image with customized gadget snap:

WARNING: "ttzeng-pc" installed from local snaps disconnected from a store cannot be refreshed subsequently!
Copying "gadget/ttzeng-pc_0.1.0_amd64.snap" (ttzeng-pc)
error: model does not support the system-seed role

Any idea what I might be missing? Thanks.


Hi can you share your model assertion and the gadget.yaml you are using?

@ijohnson, thanks for reply. Here is my model assertion:

        "type": "model",
        "series": "16",
        "model": "ubuntu-core-20-amd64",
        "architecture": "amd64",
        "base": "core20",
        "gadget": "ttzeng-pc",
        "kernel": "pc-kernel",
        "authority-id": "NwtFP2UhQOVMJDnrgrfPkOkxYcPDZKo3",
        "brand-id": "NwtFP2UhQOVMJDnrgrfPkOkxYcPDZKo3",
        "timestamp": "2021-02-24T12:15:53+00:00"

and my gadget is modified from the pc-amd64-gadget except some metadata:

    name: ttzeng-pc
    version: '0.1.0'
    type: gadget
    base: core20
    summary: My test PC gadget
    description: |
        My pc devices to work with Ubuntu Core
    confinement: devmode
    grade: devel
    icon: icon.png

        plugin: nil
        build-snaps: [snapd/latest/edge]
          - grub-efi-amd64-signed
          - grub-pc-bin
          - shim-signed
          - sbsigntool
        prime: [ -* ]
        source: .
          - grub-common
        plugin: make
        after: [grub-prepare]

My build command is:
ubuntu-image snap ubuntu-core-20-amd64.model --snap gadget/ttzeng-pc_0.1.0_amd64.snap

Any thoughts would be very appreciated. Thanks.

this does not looks like a UC20 model assertion … note the format has been extended for UC20:

1 Like

@ogra, thanks for reply. My model assertion is derived from ubuntu-core-20-amd64.json, but since I’d like to use local snap files, so I need to remove the snaps section, and specify gadget directly in the json file. Or, do you refer me any model assertion which uses local snap files to build UC images? Thanks.

you should not remove the snaps section. you just change the names in there … if you use --snap with ubuntu-image the snap-id’s can be ignored, but the format of the file still matters … you also need to keep grade: in there (which you seem to have dropped), i think thats a requrement with UC20. the model assertion you posted above is clearly a UC18 format … (gadget is gone, snaps is requred in the new format)

Is this new model assertion documented somewhere yet? I couldn’t find it and the link you posted above points at the assertion model from core18. I was specifically searching for the right ‘grade’ vale here when using local snaps, I took a guess and used ‘dangerous’ following an error message thrown by ubuntu-image but it would be great to know what all the different values are and what they mean. Thanks!

grades are described at:

in general you might find some UC20 info at:

Thanks! I also saw these in the UC20 release notes directly in the meantime.

Are you planning to also update this page (which looked like the authoritative source of information for this):

lets ask @degville :wink:

1 Like

Thanks for pinging me about this and I’m sorry the model assertion doc is obviously out of date. I’ll make sure it’s updated as soon as possible.

Another document that might help is Custom images, which we have updated for UC20.

1 Like