Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4104

Ubuntu • Re: Looking for more advanced ubuntu raspberry pi documentation

$
0
0
There's the cloud-init docs, which have gotten a bit better recently (they were almost wilfully obscure when I started working with it several years ago!). The Reference / Module reference section is the part I usually find most useful, particularly now there are schemas & examples for each module.

However, for getting started with it, I'd suggest just looking at the examples I bunged on the boot partition. If you flash a fresh Ubuntu Server for Pi image onto a card, then have a look on the boot partition, you'll see the following files which form the cloud-init "seed" (i.e. its initial configuration):
  • network-config -- This is the initial netplan configuration used on first boot; I left some examples of wifi setup in here along with the usual eth0 setup
  • meta-data -- The default here tells cloud-init not to look for a network-based seed, via dsmode (just the stuff on the boot partition)
  • user-data -- This is the bulk of the cloud-init configuration, providing the initial user, packages, apt specs, etc etc. Again, I left a few commented examples in here which may provide some ideas of what's possible
If you are interested in network-based seeds, let me know -- I can whip up a fairly simple example quite quickly. One other minor hint, for experimentation: you can use the following command to mostly reset the things cloud-init does and retry its first boot:

Code:

sudo cloud-init clean --logs --reboot
But be warned this doesn't undo absolutely everything (there's a lot of corner cases) so always test with a completely clean image before deciding a configuration is "correct".

Hope that helps!

Statistics: Posted by waveform80 — Fri Jan 26, 2024 4:13 pm



Viewing all articles
Browse latest Browse all 4104

Trending Articles