Skip to content

Instantly share code, notes, and snippets.

@AndrewWCarson
Last active May 1, 2019 20:24
Show Gist options
  • Save AndrewWCarson/39aac46d3f83086e03cefda322083100 to your computer and use it in GitHub Desktop.
Save AndrewWCarson/39aac46d3f83086e03cefda322083100 to your computer and use it in GitHub Desktop.
### Andrew Carson - 2017
#
# macOS 10.11.6
# Today's project was a simple install of CentOS 7's arm build for Raspberry Pi.
# I am using a Raspberry Pi B+ and a Kingston 8GB microSD card.
# Download with curl
curl http://mirror.centos.org/altarch/7/isos/armhfp/CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img.xz > CentOS-rpi3-1611.img.xz
# Download with wget (not on Mac by default)
#wget http://mirror.centos.org/altarch/7/isos/armhfp/CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img.xz
#mv CentOS-Userland-7-armv7hl-Minimal-1611-RaspberryPi3.img.xz CentOS-rpi3-1611-img.xz
# RTFM
#man xz
# Unpack compressed img
xz --decompress --keep CentOS-rpi3-1611.img.xz
# Read mounted disks
#diskutil list
# Unmount the microSD card (based on the identifier revealed from previous command)
# Replace $disk with the correct disk of micro-usb
diskutil unmount $disk
# Write the OS to disk
sudo dd if=$PWD/CentOS-rpi3-1611.img of=/dev/$disk bs=4m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment