workan on image dump tools and xrdp a desktop over windows
This commit is contained in:
@@ -16,20 +16,25 @@
|
||||
set -e # fail explicitly on any error
|
||||
|
||||
# todo: interactive, cli options
|
||||
disk=/dev/sda
|
||||
outname="test_disk_image_post0_$(date +%Y-%m-%d-%H%M-%Z)"
|
||||
# disk=/dev/sda
|
||||
user=princesspi
|
||||
# outname="test_disk_image_post0_$(date +%Y-%m-%d-%H%M-%Z)"
|
||||
outname="$outname.img.xz"
|
||||
zerofile="/home/$user/0.0"
|
||||
|
||||
echo "zeroing out empty space"
|
||||
sudo if=/dev/zero of="$zerofile" bs=4M status=progress || sudo rf -f "$zerofile"
|
||||
|
||||
# do the disk image dump using inline xz
|
||||
echo "runnin inline xz on $disk to file $outname"
|
||||
sudo dd if=$disk status=progress bs=1M | xz -c > "$outname"
|
||||
# echo "runnin inline xz on $disk to file $outname"
|
||||
# sudo dd if=$disk status=progress bs=4M | xz -c > "$outname"
|
||||
|
||||
# test xz integrity
|
||||
echo "testing disk image integrity"
|
||||
xz -t -v "$outname"
|
||||
# echo "testing disk image integrity"
|
||||
# xz -t -v "$outname"
|
||||
|
||||
# make the sha256 file
|
||||
echo "generating sha256 checksum file"
|
||||
sha256sum "$outname" | tee "$outname.sha256"
|
||||
# echo "generating sha256 checksum file"
|
||||
# sha256sum "$outname" | tee "$outname.sha256"
|
||||
|
||||
echo "all donesies :3"
|
||||
|
||||
Reference in New Issue
Block a user