Headless (Lite) RPi OS Bookworm - Alternate to /boot/wpa_supplicant.conf & /boot/ssh files

This is a temporary/experimental sytstem, working till the day of this post, but may be replaced by cloud_init anytime

 

After writing RaspberryPi OS image Bookworm (LITE) to microSD card, using Balena Etcher or Win32DiskImager, do not eject the card reader / microSD card.

While the microSD card is still in card reader of your Laptop / Desktop, open the card reader drive. This will open /boot partition of microSD card. In this partition, create a blank file named custom.toml.

IMPORTANT: Make sure there is no hidden or visible file extension .txt at the end of file name custom.toml

In the newly created blank file custom.toml, copy paste following code.
Please replace values of parameters by your custom values.
Save File custom.toml

Slip out microSD card from card reader, slip into RPi and power up. The WiFi and SSH both will ber available.

Contents of file custom.toml
Please replace values of parameters by your custom values.

config_version = 1

[system]
hostname = "raspberrypi"

[user]
name = "pi"

password = "my-rpi-password"
password_encrypted = false

[ssh]
enabled = true
password_authentication = true

[wlan]
ssid = "my-ssid"
password = "my-wifi-password"
password_encrypted = false
hidden = false
country = "CA"

[locale]
keymap = "us"
timezone = "America/Toronto"


 

SOURCES:

(1) custom.toml example for Raspberry Pi OS · GitHub

(2) wifi - Headless Wi-Fi setup without the RPi Imager: bootfs/wpa_supplicant.conf not supported since Bookworm - Raspberry Pi Stack Exchange

 

 

1 Like