Raspbian headless install over Wifi

TLDR; Configure your new PI without a monitor

Just follow this guide to install your raspberry pi 3 without a monitor. It enables wifi and ssh in the default raspbian installation.

  1. install raspbian on your sdcard:
    export DEV=/dev/sdX; \
    unzip 2017-04-10-raspbian-jessie-lite.zip ;\
    cd 2017-04-10-raspbian-jessie-lite ;\
    sudo dd if=2017-04-10-raspbian-jessie-lite.img of=$DEV bs=4M && sudo sync
  2. mount boot partition
  3. enable ssh:
    sudo touch /mountpoint/To/bootPartition/ssh
  4. mount root partition
  5. edit /etc/wpa/wpa_supplicant.conf to:
    country=GB
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    network={
    ssid="MyWifiName"
    psk="MyWifiPassword"
    }

     

  6. nmap for new devices:
    nmap 192.168.178.0/24 -p 22 --open

    Nmap scan report for raspberrypi.fritz.box (192.168.178.137)
    Host is up (0.0099s latency).
    PORT   STATE SERVICE
    22/tcp open  ssh
    MAC Address: B8:27:EB:1F:25:A2 (Raspberry Pi Foundation)
  7. login with password raspberry:
    ssh pi@raspberrypi

     

  8. do whatever you want:
    sudo apt-get update && \
    sudo apt-get upgrade -y && \
    sudo apt-get dist-upgrade -y && \
    sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
    

     

And that’s all.

Leave Comment