PiZero Install OS and configure.

Installing Raspbian Raspberry Pi OS and configure basic settings.

I have a few Raspberry Pi around the house. One Pi3 runs PiHole and MySql, a Pi4 controls a 3d printer and a PiZeroW monitors the water feature and turns on the heater if it gets a bit cold.....

Before you start doing any of this you will need to install the OS and get your Pi connected to your network. In this example I will use a PiZeroW, note the W ! it means that it has WiFi, this version only costs around £14 with a pre-soldered header (my soldering is rubbish :) from Pimoroni UK or Pi Hut etc.

Parts Required:

  • Raspberry Pi with WiFi
  • Micro SD Card 8GB min, 16GB + recommended.
  • Micro SD Card adapter to connect to your PC.

Notes on the microSD card. Please do not buy the cheapest you can find, you may experience hard to trace errors, poor performance or data loss with a sub standard part. From experience I recommend the SanDiskULTRA, Class 10, A1, 32GB. It can be found online for around £5 and is at the time or writing cheaper than the 16GB version :o I have not had one fail on me yet !

Ok on to the steps...

  1. Download and install Raspberry Pi OS Imager for your OS. I am using Linux Mint but the process is similar for Windows and Mac.
  2. Insert / connect the SD card to your computer.
  3. Run Raspberry Pi Imager.
  4. Select your OS, I use the default Raspberry Pi with Desktop.
  5. Select your SD card.
  6. Click write.
  7. It takes around 5 minutes to download and copy on my old laptop.......
  8. Rosetta is sleeping next to the warm fan output.... 

  9. Click continue once finished but leave the card in.
  10. Now we need to pre-configure the WiFi details. To do this we create a file in the boot mount (not rootfs as shown in the image) of the SD card called "wpa_supplicant.conf" and open it with a text editor such as nano or notepad.
  11. Enter the following into the file customising it to your requirements :
    country=UK
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    network={
        ssid="SSID"
      scan_ssid=1
      psk="PASSWORD"
      key_mgmt=WPA-PSK
    }
  12. Important notes! The country should be set to your location UK, US, ES, FR etc. SSID is the name of your WiFi network, it needs the "" quotes around it. Password is your WiFi password again with "" quotes around it. Indentation is required, there are four spaces in the SSID line and two in the lines below, the image shows it better.
  13. In order to access the Pi we need to enable SSH. To do this simply create an empty file in the SSD boot mount called "ssh". eg. on linux command line, cd to the correct path and type "sudo touch ssh" enter. .
  14. The default hostname is "raspberrypi" if you are happy with this skip this step. I you want / need to change it you can edit the "hostname" file in the "etc" folder. Just replace the content with the hostname you require and save.
  15. Unmount / eject the SD card and insert into your Pi.
  16. Connect a power supply and wait 60 seconds. You should now be able to "ping" the hostname you previously entered.
  17. You can SSH into the pi using "pi@hostname" or using putty on Windows. Default username is "pi" and password is "raspberry".
  18. One more VERY IMPORTANT THING...once logged in via SSH change the password, it gives you instructions once you are logged in but just in case.. enter "passwd" and follow the prompts :)

If you cannot ping your new Pi check that the wpa_supplicant.conf file is correct and in the SD card boot mount. You can also check the DHCP table on your router to find the IP address.


Comments

Popular posts from this blog

Intro and Welcome

ScreenGrab

Exchange 2013 Event ID:15021, OWA blank screen