From 3f0dd7cddf3717b9f106b5fd0956a6bfc2ef16a8 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Wed, 13 May 2026 04:30:53 -0600 Subject: [PATCH] sumshit --- customscripts/dump_compressed_img_file.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 customscripts/dump_compressed_img_file.sh diff --git a/customscripts/dump_compressed_img_file.sh b/customscripts/dump_compressed_img_file.sh new file mode 100644 index 0000000..18e1436 --- /dev/null +++ b/customscripts/dump_compressed_img_file.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -e # fail explicitly on any error + +# todo: interactive, cli options +disk=/dev/sda +outname="disk_image_$(date +%Y-%m-%d-%H%M-%Z)" +outname="$outname.img.xz" + +# 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" + +# test xz integrity +echo "testing disk image integrity" +xz -t -v "$outname" + +# make the sha256 file +echo "generating sha256 checksum file" +sha256sum "$outname" | tee "$outname.sha256" + +echo "all donesies :3"