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.
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, likec:
,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 themount
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 thedosdevices
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/
) 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 thewindows_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
.
Is this a dual-boot setup? NTFS on Linux is kind of ass. I’d recommend getting another drive and formatting it as btrfs or ext4. I would not use the same drive for Windows and Linux.
Yes, it is a transitional dual boot setup. Will be trying to pass to exFAT as suggested elsewhere for working on both. Then when I will figure out what hardware would be most compatible, I will eventually remove the dual boot and fix things accordingly.
This might be due to windows hibernation behavior. When you shut down windows 10 and 11, it actually hibernates the drive instead of a full shutdown. You can disable it by turning off “fast startup” option(s). I haven’t had to do it in a while so I can’t recall exactly where the option lives. Hibernated drives get marked to prevent writing to them as it may corrupt the windows install.
Oh, yeah,
$ man mount.ntfs
mentions that:Windows hibernation and fast restarting On computers which can be dual-booted into Windows or Linux, Windows has to be fully shut down before booting into Linux, otherwise the NTFS file systems on internal disks may be left in an inconsistent state and changes made by Linux may be ignored by Windows. So, Windows may not be left in hibernation when starting Linux, in order to avoid inconsistencies. Moreover, the fast restart feature available on recent Windows systems has to be disabled. This can be achieved by issuing as an Administrator the Windows command which disables both hi‐ bernation and fast restarting : powercfg /h off If either Windows is hibernated or its fast restart is en‐ abled, partitions on internal disks are forced to be mounted in read-only mode.
And then:
remove_hiberfile When the NTFS volume is hibernated, a read-write mount is denied and a read-only mount is forced. One needs either to resume Windows and shutdown it prop‐ erly, or use this option which will remove the Win‐ dows hibernation file. Please note, this means that the saved Windows session will be completely lost. Use this option under your own responsibility.
Good catch. If you’re right about this being the cause, then my suggestion above about mounting read-write will probably just result in another read-only mount (though I bet that mount.ntfs will print something about a read-only mount being forced in the console).
Good odds that OP just needs to fully shut down Windows, rather than suspending it.
What’s with that disaster of colorized text?
Lemmy’s Web UI does something wonky and nonstandard with Markdown backtick-surrounded monospaced text. I assume that it’s some attempt to pretty-print code or something that nobody wants. Doing the four-space indent gets monospaced text and avoids it, but then you can’t do it inline with proportional text.
I just ignore the colorization. Hopefully someday they’ll just get rid of it.
I am going to specify in the body of the post that this is a drive I used as library drive only for Steam, it is not the one holding the Windows boot.
Would that change things?
To me that means I would feel comfortable using the remove_hiberfile and recover options listed here https://linux.die.net/man/8/mount.ntfs-3g
Put these in your fstab and it’ll get fixed every mount
I haven’t run into this myself, but from the mount.ntfs man page snippet I listed below, it doesn’t sound like it; it references “partitions”, so I don’t think that it’s just the system partition in Windows that’s affected.
Like many others here, I think the most likely explanation here is that you did not fully shut down Windows and it still holds a lock on this partition. You can force an actual shutdown in Windows by shift-clicking on the start button -> shutdown.
However, I would also recommend against sharing your Steam library between Linux and Windows. I also tried this with NTFS a few years ago and it caused me a lot of headaches. I had a lot of weird issues under Linux that went away after I finally switched to ext4.
Seconded, only pain do you find. I even tried with an exfat drive on the side, but that had it’s own pile of headaches. Don’t try to. Perfectly fine dual booting, but just pick and choose on Linux until you’re reading to fully switch.
NTFS support on Linux has never been good, iirc it still mounts NTFS as read-only by default. You can remount it as R/W, but it isn’t exactly recommended
If you absolutely want to share the steam library between windows and Linux, id recommend either a second disk formatted as exFAT or a new storage partition on the same disk formatted as exFAT
The key here is exFAT, one of the best options for cross-OS compatibility
Edit: @biofaust@lemmy.world I just saw your reply to someone else in the thread that your steam library is on a separate drive already
So that’s perfect! Just move everything off it temporarily and format it with exFAT filesystem and you should be fine
It looks like the ntfs-3g FUSE driver does have write support for NTFS (and just confirmed it when responding to @Drathro@dormi.zone below) NTFS is also, like most Linux filesystems, a journaling filesystem, which means that power loss on a mounted filesystem isn’t going to corrupt the filesystem, whereas FAT is not.
It does look like there has been major improvements since the last time I tried this kind of shenanigans. Which admittedly has been many years, these days I just don’t bother with dual booting so I’m free to just use the native FS wherever needed for the OS I’m using OR I have an intermediary like a SAN or it’s on a VM or something
Still though, using a non-native FS in this manner is always more headaches than it’s worth, the no journaling is a corruption risk true, but so is using a non-native FS just in different ways lol
IMO, the use case for this drive is storing re-downloadable data is perfectly fine for exFAT, worst case it corrupts and you have to redownload games from steam
Thanks, I’ll try the formatting thing asap.
Does it save me from the risk of filenames including colons etc that others were talking about?
Yea the filename issue should be fine, there’s a risk of corruption with exFAT though as @tal@lemmy.today mentioned, but if you’re just storing steam games or other easily replaceable data, I wouldn’t worry about it to much IMO
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”.
Bad disk.