September 14, 2025

How to create a shared partition for Windows & Linux

I recently moved from Windows 10 to dual booting Debian 13 and Windows 11. I wanted to share a partition between them, so I can access my data on both sides. These are things like Obsidian notes, KeePass databases, and music.

The most important decision is the file system. There are a few options:

  • NTFS is natively supported by Windows, and works on Linux with the ntfs-3g driver.
  • BTRFS is well supported by Linux, and there is a community run driver for Windows.
  • FAT32 is used by flash drives and is well supported by both, but has a file size limit of 4GB.
  • exFAT does not have this limitation, and is also widely supported.

Both NTFS and exFAT seemed like fine choices. I decided to stick with Windows-native NTFS. It keeps my data partition identical on the Windows side. And Linux was able to support it well with some configuration.

On Windows, the only step is to disable fast startup. This ensures that Windows frees up the partition on shutdown, so that it can be used by Linux.

On Linux, lsblk lists all available partitions.

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0   1.8T  0 disk 
├─nvme0n1p1 259:1    0   100M  0 part /boot/efi
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0 465.1G  0 part 
├─nvme0n1p4 259:4    0   642M  0 part 
├─nvme0n1p5 259:5    0 931.5G  0 part
├─nvme0n1p6 259:6    0  18.6G  0 part [SWAP]
└─nvme0n1p7 259:7    0   447G  0 part /

We can get some hints from the partition size. To check the contents of a partition, we can temporarily mount it:

sudo mount -t ntfs-3g /dev/nvme0n1p5 /mnt/data

Here, nvme0n1p5 is the partition to be mounted, and /mnt/data is the mount point.

To permanently mount a drive, we create an entry in the file system table /etc/fstab. Edit it with sudo to add this line:

/dev/nvme0n1p5 /mnt/data ntfs-3g fmask=111,umask=002,uid=1000,gid=1000 0 0

Since NTFS does not support Linux file permissions, everything in the drive is given the permission 777. The ls command will color these files with a blue-over-green font.

The options fmask=111,umask=002,uid=1000,gid=1000 mask the permissions to be identical to that of the home directory of my user (uid and gid can be retrived from the id command).

Reboot, and test that things are working the way you expect.

Syncthing

I want to sync some folders in this partition with my phone. Here’s how both OSes can use the same Syncthing database and configuration:

  1. cd into a folder inside the shared partition (or just its root). This will be the starting directory for Syncthing.
  2. Run syncthing serve --home=HOME_PATH, where HOME_PATH is a folder where Syncthing’s data will be stored. This path should also be inside the shared partition.
  3. Inside Syncthing’s Web UI, when adding folders for syncthing, always specify them with relative file paths with respect to the starting directory.