NixOS: FS and Nix Store Recovery on Critical Failures

The system fails to boot, dropping into emergency mode, or throws this error during operation: Structure needs cleaning This indicates critical metadata corruption (superblock, inode table, or journal). The kernel forcibly mounts the root (/) as Read-Only to protect the data. ⚠️ Limitations of In-System Recovery Attempting to fix the root FS from within the running system is a dead end: mount -o remount,ro / returns target is busy because background processes hold files open. Mass-killing processes (killall5, fuser) often causes session hangs or respawns. Using umount -l / (lazy unmount) detaches the root, but instantly makes all binaries unavailable (sudo, e2fsck, mount), as they reside in /nix/store, which is now unmounted. 💡 Conclusion: Fixing the root FS from within itself is impossible. The only reliable path is external intervention. ...

27 Aug 2026 · 3 min · 531 words · Potato Energy Team, ponfertato

OrangePI: Data Recovery & Migration

OrangePI and other ARM single-board computers often use eMMC or SD cards with limited write endurance. Over time, storage fills up, degrades, or fails. This guide describes a method for data recovery and migration to external storage (USB SSD/HDD) via a chroot environment. 💡 Method is universal: works for OrangePI, Raspberry Pi, NanoPi, and other ARM systems. 📦 Preparation Requirements Component Requirements USB drive SSD/HDD, capacity ≥ eMMC data Live image Any Linux with ARM support (optional) Access root or sudo, physical access to board Network Ethernet or WiFi (for remote access) Check connected storage # Show all MMC devices (eMMC, SD card) ls /dev/mmc* # Show all block devices lsblk # Show partitions and mount points df -h Expected output: ...

16 Mar 2026 · 4 min · 812 words · Potato Energy Team, ponfertato