Headless Install of Raspbian Stretch Lite

headless-booting.jpg

Install Raspbian Stretch Lite without a monitor using Etcher and editing the microSD boot partition.

I find it much easier to remotely access the Pi from my PC so I can copy and paste commands rather than typing everything using a keyboard connected to the Pi. This is called a headless set up. It’s a little more work to start but makes things a lot easier later.

Download the Lite version here: https://www.raspberrypi.org/downloads/raspbian/ and unzip it.
Burn the img file to a microSD card using Etcher – https://etcher.io/

You need to make some changes to the boot partition of the microSD card. You might have to remove the card from your PC and then insert it again to see two partitions. The first one is the boot partition. Don’t format the card!

To allow the  Pi to connect to your WiFi network and enable you to access it from your computer you need to create two files in the root folder – an empty file called ssh and a file called wpa_supplicant.conf

Two Files

in the file wpa_supplicant.conf add your WiFi connection details following the example below. Change the country code, SSID and psk (wifi password) to your own.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=ES
update_config=1

network={
ssid="YOUR SSD"
psk="your wifi password"
key_mgmt=WPA-PSK
}

Remove the microSD and insert it into the Pi Zero W and and power it up. Optionally, if you want to see the Pi booting you can connect it to an HDMI screen.

SSH Remote Access Setup

You will need a SSH client to access the Pi Zero from your computer. Here are some guides for different platforms: Windows, Linux and Mac, iOS or Android I use Putty on my PC and JuiceSSH on my Android phone.

You will also need the IP address of the Pi on your network. You should be able to see this in the control panel of your router or by using a network scan tool. More info here on scanning your network . Below you can see the IP address on my network of the Pi – 192.168.1.108

IP Address

Follow the instructions for your chosen SSH client and connect to the Pi via its IP address. The login is pi and the password raspberry.

This video has a very quick run through of the instructions above: https://youtu.be/2qDCxVRbge0?t=55

Leave a Reply

Your email address will not be published. Required fields are marked *

scroll to top