Set up a Rasperry Pi from scratch without a monitor and keyboard

Note

  • Setting up the Raspberry Pi without a monitor and without keyboard is called a ‘headless’ setup.
  • Using the NOOBS installer seems not to work. Instead flash the card directly with an image.
  • Activate the SSH service by placing a file called ‘ssh’ into the boot partition.
  • The initial start up of the Raspberry Pi may take 20 min.

Procedure

Dowload Raspian Image

Flash the image to the microSDHC card

Activate the SSH service

  • Mount the microSDHC card on the computer used to flash the image to the card
  • Add an additional, empty file called ‘SSH‘ to the boot partition
    • ‘cd’ into the boot partition
      cd /Volumes/boot/
    • Create an empty file named ‘ssh’:
      touch ssh

Set up the Raspberry Pi

  • Insert the microSDHC card into the Raspberry Pi
  • Connect the Rasperry Pi to the network
  • Boot up the Raspberry Pi by connecting it to the power supply
  • Be patient – it may take 20 min for the Raspberry Pi for the initial start up. Wait until the red power led glows steadily and the green activity led stopped flashing.

Find out the IP address of the Raspberry Pi

  • Login to the router. Check the assigned IPs.
  • Scan the IP range
    • On Mac in the Terminal (The && in the code below are not rendered correctly)
for ip in $(seq 1 254);
do ping -c 1 -t2 192.168.10.$ip;
[ $? -eq 0 ] && echo "192.168.10.$ip UP" || : ; done

Connect with SSH to the Raspberry Pi

  • Find out the IP address of the Raspberry Pi
  • In the Terminal enter
    ssh pi@[IP address]
  • Confirm the message by typing ‘yes’
  • Enter the password ‘raspberry’

Configure with raspi-config

  • After connecting with SSH to the Raspberry Pi, enter:
    sudo raspi-config
  • Advanced Options → Expand Filesystem
    • Check the file system with
      df -h
  • Change User Password

References

Leave a Reply

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