Installing Raspbian 10 on a Raspberry Pi Zero/3/4

Getting Started

Raspberry Pi Zero W

In my home lab I have a Raspberry Pi 4, a Raspberry Pi 3 B+, and a Raspberry Pi Zero W (thanks Graham!). Setting up and configuring these is pretty straightforward, I primarily followed the instructions from the but I thought I’d add my notes for easier reference. The instructions are fairly similar for each, so I’m going to focus on the Raspberry Pi Zero W.

Installing the Base Image

While I generally prefer straight Debian, the Raspberry Pi platform is best supported by the Debian-derived Raspbian distro. I used the Raspbian Buster Lite base image to keep it minimal.

I flashed the image onto a 32 gig microSD card with Balena Etcher for OSX.

With my microSD card ready I plugged in my mini-HDMI adapter and HDMI cable, a micro-B OTG USB hub and a USB keyboard and USB ethernet cable and booted into Raspbian.

Configuring Raspbian

The default user/password combination on Raspbian is pi and raspberry, which you’ll want to immediately change with passwd.

I then used the built-in raspi-config command to enable SSH and to configure the hostname, wifi, timezone and locale.

sudo raspi-config

I then copied over my SSH key so I wouldn’t need to use my password when logging in.

ssh-copy-id pi@


Now that I was able to SSH over and sudo to root, there were a few final steps. Raspbian has the swap configured, which isn’t very useful on a system booting off an SD card.

dphys-swapfile swapoff
dphys-swapfile uninstall
update-rc.d dphys-swapfile remove
apt-get remove dphys-swapfile

To ensure the latest versions of the base install:

apt-get update
apt-get upgrade

Then I rebooted the box and unplugged the ethernet, video, and keyboard. It was now on my network via wifi and ready to be remotely administered.

GPU Memory Usage

Because my systems are used primarily has headless servers, I’ve configured them to use less GPU memory by setting


in the /boot/config.txt. I do this in the mattray::raspberrypi recipe used by all of my Raspbian systems.

Raspbian sets the file /etc/ to


in an attempt to support both the 6l and 7l ARMHF platforms. This breaks the Chef 32-bit ARM builds on Raspbian so I have replaced this line with

echo /usr/lib/arm-linux-gnueabihf/ > /etc/

on the Raspberry Pi 3 and 4 and

echo /usr/lib/arm-linux-gnueabihf/ > /etc/

on the Raspberry Pi Zero.