Setup Raspbian

Posted on

Download Raspian Full Desktop

After downloading run ssl checksum with the SHA-256 key

Burn Image using Windows10 and Win32DiskImager

Select Image file by clicking on folder icon, Select Device (Select SD Card from drop Down), then click Write button to burn image file on the selected device

Start Raspberry Pi to finish setup and install updates

Configuration will ask to set country settings, change Password, Select Wifi and Wifi Password, Next Update Software (takes ~15 min) and then Reboot when finished updates.

Alternate Instruction using Raspberry Pi only

Download Raspian Zip file then use Archiver desktop app to extract contents of zip file.
Run open ssl sha256 checksum on the zip file. Verify that the result matches the result on the website.

openssl sha256
example: openssl sha256 home/pi/Downloads/
SHA256( 0ca644.........

On The Command Line use unzip and replace filename with the file downloaded from Making Sure there is enough available Free Space for the uncompressed img file (up to 5.4 GB for Full Desktop Version)

example: unzip home/pi/Downloads/
inflating: 2018-11-13-raspbian-stretch-full.img

Copy image to SD Card

On Linux using dd command:

sudo dd if=/location/of/the/img/file.img of=/dev/sdx 

example: sudo dd if=/home/pi/Downloads/Extracted/2018-11-13-raspbian-stretch-full.img of=/dev/sda
10346496+0 records in
10346496+0 records out
5297405952 bytes (5.3 GB, 4.9 GiB) copied, 1620.69 s, 3.3 MB/s

To validate img file was copied check /media/pi for boot and rootfs folders which are placeholders for the SD card Partitions.

Eject the USB MicroSD Card Reader then insert it into the Raspberry Pi to continue configuring. If setting up for a headless (remote access with no Monitor connected) follow the instructions listed below to configure access.

Enable SSH
Create a new empty file with the name ssh without a file extension

sudo touch /media/pi/boot/ssh

Enable Gadget Mode
open file config.txt on the partition named boot

sudo nano  /media/pi/boot/config.txt

#Enable USB ethernet Gadget mode by adding the Following Line


Save and close the file then open the file cmdline.txt

sudo nano  /media/pi/boot/cmdline.txt

The file will list a long instruction set. This needs to remain one continuous line. Find rootwait quiet and insert modules-load=dwc2,g_ether
Example Below:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=1c7f26dc-02 rootfstype=ext4 elevator=deadline rootwait modules-load=dwc2,g_ether quiet splash plymouth.ignore-serial-consoles

to check connection to RaspberryPi usb Gadget use the ping command. Values such as IP and time will be different.

ping rasberrypi.local
example: PING raspberrypi.local ( 56(84) bytes of data.
64 bytes from raspberrypi.local ( icmp_seq=1 ttl=64 time=0.965 ms
64 bytes from raspberrypi.local ( icmp_seq=2 ttl=64 time=0.373 ms

If more than one raspberry pi is connected to the network make sure you keep track of IP addresses and verify that the IP addess is link-local IPv4 address following the format 169.254.#.# and not a DHCP assigned value as it should not be able to connect yet.
Next SSH into the RaspberryPi using the IP Address from the ping confirm you want to continue connecting and enter password when prompted

ssh pi@raspberrypi.local
The authenticity of host 'raspberrypi.local (' can't be established.
ECDSA key fingerprint is SHA256:###########/f/pbatI+sm2cuG+sqkE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'raspberrypi.local,' (ECDSA) to the list of known hosts.
pi@raspberrypi.local's password:
Linux raspberrypi 4.14.79+ #1159 Sun Nov 4 17:28:08 GMT 2018 armv6l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Nov 13 14:25:33 2018
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
pi@raspberrypi:~ $

From here the rspberry pi is now accessible from the host at the IP Address.