1.5-rc-3
This commit is contained in:
+15
-12
@@ -1,31 +1,34 @@
|
|||||||
# Commands
|
# Commands
|
||||||
copy image
|
copy image
|
||||||
```bash
|
```bash
|
||||||
byobu
|
|
||||||
|
|
||||||
imgname=`date +"%Y-%m-%d-%H%M-%S"`-grandfatherclock-pi4.img
|
imgname=`date +"%Y-%m-%d-%H%M-%S"`-grandfatherclock-pi4.img
|
||||||
xzname=$imgname.xz
|
xzname=$imgname.xz
|
||||||
dadisk=/dev/sdb
|
sizes=sizes-$imgname-$xzame.txt
|
||||||
|
checksums=sha256sum-$imgname-$xzname.sha256
|
||||||
|
|
||||||
|
lsblk
|
||||||
|
echo "Enter disk name (including /dev/) ex /dev/sdb"
|
||||||
|
read dadisk
|
||||||
|
|
||||||
webhook "starting copy $dadisk to $imgname to $xzname"
|
webhook "starting copy $dadisk to $imgname to $xzname"
|
||||||
sudo dd if=$dadisk of=$imgname bs=4M status=progress
|
sudo dd if=$dadisk of=$imgname bs=4M status=progress
|
||||||
|
imgsize=$(du -h $imgname)
|
||||||
webhook "Copied the disk to $imgname, compressing to $xzname"
|
webhook "Copied the disk to $imgname ($imgsize), compressing to $xzname"
|
||||||
sudo pishrink.sh -v -Z -a $imgname
|
sudo pishrink.sh -v -Z -a $imgname
|
||||||
|
xzsize=$(du -h $xzname)
|
||||||
|
|
||||||
webhook "$imgname shrunk to $xzname, calculating sha256 checksums..." true
|
webhook "$imgname ($imgsize) shrunk to $xzname ($xzsize), calculating sha256 checksums..." true
|
||||||
sha256sum $imgname | tee sha256sum-$imgname.txt
|
sha256sum $imgname | tee $checksums
|
||||||
sha256sum $imgname | tee -a sha256sum-$xzname.txt
|
sha256sum $xzname | tee -a $checksums
|
||||||
|
|
||||||
webhook "getting sizes"
|
webhook "getting sizes"
|
||||||
du -h $imgname | tee sizes-$imgname-$xzame.txt
|
echo -e "imgsize: $imgsize\nxzsize: $xzsize" | tee $sizes
|
||||||
du -h $xzname | tee -a sizes-$imgname-$xzame.txt
|
|
||||||
|
|
||||||
# sudo rm -f $imgname
|
webhook "DONE\n\tdisk: $dadisk\n\timgname: $imgname\n\txzname: $xzname\n\tsizes: $(cat $sizes)" true
|
||||||
webhook "DONE\n\tdisk: $dadisk\n\timgname: $imgname\n\txzname: $xzname\n\tsizes: $(cat sizes-$imgname-$xzame.txt)" true
|
|
||||||
# sudo shutdown -r +1
|
# sudo shutdown -r +1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
watch file
|
watch file
|
||||||
```bash
|
```bash
|
||||||
watch -n $((60 * 5)) "ls -lAh | rg grand | awk '{print \$5,\"/ 238.3G\", \"\\t\", \$9}'"
|
watch -n $((60 * 5)) "ls -lAh | rg grand | awk '{print \$5,\"/ 238.3G\", \"\\t\", \$9}'"
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ short_delay=1
|
|||||||
first_install="git"
|
first_install="git"
|
||||||
|
|
||||||
# packages
|
# packages
|
||||||
packages="7zip btop build-essential byobu chrony e2fsprogs gawk gh grafana gpsd gpsd-clients gzip htop i2c-tools influxdb iptraf-ng pigz util-linux util-linux-extra lynx net-tools nginx nmap parted picocom pps-tools python3 python3-pip python3-virtualenv python3-setuptools python3-pandas python3-smbus restic ripgrep screen syslog-ng telegraf thefuck unzip udev wget xz-utils zip"
|
packages="btop build-essential byobu chrony e2fsprogs gawk gh grafana gpsd gpsd-clients htop i2c-tools influxdb iptraf-ng pigz util-linux util-linux-extra lynx net-tools nginx picocom pps-tools python3 python3-pip python3-virtualenv python3-setuptools python3-pandas python3-smbus restic ripgrep screen syslog-ng telegraf thefuck udev wget"
|
||||||
|
|
||||||
# purge packages
|
# purge packages
|
||||||
purge_packages='"apt purge -y "bluetooth*" "wireless*" "fonts*" "bluez*" "alsa*"'
|
purge_packages='"apt purge -y "bluetooth*" "wireless*" "fonts*" "bluez*" "alsa*"'
|
||||||
|
|||||||
Reference in New Issue
Block a user