summaryrefslogtreecommitdiff
path: root/nfs/scripts/image_capture_I5456.sh
blob: 9895eddfbc722a8c8e9eee85c6fffd50eb049a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 ">>> Capturing /dev/sda boot sectors"
dd if=/dev/sda count=2048 2>logs/sda-dd.log | pigz --fast > sda-dd.gz 2>logs/sda-pigz.log

echo_color white blue ">>> Capturing /dev/sda1 NTFS BOOT"
partclone.ntfs --clone -s /dev/sda1 -L logs/sda1-partclone.log --no_check | pigz --fast >sda1-partclone.gz 2>logs/sda1-pigz.log

echo_color white blue ">>> Capturing /dev/sda2 NTFS WINDOWS"
partclone.ntfs --clone -s /dev/sda2 -L logs/sda2-partclone.log --no_check | pigz --fast >sda2-partclone.gz 2>logs/sda2-pigz.log

echo_color white blue ">>> Capturing /dev/sda3 EXT4 LINUX"
partclone.ext4 --clone -s /dev/sda3 -L logs/sda3-partclone.log --no_check | pigz --fast >sda3-partclone.gz 2>logs/sda3-pigz.log