29

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.

  • 2
    Possible duplicate of Shutdown Windows 10 truly for a dual booting system – Run5k May 16 at 13:28
  • Just for information you can also use ExFat as a cross operating system file system with less restriction than FAT32 (also compatible with MacOs) – JFL May 16 at 18:57
  • note that Linux can read/write NTFS and exFAT without problem. Why use FAT32 which is prone to errors? – phuclv May 17 at 1:47
  • 1
    @Run5k The solution is the same, but the question you suggest is essentially "Where can i change this OS-Setting?" whereas my question is "What needs to be done, to fix a thing?". Whoever asked your suggested question already knew what caused the issue, anyone who doesn't will never find your suggested answer. – Poohl May 20 at 12:50
  • I understand what you're saying, but ultimately the root cause of the problem is essentially the same. Potentially, the Super User community could post a question with a dozen different scenarios that are only somewhat similar, but the root cause behind the problem is the most important aspect to emphasize. – Run5k May 20 at 14:49
43

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.

  • 7
    Thanks, that seems to be it. For anyone in The Future: reboot or shift+klick on the shutdown button really shuts windows down. Alternatively you can disable this behaviour in the Controlpanel->...->Define power buttons->untick Fastboot. – Poohl May 16 at 7:49
  • 10
    Windows 10 is notoriously resistant to being shut down properly... That's a bit misleading. The issue is not an improper shutdown, but that Windows by design performs a hybrid shutdown. The fact this has consequences in a dual boot scenario doesn't merit describing the feature as "improper." – Twisty Impersonator May 16 at 9:18
  • 61
    @TwistyImpersonator: I think most users of other OSes would agree that when the menu entry marked "shutdown" does not in fact simply shut down, but rather suspends to disk, that's easily confusing and could be considered misleading. Especially if you're used to Linux where "shutdown" does have a specific technical meaning that doesn't include sleep/suspend, but you're right that user expectation based on other OSes is arguably not Window's fault / problem. Anyway, this answer isn't saying it's "improper", just that Windows doesn't clearly distinguish different kinds of shutdown for the user. – Peter Cordes May 16 at 9:55
  • 6
    @Nzall - what is your point? Obviously defaulting to a hybrid shutdown that can resume quickly is a good design decision (now that Windows is generally robust enough not to need frequent reboots because of memory leaks or whatever), and so is reducing cognitive load for typical users. That doesn't mean it's not confusing for cases where the distinction does matter. Perhaps labeling the option "power off" without calling it "shutdown" would help (talking about physical power state, not OS software state), but probably not really because people will still assume it means shutdown. – Peter Cordes May 16 at 12:07
  • 30
    And the winner of this year's contest of counter-intuitive UI behaviour is once more ... Microsoft! – rexkogitans May 16 at 14:53
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.