A look at the Raspberry Pi Imager (Boot in headless mode)

Published on: August 19, 2020

Welcome to the 17th Raspberry Pi tutorial! My first Raspberry Pi tutorial was showing you how to use Etcher to load Raspbian on a MicroSD Card and boot your Pi and then how to connect in Headless mode. 

Since that video in November 2018, Raspberry Pi has come out with their own imager. They call it the Raspberry Pi Imager and it's wonderful! Not only does it have every type of Raspberry Pi OS (they moved away from calling it Raspbian) but it also includes software like RetroPie! 

Download Raspberry Pi Imager

Get the latest version of Raspberry Pi Imager here: https://www.raspberrypi.org/downloads/

This video can be seen as an update to the first video. I also show you how to connect to your Pi in headless mode. 

Booting your Pi with Raspberry Pi OS is easy. Once you install the Raspberry Pi Imager, run it, click on Choose OS, Pick "Raspberry Pi (other)" and select "Raspberry Pi OS Lite". This will install Pi without a desktop environment. 

Enable SSH

It takes a couple of minutes for the SD card to be flashed. Once it's done, remove your SD Card and plug it back in! This should make it appear on your drives list as "Boot". In my video, the SD card appeared as "Removable Disk" - I'm not sure if this is a side effect of the Pi Imager or if it's just my computer (let me know in the comments!). 

Open the drive and create a new blank file called ssh. It should not have any kind of extension, it should just be a simple file titled 'ssh'. 

The ssh will let your Pi know to open port 22 and enable SSH access to your Pi. 

Setting Up WiFi

If you have a Wired connection, you can skip these steps. But if you want to connect your Pi wirelessly, follow these steps. Then create a new file called wpa_supplicant.conf which will contain your WiFi information. The contents of that file will look like this:

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

    network={
	ssid="Your WIFI Name"
	psk="superSecretPassword"
	scan_ssid=1
    }

Update your ssd and psk with the values for your router. Put the SD card back in and turn on your Pi. 

Someone reminded me that you can try to connect to the Pi using the hostname. By default the hostname is raspberrypi. Use that to connect using PuTTY or your favorite SSH client. Your router will need to support this kind of DNS set up AND you shouldn't have any other Pis using that hostname, otherwise you may not connect to the correct device (or be able to connect at all). 

If the hostname method doesn't work, then you can still connect via IP address. Depending on your router/modem, you'll be able to see the list of devices connected to your network along with their IP address. In my video, I show you what I see in my Linksys access point which I specifically use for Raspberry Pis and my ESP modules. 

Once you find your Pi's IP address, put it into PuTTY (or any SSH client of your choosing), and connect. Enter pi as the user and password as the password and connect. If everything goes well, you'll be here and you have successfully used Raspberry Pi Imager to flash a MicroSD Card with Raspberry Pi OS, enabled SSH, configured your WiFi, and connected your Pi in Headless mode!

Patreon

I do these projects to learn and teaching is a good way to learn. But if you do want to support me, head on over to Patreon and become a Patron: https://www.patreon.com/nazmus

If you've implemented this project, I'd like to see it! So please share it with me through any of my regular channels. 

Remember to checkout the Resources section below for associated downloadable content, JSFiddle links, and other resources. Watch the video and follow along!

Resources:

No external resources for this video! Follow me on Github for other resources https://github.com/naztronaut



Comments: