diff --git a/hardReset.sh b/hardReset.sh new file mode 100644 index 0000000..160a934 --- /dev/null +++ b/hardReset.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Unmount server partition +umount -lf /server +# Format server partition (UBOOT 6) +yes | mkfs.ext4 /dev/mmcblk0p6 +# Create tmpfs on OPT to not change opt folder files +mount -t tmpfs tmpfs /opt +cd / +# Mount and untar firmware to server folder +mount /dev/mmcblk0p6 /server +tar -xvf /mnt/overlay.tar --no-same-owner -C / +# Umount opt to get original opt. Rewrite version to old. For normally work online updating +umount /opt +mount -o remount,rw / +echo "1.0.20" >> /opt/FWVersion +mount -o remount,ro / +# Save all changes and reboot printer +sync +reboot