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
  1. mount boot partition
  2. enable ssh:
    sudo touch /mountpoint/To/bootPartition/ssh     
  3. mount root partition
  4. 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"
    }
  5. 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)
  6. login with password raspberry
    ssh pi@raspberrypi
  7. 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.

This entry was posted in embedded, linux. Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.