Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First boot customization? #94

Open
inferiorhumanorgans opened this issue Feb 28, 2025 · 3 comments
Open

First boot customization? #94

inferiorhumanorgans opened this issue Feb 28, 2025 · 3 comments

Comments

@inferiorhumanorgans
Copy link

Per this comment it sounds like cloud-init support was the end goal. However it looks like that's been abandoned and customizing the first boot is no longer (officially) supported? Are there any plans to at least document config.toml which has lots of paper cuts that aren't documented anywhere?

#82 (comment)

@MichaIng
Copy link
Contributor

With the Raspberry Pi Imager, you can pre-configure the image: https://www.raspberrypi.com/documentation/computers/getting-started.html#raspberry-pi-imager

@inferiorhumanorgans
Copy link
Author

inferiorhumanorgans commented Feb 28, 2025

Sorry, I should clarify: in a repeatable and scriptable manner. Before bookworm and the systemd disaster this was possible in a supported manner. This also doesn't address the underlying question: has cloud-init been abandoned?

@MichaIng
Copy link
Contributor

Ah right, that is somewhat lacking. cloud-init AFAIK is not abandoned, is still the final goal, but no one started working on it yet/no ETA.

On first boot, /usr/lib/raspberrypi-sys-mods/firstboot is executed. So that one can be used for customization. It also handles the custom.toml, which is finally done by the Python script /usr/lib/raspberrypi-sys-mods/init_config. So from that script you can derive available settings. Like this should create a user with password and enable SSH with password authentication:

[user]
name = "michaing"
password = "some_plain_password"
is_encrypted = false

[ssh]
enabled = true
password_authentication = true

The password can be also given encrypted, but would need to check the algorithm. An SSH key can be provided, but I am currently not sure how to define it correctly. Probably like this as array:

authorized_keys = [ "ssh-ed25519 XXXXXXXXXXXXXXXX comment" ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants