Rasberry Pi Guides >>>
Installing Rasbian
Having run numerous experiments on my Rasberry Pi I am ready to install the final version of my weather software and put it into production, but before I start I needed to clean everything up and do a clean install of Rasbian.
There are excellent instructions for this on the Rasbian Web Site
The instructions below are the manual way to do it, which is what I prefer to do.
First get the most recent copy of Rasbain, this can be found here
On linux you can use wget, but on a mac you have to use curl
NOTE: You must use the -L switch, which tells curl to follow the link to the lastest copy,and the -o switch to direct the output to a file
iMac:~ Mike$ curl -L https://downloads.raspberrypi.org/raspbian_full_latest -o raspbian_full_latest.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 298 100 298 0 0 908 0 --:--:-- --:--:-- --:--:-- 911 35 2530M 35 902M 0 0 5654k 0 0:07:38 0:02:43 0:04:55 6765k
Before you can use the file, you have to unzip it
iMac:~ Mike$ unzip raspbian_full_latest.zip Archive: raspbian_full_latest.zip inflating: 2020-02-13-raspbian-buster-full.img iMac:~ Mike$ ls -al total 19486304 drwxr-xr-x 6 Mike admin 204 22 Mar 09:48 . drwxr-xr-x 19 Mike admin 646 21 Mar 15:54 .. -rw-r--r-- 1 Mike admin 7323254784 13 Feb 16:31 2020-02-13-raspbian-buster-full.img -rw-r--r-- 1 Mike admin 2653723839 22 Mar 09:16 raspbian_full_latest.zip
Now you can use this image to format your SD card
Plug you SD card into you computer and use diskutil to get the disk information
On my system the SD card is disk5
iMac:~ Mike$ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *4.0 TB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_CoreStorage MacintoshHD 4.0 TB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 /dev/disk1 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk1 1: EFI EFI 209.7 MB disk1s1 2: Apple_CoreStorage MacintoshHD 121.0 GB disk1s2 3: Apple_Boot Boot OS X 134.2 MB disk1s3 /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *6.0 TB disk2 1: EFI EFI 209.7 MB disk2s1 2: Apple_HFS TimeMachine 6.0 TB disk2s2 /dev/disk3 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *32.0 GB disk3 1: Windows_FAT_32 boot 268.4 MB disk3s1 2: Linux 31.7 GB disk3s2
Now that we know which disk to format, first unmount it.
iMac:~ Mike$ diskutil unmountDisk /dev/disk3 Unmount of all volumes on disk5 was successful
The copy the new image onto the raw device which corrosponds to the SD Card.
You can check progress with the <ctl>+t command
iMac:~ Mike$ sudo dd bs=1m if=2020-02-13-raspbian-buster-full.img of=/dev/rdisk3 conv=sync Password: load: 1.63 cmd: dd 48060 uninterruptible 0.02u 0.33s 603+0 records in 602+0 records out 631242752 bytes transferred in 16.161957 secs (39057322 bytes/sec) 6984+0 records in 6984+0 records out 7323254784 bytes transferred in 187.739254 secs (39007584 bytes/sec)
Once the copy has finished you can eject the SD card.
It is now ready for use in your Rasberry Pi