I am trying to build an image of ubuntu 18.04 using snapcraft.These are the steps I carried out.
- Created a JSON assertion file zl-3x-image-ubuntu1804.json
{ “type”: “model”, “series”: “16”, “authority-id”: “my developer ID”, “brand-id”: “my developer ID”, “model”: “zl-3x-image-ubuntu1804”, “architecture”: “amd64”, “timestamp”: “2022-01-29T11:18:43+00:00”, “base”: “core18”, “grade”: “signed”, “storage-safety”: “prefer-encrypted”, “snaps”: [ { “name”: “pc”, “type”: “gadget”, “default-channel”: “18/stable”, “id”: “UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH” }, { “name”: “pc-kernel”, “type”: “kernel”, “default-channel”: “18/stable”, “id”: “pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza” }, { “name”: “core18”, “type”: “base”, “default-channel”: “latest/stable”, “id”: “DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q” }, { “name”: “snapd”, “type”: “snapd”, “default-channel”: “latest/stable”, “id”: “PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4” } ] }
2.I generated a zl-3x-image-ubuntu1804.model using the following commands
cat zl-3x-image-ubuntu1804.json | snap sign -k default > zl-3x-image-ubuntu1804.model
3.My model contains the following type: model authority-id: my developer ID series: 16 brand-id: my developer ID model: zl-3x-image-ubuntu1804 architecture: amd64 base: core18 grade: signed snaps: - default-channel: 18/stable id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH name: pc type: gadget - default-channel: 18/stable id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza name: pc-kernel type: kernel - default-channel: latest/stable id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q name: core18 type: base - default-channel: latest/stable id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4 name: snapd type: snapd storage-safety: prefer-encrypted timestamp: 2022-01-29T11:18:43+00:00 sign-key-sha3-384: -4YCmkxrzL84A5zto9b1AoMzfwqOX1ZrxX7i5wnZ9XQAO0X-QUEFF_C9mHS4-mP0
316fvguUmF0GQfVbWzP5D3ApONgwmEXBwV4Frni8+7Amqe35w1D0wfd7nlY8X8v5vAdgJ1r43gMe
316fvguUmF0GQfVbWzP5D3ApONgwmEXBwV4Frni8+7Amqe35w1D0wfd7nlY8X8v5vAdgJ1r43gMe
316fvguUmF0GQfVbWzP5D3ApONgwmEXBwV4Frni8+7Amqe35w1D0wfd7nlY8X8v5vAdgJ1r43gMe
4.I built a image by the following commands
ubuntu-image snap zl-3x-image-ubuntu1804.model
I get the following errors
WARNING: proceeding to download snaps ignoring validations, this default will change in the future. For now use – validation=enforce for validations to be taken into account, pass instead --validation=ignore to preserve current behavior going forward
Fetching snapd
Fetching pc-kernel
Fetching core18
Fetching pc
error: model requires system-seed partition, but no system-seed or system-data partition found
COMMAND FAILED: snap prepare-image zl-3x-image-ubuntu1804.model /tmp/tmpty9gn2tk/unpack
What did I do wrong? How can I resolve it