From 0a8c065542a221d71af30a2a60a3978a141dded6 Mon Sep 17 00:00:00 2001 From: Ilia Korshunov Date: Sun, 15 Jun 2025 01:54:12 +0300 Subject: [PATCH] Add hardReset file --- hardReset.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hardReset.sh 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