Closed jeff1evesque closed 9 years ago
First, we need to format the SD card using the MS-DOS (FAT)
format. Then, we need to install the Raspbian operating system on the SD card:
# create temporary directory
$ sudo mkdir /raspbian/
$ cd /raspbian/
# install 'Raspbian' image (not on SD card)
$ sudo wget -P /raspbian/ http://downloads.raspberrypi.org/raspbian_latest
$ ls
raspbian_latest
$ sudo unzip raspbian_latest
$ ls
2014-09-09-wheezy-raspbian.img raspbian_latest
# get partition listing
$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 999.3 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *27.9 MB disk1
1: Apple_partition_map 32.3 KB disk1s1
2: Apple_HFS src/sqlitebrowser 27.8 MB disk1s2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *7.8 GB disk2
1: DOS_FAT_32 SD-RPI 7.8 GB disk2s1
/dev/disk4
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *64.0 GB disk4
1: DOS_FAT_32 USB-RPI-1 32.0 GB disk4s1
2: DOS_FAT_32 USB-RPI-2 32.0 GB disk4s2
# copy 'Raspbian' image to SD card
$ sudo diskutil unmountDisk /dev/disk2
$ sudo dd if=2014-09-09-wheezy-raspbian.img | sudo pv | sudo dd of=/dev/rdisk2 bs=1m
6400000+0 records in1MiB/s] [ <=> ]
6400000+0 records out
3276800000 bytes transferred in 646.064640 secs (5071938 bytes/sec)
3.05GiB 0:10:46 [4.84MiB/s] [ <=> ]
0+50000 records in
0+50000 records out
3276800000 bytes transferred in 646.141940 secs (5071332 bytes/sec)
Note: the very last command can take up to 20mins. During our execution, pv had a transfer range of roughly 3.9-5.23MiB/s
, while the file was being copied, raspbian_latest
is 3276800000
bytes.
Note: if we had put bs=1m
before the first pipe only, or completely excluded the use of this property, the transfer rate would have varied between 660-740KiB/s
.
Note: if we had typed sudo dd of=/dev/disk2
, instead of our correctly type sudo dd of=/dev/rdisk2
, the speed would have been roughly 1/5, or about 1MiB/s
.
We will install the Raspbian operating system on the SD Card.