summaryrefslogtreecommitdiff
path: root/nfs/scripts/image_deploy_I4920.sh
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-10-27 17:00:11 +0200
committerLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-10-27 17:00:11 +0200
commit6f39be0aae716a86b410556630ac48ed4da4c6f5 (patch)
treeffc58082a84e332ce0aa3ee2c6299a4b221eed4d /nfs/scripts/image_deploy_I4920.sh
parent211e646859ee028a0a66b67c96057a2f1a6a82ba (diff)
downloadeficast-6f39be0aae716a86b410556630ac48ed4da4c6f5.tar.gz
eficast-6f39be0aae716a86b410556630ac48ed4da4c6f5.tar.bz2
eficast-6f39be0aae716a86b410556630ac48ed4da4c6f5.zip
capture and deploy script updates (not finished yet)
Diffstat (limited to 'nfs/scripts/image_deploy_I4920.sh')
-rw-r--r--nfs/scripts/image_deploy_I4920.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/nfs/scripts/image_deploy_I4920.sh b/nfs/scripts/image_deploy_I4920.sh
new file mode 100644
index 0000000..1cd3220
--- /dev/null
+++ b/nfs/scripts/image_deploy_I4920.sh
@@ -0,0 +1,19 @@
+#!/bin/busybox sh
+# Should only started from image_capture.sh, it defines some helper functions and variables)
+# echo_color() <text-color> <background-color> [prefix text] <message>
+# $outdir is the also the current working dir, garanted to be empty and writable
+# Many cloning/partitioning tools are available for use, see make-boot-image.sh
+
+echo_color white blue ">>> " "Restoring /dev/sda boot sectors"
+pigz -dc "$indir/sda-dd.gz" | dd of=/dev/sda count=2048
+
+echo_color white blue ">>> " "Detecting new partitions"
+echo -e "w\nq\n" | fdisk /dev/sda
+
+echo_color white blue ">>> " "Restoring /dev/sda1 NTFS BOOT"
+pigz -dc "$indir/sda1-partclone.gz" | partclone.restore -o /dev/sda1
+
+echo_color white blue ">>> " "Restoring /dev/sda2 NTFS WINDOWS"
+pigz -dc "$indir/sda2-partclone.gz" | partclone.restore -o /dev/sda2
+
+