Popcar's Blog

How to Set Up Linux Gaming on an NTFS Drive

Table of Contents

Introduction

โš  Warning Despite my positive experience and doing this same setup for my friends without issues, many people have warned that this still isn't 100% reliable. There is a chance things could go wrong and the drive could stop working or get corrupted. Follow this guide at your own risk, or use a Linux filesystem if you desperately need something impossible to break in the future.

You may also allegedly face games that don't start or crash unexpectedly. I won't keep beating you over the head with it, just understand that you should use a Linux filesystem if you don't want to deal with issues down the road. Do this at your own risk.

Feel free to skip to the tutorial if you don't care for intros.

Whenever somebody mentions wanting to play games off an NTFS drive in any sort of Linux community, you will get people regularly telling you to never attempt this; that it's dangerous or unusable and you should just move them to a Linux-compatible filesystem and forget about making this work.

Luckily, this isn't totally true. You can reliably store and play your games on an NTFS drive, and I regularly move between Windows and Linux on my laptop to play the same games off of the same NTFS drive. There is a small chance that you may face problems, but I've been doing this for almost a year now with zero issues, and now store all of my games on my Windows drives. All it takes is a fair bit of setup, and everything should be working well.

Over the past year, I've played many games on my NTFS drive. This includes indies such as Hades 2, Hollow Knight Silksong (Windows ver.), Risk of Rain 2, REPO, and so on.

I've also played heavier AAA games such as Silent Hill f, Elden Ring, Marvel Rivals, Alan Wake 2, and Path of Exile. All of these ran on NTFS with no issues.

๐Ÿ›ˆ Note It's worth noting that Valve has an unofficial guide for gaming on NTFS. However, it lacks important details and has some bad practices - why doesn't the fstab entry include nofail?! This could stop you from booting if you misconfigure or move your drive!

As an aside, some people will recommend that you move your games to a btrfs drive and use that to also play your games on Windows. I tried this last year and wouldn't recommend it, the Windows driver for btrfs was buggy and randomly disconnected my drive when dealing with large files. It also apparently causes issues with anti-cheat. Stick with NTFS if you're dual-booting.


Why people recommend against NTFS

So, what's the issue with NTFS drives anyway? Why can't they just work on Linux like everything else?

First off, NTFS was created by Microsoft specifically for Windows, which means it doesn't follow any Linux conventions and generally has more limitations than modern filesystems, like breaking if you use specific characters as file names. It's also proprietary which means it lacks proper documentation and support, and had to be reverse-engineered to be usable on Linux. This is why there's a risk that things could go wrong, because the Linux driver could do something incompatible with the Windows driver and vice versa, causing the drive to be ruined.

There are 3 main issues we need to fix when it comes to gaming on an NTFS drive:

Let's get into it.


Disabling Hibernation on Windows

If you're not dual-booting Windows, skip to the next section.

Windows often tricks you into thinking you've shut down when it's actually hibernating, causing issues when trying to mount NTFS drives on Linux.

To fix this, open Powershell as admin and run this command: powercfg /H off

Then, restart and boot back into Windows to make sure the changes take effect. The only downside to disabling hibernation is that Windows will take a bit longer to boot, but if it's on an SSD then you probably won't care anyway.

Aside from disabling hibernation, you still need to exercise some caution to properly shut down Windows:

  1. Don't force-shutdown your computer when you're on Windows by holding down the power button, this might cause the NTFS drive to stay locked. If you ever do that, boot back into Windows and shut it down properly.
  2. When Windows is updating, it usually expects the computer to boot back into Windows to finish the update process, even when you tell it to update and shut down. Don't start updating then boot into Linux, keep booting back into Windows until it finishes the update process, then shut it down properly to safely go back to Linux.

Preparing to Mount the NTFS Drive

Rather than using the built-in NTFS driver that comes with most Linux distributions, we're going to use ntfs-3g. The reason is that in my experience, the ntfs3 driver was unstable to use. Within a week of using it, it somehow broke my drive and I had to boot back into Windows to fix it with a command. ntfs-3g in comparison is rock solid and battle tested.

First, make sure that you have ntfs-3g installed. Most distros include it by default, but just to be safe, open up a terminal and run this command depending on your distro:

Ubuntu/Debian

sudo apt install ntfs-3g

Fedora

sudo dnf install ntfs-3g

Arch

sudo pacman -S ntfs-3g

Now we'll get your user ID and group ID. Write down the numbers it outputs.

Get your User ID

id -u

Get your Group ID

id -g

Now, we need to find the UUID of our NTFS drive. Write this command:

lsblk -f

This will list every single drive in your computer. We're looking for an ntfs drive that matches the size of our drive. Here's an example output:

>lsblk -f
NAME        FSTYPE FSVER LABEL         UUID              FSAVAIL FSUSE% MOUNTPOINTS
nvme1n1                                                                                    
|-nvme1n1p1 vfat   FAT32 SYSTEM_DRV    CA1B-B3BD                       
|-nvme1n1p2                                                            
|-nvme1n1p3 ntfs                       14641C5F641C4640    34.5G    93% /media/windows_main
`-nvme1n1p4 ntfs         WINRE_DRV     70F81D10F81CD666

I know that my NTFS drive is 500GB in size. There are two ntfs drives in my example, but if we look closely we can see that one has 34.5GB available, and is 93% full. That's definitely my drive.

We can be totally sure by doing some math: 34.5 รท (1 - 0.93) = 492.8, which is roughly 500GB in size.

Copy the UUID, which in my case is 14641C5F641C4640. If you have multiple ntfs drives you want to use, then copy/paste all these UUIDs somewhere.


Finally, let's make a folder to mount the drive onto. All of the drive's contents will exist in this folder. I'll make mine in /media/windows_main, but you can call the folder whatever you'd like.

sudo mkdir /media/windows_main

Make a separate folder for each drive you want to mount.

Mounting the NTFS Drive

You should now have your User ID, Group ID, your drive's UUID, and a folder to mount to.

Now we'll edit our fstab, which is a file that tells Linux to mount our drives on boot.

sudo nano /etc/fstab

There should already be some entries for your system drives. Ignore these and create a new line at the bottom, then paste this line, replacing anything in square brackets with your drive's info.

UUID=[YOUR UUID] [YOUR MOUNT FOLDER] lowntfs-3g uid=[YOUR USER ID],gid=[YOUR GROUP ID],nofail,windows_names,rw,user,exec,umask=000 0 0

In my case, the finished line is...

UUID=14641C5F641C4640 /media/windows_main lowntfs-3g uid=1000,gid=1000,nofail,windows_names,rw,user,exec,umask=000 0 0

Once added, press CTRL + X to exit, then Y and ENTER to save the file. Reboot your computer and if all goes well, your drive should be mounted successfully to that folder. If not, double-check that you wrote everything correctly in your fstab.

๐Ÿ›ˆ Note You may notice we're using lowntfs-3g instead of the regular ntfs-3g. This turns off case-sensitivity, which may fix some issues with files and folders not being found.

Don't run your games yet! We still have to do one final step...


Preventing Illegal Files on Steam

The other big issue is that the files created by Proton contain characters that are not supported by NTFS. To fix this, we can create a symlink from Steam on our NTFS drive to Steam on our Linux system. A symlink is basically a shortcut, so any Proton files created by Steam will be stored on our Linux drive instead.

โš  Warning This is a very important step that many people get wrong, so make sure your file paths are correct when making a symlink, and double-check that they're pointing to the right spot!

Find the steamapps folder on Linux. This should be /home/[username]/.steam/steam/steamapps/ by default, but if you're using the Flatpak version of Steam, it'll be somewhere else. If there isn't already a folder called compatdata here, create it.

Now, navigate to wherever you have the steamapps folder on your NTFS drive. In my case it's in /media/windows_main/Program Files (x86)/Steam/steamapps/. If there's a folder called compatdata here, delete it.

Next, open up your terminal and write this command to create a symlink. The first path points to the compatdata folder on your Linux drive. The second path points to your steamapps folder on your NTFS drive.

ln -s ~/.steam/steam/steamapps/compatdata /media/windows_main/Program\ Files\ \(x86\)/Steam/steamapps/

Now, whenever you try opening compatdata in your NTFS drive, it'll open the folder on your Linux drive. If you're using KDE, you can tell it's a symlink with a chain symbol on it and a small info box telling you where it's going. Repeat this process if you have a steam library on another NTFS drive as well.

picture of KDE's file system showing the symlink

โš  Warning You should never store any Proton prefixes on an NTFS drive. Apps like Heroic, Lutris, and Bottles always create those prefixes on your Linux drive, so you should be fine as long as you don't accidentally move them to your Windows drives.

And that's it! You should now have your NTFS drives all set up and ready to game. From now, you can safely import your Steam library and run any games without issues (within margin of error).

All this setup can be a pain, but the good news is once you've spent ~15 minutes doing everything in the guide, you shouldn't have to mess with your drives ever again.


TL;DR

  1. Disable hibernation on Windows if you're dual-booting. Don't force shutdown Windows else it'll lock the NTFS drive until you go back and shut it down properly.
  2. Mount your NTFS drive using on with this fstab entry:
UUID=[YOUR UUID] [YOUR MOUNT FOLDER] lowntfs-3g uid=[YOUR USER ID],gid=[YOUR GROUP ID],nofail,windows_names,rw,user,exec,umask=000 0 0
  1. Symlink your Steam compatdata folder to prevent proton prefixes from staying on an NTFS drive:
ln -s ~/.steam/steam/steamapps/compatdata [YOUR STEAMAPPS FOLDER ON NTFS]
  1. Don't store any Proton prefixes on an NTFS drive.

This post took some effort, if you found it useful and want to see more please consider donating.

#guide #tech