Tuesday, September 6, 2016

dual boot - Overwrote files on NTFS partition as blank -- how to prevent in the future?

My computer dual-boots Ubuntu from ext4 and Win7 from NTFS partitions on the same physical drive. TL;DR: How can I keep mounting my NTFS to avoid read/write conflicts?




I opened the Arduino IDE, and opened a recent file (which I forgot was stored on the NTFS). It showed me a blank editing window. Briefly confused, I opened the other recent project... also blank. Then I realized what was going on, and mounted the NTFS drive... only to find the files still opened as empty. Browsing to the location, both files now exist but are 0 bytes in size.



I see what I did, and assume this is as much an Arduino software issue/bug as any Ubuntu issue. I see no reason why the file data isn't still there ,just with the header rewritten, so I'm starting to learn to use testdisk and maybe foremost to rebuild those files.



My big question is: are there ways to mount a partition (mount flags?) to avoid programs opening files before they are mounted? I do not dual boot when Windows is in hibernate, so there should be no Windows-related conflicts.



The arduino files aren't a big deal, but I could see this really messing me up with, say, my shared Thunderbird mail archive.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...