Setup for my Raspberry Pi

I got a RasPi as an early christmas gift and this post is just to remind me later what I did to set it up. Reminder to begin with, if you’re not me: I work with a Mac, so this setup is from an OSX perspective. It might apply to other unix-like Systems but you need to find the counterparts of the tools I am using that are available for your system. It might be difficult to adapt this for Windows. You have been warned.

So after backing up the original SD card contents that came with the included microSD, I went as follows:

Download Ubuntu

I chose the classic server version as I will be using Docker and Kubernetes, so I don’t want any opinion from my OS on already pre-packaged containers (aka “Snaps” in Ubuntu Core):

Format the SD card

Make sure the SD card is formatted in DOS FAT32 format:

If it is not, follow this guide:

By running:

worps-mac:~ root# diskutil list
/dev/disk0 (internal, physical):
/dev/disk1 (synthesized):
/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *15.9 GB    disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:       Microsoft Basic Data RASPI                   15.7 GB    disk2s2

To find the device.

Then unmount it

worps-mac:~ root# diskutil unmountDisk /dev/disk2

and run:

worps-mac:~ root# diskutil eraseDisk FAT32 RASPBIAN MBRFormat /dev/disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk2s1 as MS-DOS (FAT32) with name RASPBIAN
512 bytes per physical sector
/dev/rdisk2s1: 31076688 sectors in 1942293 FAT32 clusters (8192 bytes/cluster)
bps=512 spc=16 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=8192 drv=0x80 bsec=31107072 bspf=15175 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished erase on disk2

And check with

worps-mac:~ root# diskutil list
/dev/disk0 (internal, physical):
/dev/disk1 (synthesized):
/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.9 GB    disk2
   1:                 DOS_FAT_32 RASPBIAN                15.9 GB    disk2s1

It should display “DOS FAT 32”.

Flush the image onto the SD card – Create an installation media device

To format the SD card, I chose to follow the Ubuntu Core installation media guide available here:

Run the setup on the RasPI

Continuing on with the Ubuntu Core guide:

But obviously not very far as the configuration procedure for ubuntu core and ubuntu server differs greatly.