3 ms·
Wouldn't the easier path be to rewrite the filesystem table to undo the deletions? You'd need to be very careful to only write necessary tools into memory, but
by cipherboy 7y ago
Wouldn't the easier path be to rewrite the filesystem table to undo the deletions? You'd need to be very careful to only write necessary tools into memory, but since deleting files typically only changes the filesystem table and doesn't remove the contents of the sectors, you might be able to get enough of a working system to reinstall what is left. I'd reach for photorec since I'm lazy, but you'd need to bootstrap it with glibc and a few other dependencies. Not sure how you'd mount the ramdisk though... just hexdump, less, and dd would be minimally sufficient, though much, much harder.
- s-macke 7y agoFor this emulator the filesystem is a RAM filesystem and fully managed in Javascript (virtio/9p filesystem as a device). No chance to recover.