Hello everyone,
I have been trying for the last two days to get a Raspberry Pi 3 working under Ubuntu Core without console-conf by using cloud-init.
Sadly every single time, I face the same issue. After the Rpi boots and ssh is enabled, I am unable to use snap as apparently the setup process is not finished.
A simple sudo snap refresh
will lead to the following message:
error: too early for operation, device not yet seeded or device model not acknowledged
Let me give you here more information. model.json
{
"type": "model",
"authority-id": "---acc-id--",
"brand-id": "---acc-id--",
"series": "16",
"model": "pi3-arp",
"architecture": "armhf",
"base": "core18",
"gadget": "pi=18-pi3",
"kernel": "pi-kernel=18-pi3",
"timestamp": "---proper_timestamp--",
"required-snaps": ["docker"]
}
As you can see here, I am also requiring docker to be installed, but that is also not the case.
I have tried the following to create the image (also tried --extra-snaps before I tried required-snaps, I know that required snaps can’t be removed):
sudo ubuntu-image snap -c stable -O pi3 --cloud-init mycloud.conf myfilesigned.mode
The Rpi with this image boots up perfectly, but apparently the seeding of the device is not going well.
In case you wonder about the cloud-init it simply creates a system user with an SSH key and turns off console-conf cloud.conf
users:
- name: someuser
gecos: somefullname
homedir: /home/someuser
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, admin
lock_passwd: true
shell: /bin/bash
ssh_authorized_keys:
- a_pub_ssh_key_here
bootcmd:
- mkdir /var/lib/console-conf
- touch /var/lib/console-conf/complete
That’s about it. If you have any tips or readings that could help solve my problem I would be very grateful. I have checked dmesg and journalctl -u snapd and haven’t found anything suspicious except one error about “PolicyKit1 was not provided by any .service files”
Thank you in advance, and sorry if this was already answered as I look through the forum and the web I could not find someone with a similar issue.