30

I have a laptop with dual-boot Windows 10 and Linux Mint 19 Tara installed to the internal M.2 SSD. Apart from all the OS-specific partitions, I have a 4 GB FAT32 partition on that SSD that I intended to use for copying files between OSes.

The problem is, that after changing anything minor on that partition (create a small text file/any folder, edit one, etc...) in Linux and afterwards booting Windows, Windows doesn't see any changes to the partition. So when accessing it, the "invisible" data gets corrupted and lost (permanently, to both OSes). This usually doesn't happen when I copy a large file to it, then all changes are visible in Windows as well. Also Windows always shows the partition as empty, despite files created in Windows being present.

I'm assuming either Linux is not committing changes to disk, Windows is caching the partition or the FAT-Table somewhere or the drive does some weird caching.

The question: How do make Windows agree with changes made in/by Linux to that partition?

For clarification: by "invisible" I mean according to Windows actually not there. And the opposite direction works perfectly fine, changes made by Windows get picked up by Linux no problem.

Skipper
  • 103
Poohl
  • 403
  • 4
  • 5

3 Answers3

46

It may be that, when you boot Linux, you have left Windows in a sleep/hibernate state rather than shut it down.  (Windows 10 is notoriously resistant to being shut down properly.)  Windows may be keeping part of the filesystem cached in memory (i.e., the page file) and does not expect some other operating system to have modified the disk.

Try to figure out how to really shut down Windows.

3

Recent windows versions do include startup optimizations that involve caching disk data somewhere different than that same disk, which causes the behavior that you found when the disk is accessed by a different OS.

You can use the Group Policy Turn Off Boot And Resume Optimizations (located in Computer Configuration\Administrative Templates\System\Disk NV Cache) which should make Windows only store the files that on their partition. There are also some other Nonvolatile Caching settings available, but that one should fix your issue.

Ángel
  • 1,393
0

To complement the previous answers and add some extra information:

The problem also happens on Windows 11*, and it's not limited to FAT32 partitions or even to the partitions being on the same Drive. Apparently Windows does this to all the internal drives it can access (I tested it with FAT32 and exFAT partitions on both the same SSD as Windows itself and different internal drives).

For Windows 11, disabling Fast Startup seems to have solved it. (Files I created in linux were visible in Win11 and weren't overwritten when I created new ones there)

Other caching options seem to only apply to external drives and don't really solve the problem for internal drives (an SSD and an HDD in my case), but if that's the case, the other answers to this question cover that.

The answers for this question might be applicable for Windows 10, too (the interface is slightly different, but it's literally the same setting).

* Funnily enough, with Fast Startup on, Windows 11 didn't seem to notice even drastic changes, such as reformatting the whole drive and changing its partition table. I didn't dare test what it'd do if it tried to write to the drive in that state.

Mel O.
  • 1