Download latest raspbian operating system from RaspberryPi foundation Downloads page, preferably Lite Image i.e w/o Desktop Environment, since we would be using our Pi Headless '''wget https://downloads.raspberrypi.org/raspbian_lite_latest'''
Unzip the downloaded file to obtain image/iso file using following command: '''unzip 2017-06-21-raspbian-jessie-lite.zip'''
Next step is to flash the image packaged with Root file system(rootfs), Kernel and DTB to SD card. This can be done in two ways:
-
People who prefer GUI Download etcher from https://etcher.io/ which is a cross platform tool to flash images to media storage devices.
-
People who prefer CLI can use dd command line utility Make sure to have minimum 8GB of SD card and format it before flash the image
- Check mount point of your SD card using "mount" command
- Unmount the SD card using command ''' umount <mount_point>
- Format the SD card using parted/gparted/mkfs
- Flash SD card using dd command : '''sudo dd if="path to your .img" of="mount_point" bs=1M ex: '''sudo dd if=~/Documents/2017-06-21-raspbian-jessie-lite.img of=/dev/sdb bs=1M'''
-
Remove and re-insert SD card to your workstation and ensure boot and rootfs is present and mounted successfully.
-
At this moment we need to enable SSH to Pi which is disabled by default, simple add a file ssh to boot partition using ''' touch ssh'''
-
Now put the microSD card to pi, add ethernet cable/WiFi card/optinal HDMI and power it up.
-
Search for the Pi on your LAN using an IP scanner utility and ssh into it
'' ssh pi@<IP_ADDRESS ''' default password is : raspberry
- Setup Pi for first time using sudo raspi-config and do following:
- Change default password
- advanced > Expand file system
- Enter - Reboot