Last active
November 11, 2017 21:31
-
-
Save agalazis/ffcc0dfce54b51af3548808453459822 to your computer and use it in GitHub Desktop.
Script that installs fedora arm on rpi
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
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