-->

How do I configure an existing NTFS drive or use Btrfs with transparent compression for a Linux Steam library

Switch to Btrfs by default - Desktop - Ubuntu Community Hub

Option 1: Configuring an Existing NTFS Drive

Using an NTFS drive to share game files between Windows and Linux is convenient, but Windows filesystems lack POSIX permissions and case sensitivity. Proton uses Wine compatibility prefixes that generate files with characters invalid on NTFS (such as : or ?).

To make NTFS work reliably with Linux Steam games, follow these three steps:

Step 1: Disable Fast Startup in Windows

Boot into Windows, open Control Panel -> Power Options, click "Choose what the power buttons do", and uncheck "Turn on fast startup."

Why? If Fast Startup is enabled, Windows hibernation locks the drive metadata. Linux will detect the drive as "dirty" and forcibly mount it in read-only mode.

Step 2: Configure /etc/fstab for NTFS

Identify your User ID (id -u, usually 1000), Group ID (id -g, usually 1000), and the drive UUID (sudo blkid).

Open /etc/fstab with root privileges:

Bash

sudo nano /etc/fstab

Add one of the following lines to the bottom (replace YOUR-UUID-HERE with your partition UUID):

  • For modern Linux kernels (Kernel 5.15+ using the built-in ntfs3 driver):

    Plaintext

    UUID=YOUR-UUID-HERE /mnt/ntfsgames ntfs3 uid=1000,gid=1000,rw,user,exec,windows_names,nofail 0 0
    
  • For older distros (using FUSE lowntfs-3g):

    Plaintext

    UUID=YOUR-UUID-HERE /mnt/ntfsgames lowntfs-3g uid=1000,gid=1000,rw,user,exec,windows_names,umask=000,nofail 0 0
    
  • windows_names: Prevents Linux or Proton from creating filenames containing invalid Windows characters.

  • uid=1000,gid=1000: Grants your regular user account read, write, and execute rights over the entire drive.

Mount the drive:

Bash

sudo mkdir -p /mnt/ntfsgames
sudo mount -a
Step 3: Symlink compatdata to your Native Linux Drive (Critical)

Proton creates a Wine prefix folder inside steamapps/compatdata for every game. Storing compatdata directly on an NTFS partition causes launch crashes.

  1. Go to your Steam folder on the NTFS drive (e.g., /mnt/ntfsgames/SteamLibrary/steamapps/).

  2. Delete the existing compatdata folder on the NTFS drive if one exists.

  3. Create a symbolic link pointing compatdata to your main Linux drive:

Bash

ln -s ~/.steam/steam/steamapps/compatdata /mnt/ntfsgames/SteamLibrary/steamapps/compatdata
Option 2: Using Btrfs with Transparent Compression (zstd)

Btrfs is a native Linux filesystem that supports transparent compression. Game files (textures, audio banks, uncompressed assets) compress very well with zstd, often reducing a 100 GB library install down to 70–80 GB with virtually no CPU overhead on modern processors.

Step 1: Format the Partition to Btrfs

(Warning: This erases all existing data on the target partition)

Bash

sudo mkfs.btrfs -f -L "SteamBtrfs" /dev/sdb1
Step 2: Configure /etc/fstab with Compression Flags

Find your Btrfs partition UUID:

Bash

sudo blkid /dev/sdb1

Open /etc/fstab:

Bash

sudo nano /etc/fstab

Add the following entry:

Plaintext

UUID=YOUR-UUID-HERE /mnt/steamgames btrfs defaults,noatime,compress=zstd:1,nofail 0 0

Key flags explained:

  • compress=zstd:1: Enforces level-1 Zstandard compression. Level 1 provides almost the same compression ratio as default level 3, but with significantly higher decompression speeds ideal for fast game loading.

  • noatime: Disables writing a new timestamp to disk every time a game file is accessed, reducing unnecessary write cycles.

Step 3: Mount and Fix Permissions

Create the mount directory, mount the drive, and take ownership of the filesystem:

Bash

sudo mkdir -p /mnt/steamgames
sudo mount -a
sudo chown -R $USER:$USER /mnt/steamgames

Once mounted, open Steam -> Settings -> Storage -> Add Drive, select /mnt/steamgames, and set it as a library location. Steam will write files directly to the Btrfs filesystem while the kernel handles compression transparently in the background.

Share on Google Plus

About Giampaolo Rossi.

Fond of computer and video games. Stay informed of the latest news on games for Linux and Android. The future of gaming is in Linux. All you need to know about How to play Windows games on Linux.
    Blogger Comment
    Facebook Comment

0 commenti:

Post a Comment

Random Posts