In this tutorial, we will walk you through creating a bootable Ubuntu microSD card for your Raspberry Pi .
What you’ll learn
How to create a bootable microSD card to run Ubuntu on your Raspberry Pi
What you’ll need
- A microSD card
- An Ubuntu Server image
- A computer with a microSD card drive
Following these steps will erase any existing content on the removable drive!
On your MacOS machine
Download the Ubuntu image for your device in your
Insert your microSD card
Open a terminal window (Go to Application » Utilities, you will find the Terminal app there), then run the following command:
In the results, identify your removable drive device address, it will probably look like an entry like the ones below:
/dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.3 GB disk0 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: Apple_HFS Macintosh HD *428.8 GB disk1 Logical Volume on disk0s2 E2E7C215-99E4-486D-B3CC-DAB8DF9E9C67 Unlocked Encrypted /dev/disk3 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *7.9 GB disk3 1: DOS_FAT_32 NO NAME 7.9 GB disk3s1
Your removable drive must be
DOS_FAT_32formatted. In this example,
/dev/disk3is the drive address of an 8GB microSD card.
Unmount your microSD card with the following command:
diskutil unmountDisk < drive address >
When successful, you should see a message similar to this one:
Unmount of all volumes on < drive address > was successful
You can now copy the image to the microSD card, using the following command:
sudo sh -c 'gunzip -c ~/Downloads/< image file > | sudo dd of=< drive address > bs=32m'
When finalised you will see the following message:
3719+1 records in 3719+1 records out 3899999744 bytes transferred in 642.512167 secs (6069924 bytes/sec)
- You can now eject your microSD card
That’s all folks!
You did it!
Now you can put the microSD card in your Raspberry Pi and boot it up.