Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save torgeir/0c010205705bb46fbfa7 to your computer and use it in GitHub Desktop.
Save torgeir/0c010205705bb46fbfa7 to your computer and use it in GitHub Desktop.
Installing ubuntu snappy core on the raspberry pi 2 from os x

Installing ubuntu snappy core on raspberry pi 2

Translated to os x from https://developer.ubuntu.com/en/snappy/start/#snappy-raspi2

Download the image

http://people.canonical.com/~platform/snappy/raspberrypi2/

Locate your sd card

$ diskutil list
/dev/disk0
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *500.3 GB   disk0
1:                        EFI EFI                     209.7 MB   disk0s1
2:                  Apple_HFS Macintosh HD            399.5 GB   disk0s2
3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
4:       Microsoft Basic Data BOOTCAMP                99.8 GB    disk0s4
/dev/disk1
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:     FDisk_partition_scheme                        *31.9 GB    disk1
1:             Windows_FAT_32 NO NAME                 31.9 GB    disk1s1                       <<< this is the sd card

IN MY CASE IT WAS DISK1 - DO NOT JUST COPY AND PASTE THE BELOW - USE YOUR SD CARD'S DEVICE

Unmount the disk

diskutil unmountDisk /dev/disk1

Prepend r to your disk identifier and execute the following command (in my case i changed disk1 to rdisk1)

$ unxz -c ubuntu-15.04-snappy-armhf-rpi2.img.xz | sudo dd of=/dev/rdisk1 bs=32m && sync && say done

(os x needs a lower case m in 32m, otherwise its 32M)

@jeffreyvanhees
Copy link

Thanks for the tutorial! It takes a while, but works perfectly :)

@addieM
Copy link

addieM commented Oct 21, 2015

how do I use the sd size for the whole system ?

@harryprince
Copy link

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage                         250.1 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           *249.8 GB   disk1
                                 Logical Volume on disk0s2
                                 14F1A972-0466-4268-80BC-507F93279B64
                                 Unlocked Encrypted
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *10.0 MB    disk2
   1:                  Apple_HFS MPlayerX                10.0 MB    disk2s1
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.9 GB    disk3
   1:             Windows_FAT_32 NO NAME                 15.9 GB    disk3s1

but error occur, I need help.

Unmount of disk3 failed: at least one volume could not be unmounted

@harryprince
Copy link

unxz -c ubuntu-15.04-snappy-armhf-rpi2.img.xz | sudo dd of=/dev/rdisk3 bs=32m && sync && say done

but error occur, I need help.

dd: /dev/rdisk3: Resource busy

@olierxleben
Copy link

worked great. Thanks for sharing.

@jabelk
Copy link

jabelk commented Jul 27, 2018

worked like a charm. If your card size is different than 32, as in my case was 64, use different bs=32m to bs=64 or else it hangs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment