Last active
March 30, 2016 14:02
-
-
Save peel/be19e1165a9856e2ce1f to your computer and use it in GitHub Desktop.
Making an ArchLinux ARM SD card with OSX with Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Step 0: Run the container | |
# Downloads an image from docker hub and runs it with access to hardware in privileged mode | |
docker run --rm --privileged -v $(pwd):/backup peelsky/arm-sdcard-builder -e download copy | |
# Step 1: Find disk identifier | |
# This is extremely important to get it right as the process will destroy | |
# the contents of a given disk | |
# The disk identifier has a form of 'diskX', ie for the following output: | |
# /dev/disk2s1 233Gi 220Gi 12Gi 95% 57795408 3185810 95% / | |
# The disk identifier is disk2 (disk2s1 is a partition on disk2) | |
df -h | |
read -p "Enter disk identifier ie. disk2:" DISK_ID | |
# Step 2: Flash SD card(s) | |
# Copy image to SD card | |
sudo dd bs=1m if=sdcard.img of=/dev/$(DISK_ID) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment