| .. | |||
| Readme.md | 1 month ago | ||
Complete guide to reverting from Xubuntu back to the original Windows installation.
| Item | Location | Purpose |
|---|---|---|
t101ha.img.zst | PC: E:\git\02 cSharp using mono\main\EARS-LINUX\OS\BACKUP\USB: BACKUP partition | Full byte-exact disk image, 17GB compressed |
parts.txt | Same locations | Partition table reference |
window-key.txt | Same locations | Windows product key |
Verified: SHA256 CBD4348ACB6777D5110D00F15FD67A6CBABE96152B628E503A8F2F6127E4EB63 (both copies identical)
Image expands to: 62,537,072,640 bytes — exact match to device size
/dev/mmcblk1 — ~58GiB (62,537,072,640 bytes)fw_platform_size)p3), recovery (p4)WARNING: Verify the device with
lsblkevery time. Device names can shift between boots.
Restores the exact original system: Windows activated, ASUS recovery partition, everything.
If the image lives on the PC, copy it back to the USB stick's BACKUP partition first. Restoring over a network is not recommended.
1. Boot the Ventoy live session
Power off fully. Hold F2, tap power, keep holding. Confirm Secure Boot is disabled, boot from USB, select the Xubuntu ISO, choose "Try Xubuntu".
2. Identify the devices
lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT
Confirm:
mmcblk1)3. Mount the backup
sudo mkdir -p /mnt/backup sudo mount /dev/sda3 /mnt/backup ls -lh /mnt/backup
Adjust sda3 to match the BACKUP partition from step 2.
4. Verify the image before writing
zstd -t /mnt/backup/t101ha.img.zst
Must complete without error. If it fails, use the PC copy instead — do not proceed with a corrupt image.
5. Restore
sudo blockdev --getsize64 /dev/mmcblk1
Confirm this prints 62537072640. Then:
zstd -dc /mnt/backup/t101ha.img.zst | sudo dd of=/dev/mmcblk1 bs=4M status=progress sync
WARNING:
of=is the destructive direction. Everything on that device is erased. Read the command twice before pressing Enter.
Takes 1–2 hours. Do not interrupt it, and do not run anything else — 2GB RAM.
6. Finish
sync sudo umount /mnt/backup sudo poweroff
Remove the USB stick. Power on. Windows should boot, activated, exactly as it was.
sudo apt install -y pv sudo sh -c 'zstd -dc /mnt/backup/t101ha.img.zst | pv -s 62537072640 | dd of=/dev/mmcblk1 bs=4M'
To extract files from the Windows image without wiping Xubuntu. Requires ~58GB free space.
zstd -d /path/to/t101ha.img.zst -o /tmp/full.img sudo losetup -fP --show /tmp/full.img
Note the loop device it prints (e.g. /dev/loop0), then:
sudo mkdir -p /mnt/win sudo mount -o ro /dev/loop0p3 /mnt/win
Windows lives on partition 3. Browse /mnt/win, copy what you need.
Cleanup:
sudo umount /mnt/win sudo losetup -d /dev/loop0 rm /tmp/full.img
If mount fails withttps://account.microsoft.com/devices/recoverykey
Last resort. The product key is stored in firmware (ACPI MSDM table), so a clean install self-activates without entering anything.
Caveats:
From Linux, on the running tablet:
sudo strings /sys/firmware/acpi/tables/MSDM | tail -1
From the saved file:
cat /mnt/backup/window-key.txt; echo
From Windows:
(Get-CimInstance SoftwareLicensingService).OA3xOriginalProductKey
Note: viewing window-key.txt in Notepad may show CJK garbage — it's an encoding guess, not corruption. Read it on Linux with cat, or open it in VS Code and set encoding to UTF-8.
Quick check (structural):
zstd -t t101ha.img.zst
Full check (byte count vs device):
DEV=$(sudo blockdev --getsize64 /dev/mmcblk1) IMG=$(zstd -dc /path/to/t101ha.img.zst | wc -c) echo "device: $DEV" echo "image: $IMG" test "$DEV" = "$IMG" && echo MATCH || echo MISMATCH
Compare copies (PowerShell):
Get-FileHash 'path\to\t101ha.img.zst' -Algorithm SHA256
WARNING:
[ "$DEV" = "$IMG" ]requires spaces inside the brackets. Without them the shell reports "command not found" and prints MISMATCH regardless of the actual values. Usetestto avoid this.
Restore finishes but won't boot
Check Secure Boot in BIOS — re-enable it, since the original Windows install expects it. Confirm the boot order lists Windows Boot Manager.
dd reports "No space left on device"
Wrong target device. Verify with lsblk that you're writing to the ~58GiB eMMC.
Image fails zstd -t
Use the other copy. If both fail, fall back to Method 3.
Progress appears frozen
Check it's actually stalled before interrupting:
ps -eo pid,stat,cmd | grep -v grep | grep -E 'dd|zstd' sudo dmesg | tail -30
STAT D plus mmc errors in dmesg indicates bad sectors. STAT R/S with a clean dmesg means it's just slow — eMMC on this tablet throttles when warm.
"read kernel buffer failed"
dmesg needs root here: sudo dmesg
zstd -t on whichever copy you plan to use before wiping anything.sudo zstd -1 -T0 -f -o /mnt/backup/t101ha.img.zst /dev/mmcblk1