-
-
Save lpenz/ef21bb38a7aa12ebde17fa719a8546b5 to your computer and use it in GitHub Desktop.
# Raspberry PI OS config.toml | |
# This file is used for the initial setup of the system on the first boot, if | |
# it's s present in the boot partition of the installation. | |
# | |
# This file is loaded by firstboot, parsed by init_config and ends up | |
# as several calls to imager_custom. | |
# The example below has all current fields. | |
# | |
# References: | |
# - https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/usr/lib/raspberrypi-sys-mods/firstboot | |
# - https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/usr/lib/raspberrypi-sys-mods/init_config | |
# - https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/usr/lib/raspberrypi-sys-mods/imager_custom | |
# Required: | |
config_version = 1 | |
[system] | |
hostname = "raspberrypi" | |
[user] | |
# If present, the default "rpi" user gets renamed to this "name" | |
name = "rpi" | |
# The password can be encrypted or plain. To encrypt, we can use "openssl passwd -5 raspberry" | |
password = "$5$pN7oRnie.WDOHoJY$aWEYmKUytN/S/bxMza5ksBiurbSJmcvcysBKHSmYa45" | |
password_encrypted = true | |
[ssh] | |
# ssh_import_id = "gh:user" # import public keys from github | |
enabled = true | |
password_authentication = false | |
# We can also seed the ssh public keys configured for the default user: | |
# authorized_keys = [ "ssh-rsa ... user@host", ... ] | |
[wlan] | |
ssid = "mywifi" | |
password = "$5$pN7oRnie.WDOHoJY$aWEYmKUytN/S/bxMza5ksBiurbSJmcvcysBKHSmYa45" | |
password_encrypted = true | |
hidden = false | |
# The country is written to /etc/default/crda | |
# Reference: https://wireless.wiki.kernel.org/en/developers/Regulatory | |
country = "IE" | |
[locale] | |
keymap = "gb" | |
timezone = "Europe/London" | |
Unfortunately, the [wlan]
section will not apply if password_encrypted = true
. I encrypted the wifi password via openssl passwd -5 password
.
I am an experienced SBC user.
@abcd567a If you read the three References
mentioned, you'll find that there are no options available to set ip addresses.
I'm curious if you were able to set an encrypted
wifi password in the custom.toml
?
how to add multiple wifi in the toml file?
@boelle If you go to the 3 sources listed, I think you'll find that there is no option for that.
:-(
@boelle Does the encrypted wifi password option work for you, by the way?
i gave up and used the imager tool for ssh enabled and a initial wifi config
after boot i added the extra wifi configs in /etc/NetworkManager/system-connections/
take care that owner/group is root and that the file is chmod 600 or else network manager will not load them
I want to add static ip address for wired and wireless netwok. How to do that using
custom.toml
? Following info to be set bycustom.toml
for eth0 and wlan0:method (manual / static)
ipv4 address (like 192.168.12.42/24)
ipv4 gateway (like 192.168.12.1)
ipv4 dns (like 192.168.12.1,8.8.8.8)
Thank you very much. This is great. I tested it on RaspberryPi OS Bookworm. created the file custom.toml in boot partition while microSD card was in card reader, and when RPi was booted, it successfully applied all cutomization.