TORch RPi Cloud Init Configurator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

15 lines
332 B

#!/bin/bash
[ $# -eq 0 ] && { echo "Usage: $0 IMG_FILE"; exit 1; }
SECTOR_BYTES=512
SECTOR_START=2048
OFFSET=$(($SECTOR_BYTES*$SECTOR_START))
./build.sh
mkdir -p boot-part
sudo mount -o rw,loop,offset=$OFFSET $1 ./boot-part
tar -xzvf build/rpi-cloud-init.tgz -C boot-part
sudo umount ./boot-part
rmdir ./boot-part
rm -rf ./build