Installation and provisioning of Raspberry Pi computers can be so much easier with the automated bootstraping. This especially becomes very useful when you have to provision more than one Raspberry Pi and want to configure these devices similarly.

The following configuration works nicely with Rasbian / Debian Buster, and was not yet tested with Bookwork

Installing the OS

The operating system (OS) is usually located on a SD-card. This SD-card has to get configured or filled with the help of a different computer.

Since 05.03.2020 there is an offical helper tool available: the Raspberry Pi Imager

The Raspberry Pi Imager allows you to select the desired operating-system to install. In my case this is nearly always “Raspberry Pi OS”, based on Debian Linux, either as default version or as “Lite”-version (without graphical-environment).

Well, just using the Raspberry Pi Imager to install Raspberry Pi OS to some SD-card or USB-drive should be easy and straightforward, but how to continue?

If you’re using MacOS or Windows to create the images, you’ll see your destination device for your Raspberry Pi OS shows one visible and writeable partition labbeled “BOOT”. We’ll use this partition/volume to configure our Raspberry Pi in the next steps.


Basically you can prepare config-files, copy these to the partition labbeled “BOOT”, put the SD-card into your Raspberry Pi and boot it up.

Configuration of WiFi

In my Badminton-setup, I use Raspberry Pi as wireless-clients presenting some browser-window in Kiosk-mode. The point is now: wireless.

I only put this file into the mentioned “BOOT”-volume:

Filename: wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

For me this works flawlessly with the last versions of Debian / Raspberry Pi OS.

According to the Raspberry Pi OS network configuration you can even use multiple network-blocks in this file to support multiple WiFi networks.

Configuration of Users

Previously there was some default user pi on Raspberry Pi OS, but this default user was dropped for security reasons. Now you’d have to configure some user manually at first startup. But configuring a user manually at the first startup is very cumbersome and error-prone.

I follow the documentation how to do it differently:

  • Place a file with the filename userconf.txt into the mentioned “boot”-volume using this content scheme:

Use the command openssl passwd -6 to create a hashed password.



This will create a user username with the password password.

This user is configured to auto-login by default.

After the first bootup (and initial configuration of the user) I usually apply some Ansible-Playbook to configure this user, change the password and configure the ssh-keys.

If I want my Raspberry Pi directly into some browser running in kiosk-mode, the auto-login feature of the display-manager is a nice solution.

How to disable auto-login on tty


sudo ln -s /dev/null /etc/systemd/system/[email protected]/autologin.conf

Configuration of SSH

I need SSH access to my Raspberry Pi’s to have some remote admin access and apply additional configuration with Ansible.

The (for me) easiest way to enable the SSH-server is just this:

  • Put a file named ssh into the mentioned “Boot”-volume.

That’s just it. Upon boot-up of your Raspberry Pi the SSH-server is started.

You now could use ssh-copy-id to configure the authorized_keys of your user and start using Ansible for further configuration.

Further configuration

You can apply further detailed configuration via the file config.txt in the “boot”-volume.

Use can use this file to apply this configuration for example:

  • Configure modes of the HDMI-output
  • enable / disable Bluetooth
  • enable / disable Audio
  • Overclocking

# For more options and information see

# <>

# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible

# and your display can output without overscan


# uncomment the following to adjust overscan. Use positive numbers if console

# goes off screen, and negative if there is too much border

# overscan_left=16
# overscan_right=16
# overscan_top=16
# overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus

# overscan

# framebuffer_width=1280
# framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output


# uncomment to force a specific HDMI mode (this will force VGA)

# hdmi_group=2
# hdmi_mode=85

# uncomment to force a HDMI mode rather than DVI. This can make audio work in

# DMT (computer monitor) modes

# hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or

# no display

# config_hdmi_boost=4

# uncomment for composite PAL

# sdtv_mode=2

# uncomment to overclock the arm. 700 MHz is the default.
# arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces

# dtparam=i2c_arm=on
# dtparam=i2s=on
# dtparam=spi=on

# Uncomment this to enable the lirc-rpi module

# dtoverlay=lirc-rpi

# Disable Bluetooth


# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)



# Enable Debug-mode

# dtdebug=1

# sudo vcdbg log msg

# dtc -I fs /proc/device-tree