Skip to content

Instantly share code, notes, and snippets.

@agalazis
Last active November 11, 2017 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agalazis/ffcc0dfce54b51af3548808453459822 to your computer and use it in GitHub Desktop.
Save agalazis/ffcc0dfce54b51af3548808453459822 to your computer and use it in GitHub Desktop.
Script that installs fedora arm on rpi
MEDIA=$1
if [ -z "$MEDIA" ]; then
echo "Please enter media name:"
read MEDIA
fi
[ -z "$MEDIA" ] && printf "[error]: %s\n" "Media optiion is required" >&2 && exit 1 ;
IMAGE="Fedora-Server-armhfp-26-1.5-sda.raw.xz"
TEMP_DIR=$(mktemp -d)
TEMP_IMAGE_FILE_PATH="$TEMP_DIR/$IMAGE"
curl https://download.fedoraproject.org/pub/fedora/linux/releases/26/Server/armhfp/images/$IMAGE -L -o "$TEMP_IMAGE_FILE_PATH"
sudo fedora-arm-image-installer --image="$TEMP_IMAGE_FILE_PATH" --addkey ~/.ssh/id_rsa.pub --media="$MEDIA" --target="rpi3" --resizefs --norootpass
rm -rf "$TEMP_DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment