- Ubuntu 18.04 LTS
- exfat-fuse / exfat-utils 1.2.8-1 (The latest version that will install after running sudo apt-get update.)
Linux is writing files to a Windows exFat partition on a Windows OS disk which are INVISIBLE to Windows. How do I make these files visible to Windows? (Update - further below, Linux subsequently deleted the files, 400GB of them, and as as you will see, Windows apparently didn't do it.)
I used Photorec, from Linux, to recover files to this exFat partition.
The exFat partition is 62% full, but Windows reports it as being empty, with all the space free (!!!).
I rebooted into Linux (external SSD w/Linux,), and mounted the exFat partition again to make sure the files were actually there. (That's a 700GB partition, and there is nowhere else that could come close to holding that data). Linux sees the files on that exFat partition.
I ran chmod 777 FOLDER/ -R
, and then checked in Windows again. Windows still reports that the partition is empty (!!!).
The TestDisk documentation on Photorec says that Windows may need to take ownership of the files to access them, but the link they give says how to change the permissions of the recup_dir.1 (.2 ...) directories from WITHIN Windows - where they are not viewable (and 100% of the space is available !!!). That document is here: https://www.cgsecurity.org/wiki/PhotoRec_FAQ
How do I make these files viewable in Windows?
Thanks for any help.
UPDATE
I tried the suggestion in the TestDisk documentation, even though I can't see any folders from Windows. (The doc assumes recup_dir.1 will be viewable from Windows.) I tried to take ownership of the partion in Windows, rather than a directory.
[Administrator command prompt]
C:\WINDOWS\system32>takeown /f e: /r /d y
ERROR: File ownership cannot be applied on insecure file systems;
there is no support for ACLs.
C:\WINDOWS\system32>
So this isn't the problem, as it isn't relevant to exFat.
I dare not write anything to this partition from Windows, or do anyting else with it from Windows, as Windows believes it is empty. Photorec ran for 5 hours creating those restored files.
UPDATE
I ran another test. I copied a text file, created by a regular user account (not root or PhotoRec), to the exfat partition. Windows still doesn't see any files there.
UPDATE
Here are some images which show the problem. It also shows what happened after I ran chkdsk, without repairs being performed.
sda is the internal (Windows) disk.
sdb is an external SSD w/Linux.
Now, lets reboot and see what Windows shows.
WINDOWS REPORTS THAT THE PARTITION IS EMPTY !!!
Now, run chkdsk, without selecting to repair the partition.
Now, select repair. (Because I'm about to give up anyway, and rerun PhotoRec with this partition formatted as NTSF)
Windows says the partition is locked. Now I'm going back to Linux.
THE FILES ARE GONE. 400GB of them.
I had gone back and forth between Windows and Linux a few times, trying to sort out this problem, and Linux was still able to see the files.
exfatfsck reports there are no errors, and the partition is empty - except for perhaps 1 file. I ran exfatfsck on a new exfat partition I created as a test, and it reports the empty partition has 3 directories and 2 files. So there might be one file there, but it isn't showing in the directory listing.
I ran testdisk on the partition. It reports
Bad GPT partition, invalid signature.
Trying alternate GPT
Bad GPT partition, invalid signature.
I ran scan (testdisk), and let is run a bit (it would take hours). It found some files that are non-exfat (I guess left-overs, from before I cut out that partition for this. I did a quick format.). I could have let the full scan run, but I didn't bother. I can run PhotoRec again.
The Work-around
I researched this for a couple of hours. I found two posts that describe very, very similar problems, and lots of posts saying that exfat is dangerous, and linux has much better support for NTFS. Also, it is very easy for an exfat partition to get damaged, as opposed to NTFS.
So, I am remaking this partition as NTFS, and running PhotoRec again.
I believe this is very important lesson about NOT using exfat. Fortunately, in my case it just wasted a lot of my time.
The Question
Does anybody know how to get a shared exFAT partion working, or what happened here? Maybe it's an Ubuntu 18.04 LTS issue. It would be nice to be able to use exFAT for this, because with NTFS I have to turn off fast-boot, and avoid hibernating Windows. (Maybe there's a work-around for that... That's a different question.)
exfatfsck
says that there are 2 or 3 files, but you can’t see them. Have you done anls
ofSystem Volume Information
? There are probably files in there. (2) You say “The files are gone. 400 GB of them.” I presume you noticed thatexfatfsck
says that there are still 406 GB used, right? (I don’t understand why you say that Linux deleted the files.) … (Cont’d)