Can dope an .img file directly

This commit is contained in:
bj
2020-10-12 00:58:19 +02:00
parent 14aa70dd77
commit d615f0b0aa
3 changed files with 28 additions and 1 deletions
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
SECTOR_BYTES=512
SECTOR_START=2048
OFFSET=$(($SECTOR_BYTES*$SECTOR_START))
./build.sh
mkdir -p boot-part
mount -o rw,loop,offset=$OFFSET $1 ./boot-part
tar -xzvf build/rpi-cloud-init.tgz -C boot-part
umount ./boot-part
rmdir ./boot-part