How to install Ubuntu on Raspberry Pi 2 - Sentto/Sentto-University GitHub Wiki
From your desktop computer, you can download and install a pre-built snappy Ubuntu Core image for your Raspberry Pi 2 and copy it to an SD card ready to boot.
https://developer.ubuntu.com/en/snappy/start/raspberry-pi-2/
Install from a Mac
First of all you need to download the Raspberry Pi image from this link.
Save the file in your Download folder. Unarchive the file ubuntu-15.04-snappy-armhf-raspi2.img.xz by double clicking on it. You should now have a ubuntu-15.04-snappy-armhf-raspi2.img file in your Download folder. In order to uncompress the file you might need to download a new un-archiving application like The Unarchiver.
Insert your SD card into your MAC (note that you will need an adapter for your Micro-SD card)
Open a terminal window (Go to Application -> Utilities you will find the Terminal app there). Run the following command:
diskutil list
/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 Macintosh 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 Macintosh HD +499.1 GB disk1
Logical Volume on disk0s2
48783C40-943F-467C-B892-9247406C8F2C
Unlocked Encrypted
/dev/disk2 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *7.8 GB disk2
1: DOS_FAT_32 UNTITLED 7.8 GB disk2s1
Note that your SD Card must be DOS_FAT_32 formatted. The SIZE will be the size of your SD card, in this example an 8GB SD Card.
Write down the number after /dev/disk that is associated with your SD card, in this case 2.
Unmount your SD card, for this you will need the number you just wrote down by entering the command:
diskutil unmountDisk /dev/disk<disk number you wrote down above>
in this example we used:
diskutil unmountDisk /dev/disk2
When successful you should see a message similar to this one:
Unmount of all volumes on disk# was successful
This effectively made the SD card ready to receive a copy of Ubuntu Core. The next step is to copy Ubuntu Core to the SD card, using the following command:
sudo dd bs=1m if=~/Downloads/ubuntu-15.04-snappy-armhf-raspi2.img of=/dev/rdisk<disk number you noted above>
In this example:
sudo dd bs=1m if=~/Downloads/ubuntu-15.04-snappy-armhf-raspi2.img of=/dev/rdisk2
You will be prompted to enter your Apple password after this command.
Tips: If the above command reports an error (dd: bs: illegal numeric value), please change
bs=1m
tobs=1M
. If the above command reports an errordd: /dev/rdisk2: Permission denied
, then that is because the partition table of the SD card is being protected against being overwritten by MacOS. Erase the SD card's partition table using this command:sudo diskutil partitionDisk /dev/disk2 1 MBR "Free Space" "%noformat%" 100%
Note that this operation will take between 15 and 30 minutes, during which you will not see any progress! Be patient, get a cup of coffee. You can check the progress by sending a SIGINFO signal pressing Ctrl+T.
When finalised you will see the following message:
3719+1 records in
3719+1 records out
3899999744 bytes transferred in 738.457050 secs (5281282 bytes/sec)
You’re done!! Extract the card and slot it in your Raspberry Pi to give it a spin!
This section uses content from the eLinux wiki page RPi_Easy_SD_Card_Setup and from the Raspberry Pi Foundation, which is shared under the Creative Commons Attribution-ShareAlike 3.0 Unported license.
Log in to Ubuntu Core
Power on your Raspberry Pi 2 and wait 1-2 minutes for the OS to complete its first boot. You can then access your snappy Ubuntu Core system either directly with a keyboard and display connected, or through SSH:
$ ssh [email protected]
The default username and password are ubuntu. It's time to to explore your new system.
NEXT READ: A snappy tour of Ubuntu Core!