Ubuntu Core18 stuck at boot up: How to configure network so can SSH in

I have not been able to get core20 to boot on bare metal Intel Celeron 1900, so now I am trying core18.

Instead of using the standard Ubuntu Core 20 image, this time I made a custom one:

{
  "type": "model",
  "series": "16",
  "model": "ubuntu-core-18-amd64",
  "display-name":"Ubuntu Core 18 (amd64)",
  "architecture": "amd64",
  "kernel": "pc-kernel=18",
  "gadget": "pc=18",
  "base": "core18",
  "required-snaps": ["core", "core20", "mir-kiosk", "wpe-webkit-mir-kiosk"],
  "authority-id": "FYkzzoGNTG5DNdxZbeYRI1BDR8L7qBm2",
  "brand-id": "FYkzzoGNTG5DNdxZbeYRI1BDR8L7qBm2",
  "timestamp": "2021-07-28T10:40:41+00:00"
}

At least I get something now. It does not make it all the one to the first time setup, it gets stuck in this loop, I think its waiting for me to SSH in:

It boots up and the last text it shows before the black screen and flashing cursor is:

Then for about a 5 minutes it shows this black screen and flashing cursor, I guess that means its time to SSH:

michael@snapdev:~/terminal/conf/snap/model_assertions$ ssh <username>@192.168.8.105 -i ~/.ssh/ubuntu.com 
Enter passphrase for key '/home/michael/.ssh/ubuntu.com': 
Connection closed by 192.168.8.105 port 22

After about 5 minutes then it will flash this for a few seconds:

Then return to the black screen with flashing cursor.

If I press the power button to turn off the computer it shows this is the first text shown:

And this is the last text:

On about the 20th reboot it actually started:

Just before wpe-webkit-mir-kiosk starts, it flashes “Press enter to configure” for about 1second. I smash enter continously as its about to show, and while it shows, but it does not stop for it, and continues to wpe-webkit-mir-kiosk .

So may main problem is how to configure it so I can setup the network, so then I can SSH into it.

you could use a serial cable :slight_smile: that gives you the configuration setup without having mir-kiosk interfere …

you could also use a system-user assertion on a USB stick to get the user set up

note that wired network on Ubuntu Core always defaults to DHCP so the system definitely is connected (check the dhcp server logs to see what IP it got assigned)

beyond this there are various other ways like https://github.com/ogra1/config-snap (you need a gadget that by default connects the interfaces here) or https://github.com/CanonicalLtd/device-config

or even use a cloud-init configuration …

Hmmm, okay so then I should not need first time setup to SSH in?
I am using sudo arp-scan -l --interface=eno1 | grep 192 which prints a list of IPs on the network, and just look for the new one that appears when I power it up (only 2 devices on my network).

I tried installing the official ubuntu-core-18-amd64.img, but then it doesnt boot like Ubuntu core 20.

Only had some luck with making own images. Do you think it will help if I create the image on the target device as opposed to on my dev laptop?

I wonder why I can’t SSH in?

If one uses the default or official images, how does it authenticate SSH?

I can understand if I create my own images, because then it looks at Ubuntu.com for the public key, but with the official core AMD64 releases, what is the SSH mechanism to control who can log in?

console-conf (the first-boot wizard thing that comes up on screen) talks to https://login.ubuntu.com/ downloads the ssh key you have put there and creates a user with the username defined there …

the same happens if you use a system-user assertion, the ssh key gets embedded into the assertion file, encrypted and signed