Skip Navigation

Disk write error due to read-only filesystem

Disclaimer: I am very new to Linux (1 week).

I have installed the Valve version of Steam on LMDE6. I have used Disks to automatically mount the NTFS drive I used with Windows (doesn't hold bootloader, it is just for Steam library storage) at boot ( /media/[username]/Gaming ) and I made it the default library folder in Steam.

Running games works perfectly (actually, performance is surprisingly good), but I cannot install them due to a "disk write error".

I looked for solutions and found this page, from which I understand that I need to change permissions to the mounting point, but when I do, using chown -R, I get a "Read-only filesystem" error for all files and folders.

I can see no options to fix this in Disks and I tried to edit fstab once, but it messed things up so badly I had to use the USB drive with the portable installer to fix things.

21 comments
  • I looked for solutions and found this page, from which I understand that I need to change permissions to the mounting point, but when I do, using chown -R, I get a “Read-only filesystem” error for all files and folders.

    When you run $ mount, you probably see something like this:

     
            ntfs on /media/<username>/Gaming type ntfs (ro,<...>)
    
    
      

    If so, that entire filesystem is mounted read-only (hence the "ro" flag). chown (and what you probably wanted, chmod) isn't going to affect that. It alters ownership and permissions on files and directories within a filesystem.

    I have no idea what Disks is, but I assume that it's some kind of graphical utility.

    I'd probably try doing this, which will only affect the current mount; it won't persistent to the next boot:

     
            # mount -o remount,rw /media/<username>/Gaming
    
    
      

    That'll try and remount the thing read-write.

    If that resolves the issue, then the issue is going to indeed be that it's mounted read-only.

    I suspect that there's probably an option in this Disks thing to mount it read-write. I have never seen the thing, so I can't give any advice there.

    If you want to stick it in /etc/fstab and mount it at boot, if you let me see the line you get back from mount above, maybe censoring the username, I can probably tell you what to put there.

    EDIT: It looks like the preferred NTFS driver is the FUSE ntfs-3g, not the kernel ntfs or ntfs3. According to the linked page, Debian apparently doesn't build their kernels by default with the ntfs kernel driver anyway, so I assume that Linux Mint Debian Edition probably also does the same. So it'll probably read something like "fuse.ntfs-3g", not "ntfs".

  • Valve recommend against using NTFS for the Steam library on Linux. I don't know the specifics as to what could go wrong..

    • If GabeN is against it, I better comply fast! Thanks for the heads up!

      • TL;DR: Don't use NTFS on Linux, especially for games. Not because the Linux driver is bad, but because Windows itself introduces compatibility issues, and the workaround breaks Wine.


        It's not just Valve. Wine itself doesn't work right if the wineprefix is located on an NTFS filesystem because not even Windows is fully compliant with the NTFS specs.

        The reason: colons. The device file names in WINEPREFIX/dosdevices are named in the Windows style, like c:, d:, etc. This is not an issue with ext filesystems, but presents a conflict when NTFS and Windows become involved. The : character is not specified by NTFS as a reserved character, but it is reserved by Windows to separate the drive letter in paths. You can create a file containing a colon in its name on an NTFS filesystem without problem, but doing so will make the drive unmountable in Windows. I know because I've done it.

        To overcome this, NTFS filesystems in Linux can be mounted using the windows_names option (specified in /etc/fstab or the mount command). This will raise an error if you try to create a filename that contains a Windows-reserved character. As a result, Wine can't create the dosdevices files because their names contain colons.

        The reason Valve specifically recommends against this is because the Steam library contains both the game content files (SteamLibrary/steamapps/common) and the wineprefixes (SteamLibrary/steamapps/compatdata), meaning that creating the library on an NTFS filesystem will necessarily create the wineprefixes on the same filesystem. Again, you could just mount it without the windows_names option, but that would immediately make it unmountable in Windows, and you'd be better off reformatting it as ext4 or btrfs.


        (edit) I should probably explain what a wineprefix is.

        Wine (and Valve's fork Proton) is a compatibility suite that presents a Windows-like runtime environment to Windows programs and translates their calls to their Linux equivalents. One part of that is the wineprefix. It's a directory that contains device files needed by Windows (drives and COM interfaces), the registry files, and a miniature C: drive containing reimplemented essential Windows software (cmd, explorer, Internet Explorer, etc) and an isolated userdir. When you launch a Windows app, it will see this directory as the C: drive, it will install dependencies (e.g. the Visual C++ Runtime) here, and the game's save files will also be located there.

        Steam creates individual wineprefixes for every game inside the SteamLibrary/steamapps/compatdata directory, identified by the game's Steam ID. For example, the wineprefix of Baldur's Gate 3 on my computer is located at /games/SteamLibrary/steamapps/compatdata/1086940.

21 comments