Re-triggering console-conf?

I have a raspberry pi running ubuntu core. It was all setup fine at home on my LAN. I have brought i to the office and need to configure it on the LAN here. It’s not connected to the network yet, so I think i need to re-run console-conf. I’ve connected to it over a serial console and see the following:-

Ubuntu Core 16 on <no ip address> (ttyS0)

You cannot log in until the system has an IP address.
(Is there supposed to be a DHCP server running on your network?)

How do I re-trigger this?

@ogra suggested I delete /writable/system-data/var/lib/console-conf/complete but that file doesn’t exist. Any ideas how I can re-trigger the setup of this Pi again?

1 Like

@mwhudson, @mvo any suggestions?

Hi @popey - thanks for bringing this up, this is an interesting use-case, we should probably support a more direct approach directly via the console-conf message to reconfigure the network. Input from @mwhudson would be most welcome here.

The console-conf-wrapper script will check if the device is managed and only trigger console-conf if the device is not managed. Unfortunately there is no trivial way to reset the managed state, you would have to modify /writable/system-data/var/lib/snapd/state.json. So the best option is probably put the board into “debug” mode (see How to put the dragonboard into "debug" mode) and then run console-conf manually from the root shell via serial console.

Sorry that there is currently no simpler way.

Yes, afaik this is a gap currently. How should this work? If someone can come up with a design, I or someone else can probably implement it…

First of all it sound like the use case here doesn’t want for the device to get back to unmanaged, OTOH we don’t have network nor a password setup I suppose? all we have is ssh keys but not way to ssh connect?

Exactly.

I am sat at the device, and cannot use it at all. I can plug a display and keyboard in, but cannot login, because we don’t enable local logins by default, and I didn’t have the forethought to set a password for my account. if there was wired network available, I might be able to get a cable and get online that way, then ssh in over ethernet and setup wifi that way (this is what I ended up doing). But in some situations it’s not practical.

If I could plug a USB key in with some special file on it, or modify a simple text file on the SD card to make it connect to a specific wireless network, that might be a decent enough workaround.

1 Like