Ubuntu Core: console-conf not showing on first boot with custom image

My goal is to create a custom Ubuntu Core image that boots, asks the user to setup the network connection and then displays a website using wpe-webkit-mir-kiosk.

I can already achieve the steps by using a pre-built Ubuntu Core Image and then running commands from a remote machine using ssh. However, this image is supposed to be rolled out to different stores where people are not always technically skilled enough to use ssh or do not have another machine available on hand.

When I follow the steps from “Ubuntu > Core > Docs > Build-an-image”, in the last step called “Boot an image” it says that on the first boot, the configuration page (console-conf) should pop up and ask the user to configure the network and login to their Ubuntu One account. This step happens when I use a pre-build Ubuntu Core image but not when using my own image.

When I boot, the system directly loads ubuntu-frame (gray screen) and then tries to load the page that I’ve setup in my gadget.yaml with wpe-webkit-mir-kiosk, but fails to load the page because there is no network connection. I only see the error page saying there is no internet connection from wpe-webkit-mir-kiosk.

How can I force the console-conf to show up on first boot?

I’ve built my custom Ubuntu Core image with this command:

ubuntu-image snap --snap=./tfs-gadget/pi-gadget-22-arm64/pi_22-2_arm64.snap -i 8G pi-model.model

My gadget.yaml looks like this:

volumes:
    pi:
    schema: mbr
    bootloader: piboot
    structure:
      - name: ubuntu-seed
        role: system-seed
        filesystem: vfat
        type: 0C
        size: 3200M
        content:
          - source: $kernel:dtbs/dtbs/broadcom/
            target: /
          - source: $kernel:dtbs/dtbs/overlays/
            target: /overlays
          - source: boot-assets/
            target: /
      - name: ubuntu-boot
        role: system-boot
        filesystem: vfat
        type: 0C
        # whats the appropriate size?
        size: 750M
      # NOTE: ubuntu-save is optional for unencrypted devices like the pi, so
      # this structure can be dropped in favor of a different partition for
      # users who wish to instead use a different partition, since with MBR we
      # are limited to only 4 primary partitions.
      # TODO: look into switching over to GPT, the pi bootloader firmware now
      #       has support for this
      - name: ubuntu-save
        role: system-save
        filesystem: ext4
        type: 83,0FC63DAF-8483-4772-8E79-3D69D8477DE4
        size: 32M
      - name: ubuntu-data
        role: system-data
        filesystem: ext4
        type: 83,0FC63DAF-8483-4772-8E79-3D69D8477DE4
        # XXX: make auto-grow to partition
        size: 1500M
defaults:
  # wpe-webkit-mir-kiosk
      01sV9tv4UTUQTU3jYsAF1gJ5qv7ZqGls:
        url: "https://example.org"

and my pi-model.json looks like this:

{
    "type": "model",
    "series": "16",
    "model": "ubuntu-core-22-pi-arm64",
    "architecture": "arm64",
    "authority-id": "sOAoXCEDygeb2A7qNSkYW8jEPBRHCq47",
    "brand-id": "sOAoXCEDygeb2A7qNSkYW8jEPBRHCq47",
    "timestamp": "2023-10-20T14:40:27+00:00",
    "base": "core22",
    "grade": "dangerous",
    "snaps": [
        {
            "name": "pi",
            "type": "gadget",
            "default-channel": "22/stable",
            "id": "YbGa9O3dAXl88YLI6Y1bGG74pwBxZyKg"
        },
        {
            "name": "pi-kernel",
            "type": "kernel",
            "default-channel": "22/stable",
            "id": "jeIuP6tfFrvAdic8DMWqHmoaoukAPNbJ"
        },
        {
            "name": "core22",
            "type": "base",
            "default-channel": "latest/stable",
            "id": "amcUKQILKXHHTlmSa7NMdnXSx02dNeeT"
        },
        {
            "name": "mesa-core22",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "UijXdFgvIKp9ZZ6P4ijPAJHWZLtSKgWm"
        },
        {
            "name": "core20",
            "type": "base",
            "default-channel": "latest/stable",
            "id": "DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q"
        },
        {
            "name": "mesa-core20",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "pDDsAW9ifzZnogboHJu3udsA6LsbGeGP"
        },
        {
            "name": "snapd",
            "type": "snapd",
            "default-channel": "latest/stable",
            "id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4"
        },
        {
            "name": "ubuntu-frame",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "BPZbvWzvoMTrpec4goCXlckLe2IhfthK"
        },
        {
            "name": "wpe-webkit-mir-kiosk",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "01sV9tv4UTUQTU3jYsAF1gJ5qv7ZqGls"
        }
    ]
}
1 Like

Same problem… start standard login…

The console-conf UI only comes up if the system was initialized successfully, this indicates that something went wrong with your injected gadget snap…

Start with rebuilding the Image without it, and see if that gets through…

1 Like

my procedure was:

snap download pi --channel=24/stable

unsquashfs … add splash folder and custom image, then snap pack end add --snap to load my snap gadget… is wrong?

Negative… i cloned official pi-gadget , snapped succesfully, with ubuntu-image - - snap create img file and after boot missing console-conf…

Is possibile that the problem is raspberry rpi-imager ?

In Core24, console-conf is its own snap that’s optional, add it to your model assertion.

The model assertion above shows base: core22 you should not mix a core24 gadget into this, that will most likely fail and is an untested setup …

for core22 based images you must use the 22/stable channel (same goes for github, there are branches per-release, for core22 use the 22 branch)

thanks! but the model on this post is not mine, it’s the one who wrote this post… :slight_smile:

this is my model

{
    "type": "model",
    "series": "16",
    "model": "ubuntu-core-24-pi-arm64",
    "architecture": "arm64",
    "authority-id": "**",
    "brand-id": "**",
    "timestamp": "2024-10-30T13:02:11+00:00",
    "base": "core24",
    "grade": "dangerous",
    "snaps": [
        {
            "name": "pi",
            "type": "gadget",
            "default-channel": "24/stable",
            "id": "YbGa9O3dAXl88YLI6Y1bGG74pwBxZyKg"
        },
        {
            "name": "pi-kernel",
            "type": "kernel",
            "default-channel": "24/stable",
            "id": "jeIuP6tfFrvAdic8DMWqHmoaoukAPNbJ"
        },
        {
            "name": "core24",
            "type": "base",
            "default-channel": "latest/stable",
            "id": "dwTAh7MZZ01zyriOZErqd1JynQLiOGvM"
        },
        {
            "name": "snapd",
            "type": "snapd",
            "default-channel": "latest/stable",
            "id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4"
        },
        {
            "name": "console-conf",
            "type": "app",
            "default-channel": "24/stable",
            "id": "ASctKBEHzVt3f1pbZLoekCvcigRjtuqw",
            "presence": "optional"
        },
        {
           "name": "ubuntu-frame",
           "type": "app",
           "default-channel": "22/stable",
           "id": "BPZbvWzvoMTrpec4goCXlckLe2IhfthK",
           "presence": "optional"
        }
    ]
}

and if i clone the “24” branch, and add logo vendor, not showing my logo, but ubuntu core logo…