Use console-conf for device onboarding

Console-conf is a text-based user-interface that can be optionally included in an Ubuntu Core image to provide interactive network and user configuration.

Network connections

All pre-built testing images include console-conf, enabling those images to be configuration on first boot by connecting a device to a display and keyboard. User configuration requires an Ubuntu One account and registered SSH key. See Use Ubuntu One for SSH for details.

The packages required to run console-conf are included in Ubuntu Core 22 images, but from Ubuntu Core 24 onwards, the console-conf has migrated to an optional snap.

The console-conf snap can be added to your own images in two different ways:

From within the model

The console-conf snap can be added to the model declaration just like any other snap. Add the following to the json definition for your model:

{
    "name": "console-conf",
    "type": "app",
    "default-channel": "24/stable",
    "id": "ASctKBEHzVt3f1pbZLoekCvcigRjtuqw"
},

It’s also included in the ubuntu-core-24 test image model declarations, although it’s marked at optional in these. Removing the "presence": "optional" line will trigger its inclusion when building your own versions of these models.

See Create a model assertion for more details.

Using the ubuntu-image command

The ubuntu-image command is used to generate a bootable Ubuntu Core image from your source files. To build an image from the ubuntu-core-24-amd64 model assertion for the pre-bulit images, for example, use the following command:

ubuntu-image snap ubuntu-core-24-amd64.model

The image generated by the above command will not launch console-conf, and instead, will take the user directly to a login prompt. This is because its model description marks the console-conf snap optional and is consequently not included in the image.

To force the inclusion of console-conf, or any other snap, use the --snap argument with ubuntu-image:

ubuntu-image snap --snap console-conf ubuntu-core-24-amd64.model 

The resultant image will boot to console-conf’s onboarding menu.

This page was last modified 7 months ago. Help improve this document in the forum.