3. Writing Raspbian to an SD Card
19 Jan 2018Note: this information is very similar to the information on this page.
download the Raspbian jessie lite image I prepared for the class (it's called
sc_raspbian_stretch_01152018.img.gz) from dropbox to your computer (look for the link via email)download and install the
SDFormatterfrom hereplug your
microSDcard into anSDcard adapter and insert into your laptopopen
SDFormatter, which should automatically identify yourSDcard, and selectOverwrite Format, then click theFormatbutton. After a while the application will tell you that it is done erasing all data from theSDcardwith
SDcard plugged in to your computer enterdiskutil listin the terminal to locate the 8GB SD cardexample output:
/dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_CoreStorage HD 499.4 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 /dev/disk1 (internal, virtual): #: TYPE NAME SIZE IDENTIFIER 0: Apple_HFS HD +499.0 GB disk1 Logical Volume on disk0s2 F0EE8AE2-966C-4461-8AB7-DAC4A66164B5 Unencrypted /dev/disk2 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *8.0 GB disk2 1: Windows_FAT_16 RECOVERY 1.2 GB disk2s1 2: Linux 33.6 MB disk2s5 3: Windows_FAT_32 boot 66.1 MB disk2s6 4: Linux 6.7 GB disk2s7unmount the
SDcard so we can do write our new image to it by entering the following command into the terminal:diskutil unmountDisk /dev/disk<disk# from diskutil>for example:
diskutil unmountDisk /dev/disk2next, uncompress and copy the data from the
.img.gzfile to yourSDcard by entering the following in the terminal:gunzip --stdout nameofimage.img.gz | sudo dd bs=1m of=/dev/disk2for example:
gunzip --stdout rpi_fieldwork.img.gz | sudo dd bs=1m of=/dev/disk2this takes a VERY LONG TIME, so go get a cup of coffee or take a walk or something.
Eventually you should see something like this in the terminal confirming that
ddis done writing the.imgfile to theSDcard:3833+0 records in 3833+0 records out 4019191808 bytes transferred in 1642.354445 secs (2447213 bytes/sec)eject the
SDcard from your computer with the following command:sudo diskutil eject /dev/disk2put the
SDcard into your pi, plug power cable in, and confirm that it boots up (if theACTLED is flashing green than it has successfully booted up)