Read/write and minor driver problems

Hi there,

I’m a very new Fedora user with little experience in Linux. I’ve used all my spare time in the last three days trying to troubleshoot the following:

  1. I’m unable to read from or write to my games SSD. On Steam, I tried to change the install destination from /home on my boot SSD to my games SSD. I was unable to do this.

I received two different errors, one of which was ‘New Steam library folder must be on a filesystem mounted with execute permissions’. The other error I seem to have fixed, and I don’t remember what it was since I didn’t take screenshots.

From what I can tell in terminal, I have all the read/write/execute permissions necessary for Steam to use this drive.

My boot SSD and two large storage HDDs have no troubles with r/w.

I’ve tried chmod, chown, mounting, unmounting, formatting, re-formatting in ext4, using different partitioning tools and many other methods from an extensive variety of forums, websites and tutorial videos. Nothing changes.

I’ve corrupted my boot drive doing this once already. I wouldn’t want to do that again.

  1. Slight problems with NVIDIA drivers. My refresh rate keeps resetting and I’m unable to save settings profiles in the NVIDIA graphics control panel (perhaps due to read/write restrictions again?). I uninstalled the drivers and CUDA drivers, and now they’re failing to reinstall. I used this guide to install the drivers:

Any help is greatly appreciated.

First for the graphics.
I recommend you remove all nvidia drivers you have installed then install the nvidia drivers from rpmfusion since those are explicitly tweaked for the fedora system and automatically keep the driver in sync with kernel updates and driver updates. I use steam and have never installed nvidia drivers from anywhere other than rpmfusion.

You can enable the rpmfusion repos as shown here then install all the nvidia drivers with

sudo dnf install nvidia* akmod-nvidia xorg-x11-drv-nvidia*

Doing this also installs the cuda drivers so nothing else would be needed.

For the other issue with access to the steam library.
One thing you absolutely must verify is that every directory in the path from root (/) all the way down to and including the directory being accessed requires at least 755 (rwxr-xr-x) permissions. Any single directory in that path that lacks the r-x permissions for the steam engine to access it will cause the noted failure.

To write to that directory your user must also have write permissions within that directory.

Lets assume for this discussion that the SSD is designated as /dev/sdc and the partition is /dev/sdc1 which has been formated as ext4. Also that you are mounting it at /home/user/steam to place the library on it.
It then would be mounted with an entry in /etc/fstab so it is mounted automatically each time you boot.

/dev/sdc1 /home/user/steam  ext4  defaults  0 1

Once mounted then a simple command sudo chown -R user:user /home/user/steam would make the file system accessible to your user and nothing else should be needed except, possibly, verify with ls -ld /home that your home directory has permissions 755 as noted above so the steam engine can access it.

I had to locate and solve a similar issue with media on my plex media server.

Hello,

The driver fix worked right away :smiley: !

However, I’m still having issues with Steam. When I try ‘/dev/sdc1 /home/(my user)/steam ext4 defaults 0 1’ I get ‘permission denied’, and when I try the same with ‘sudo’ I get ‘command not found’.

Additionally, terminal claims that there the directory ‘/home/(my user)/steam’ does not exist. How do I find where Steam actually is?

Dearest apologies for my pure ‘noobness’, and many thanks for the assistance so far.

Try to type in terminal whereis steam it should show you where the binary, the config and the manual files are.

@ilikelinux :+1: thanks!

1 Like

Adding to the issue - despite the drivers successfully installing, the GreenWithEnvy overclocking program doesn’t recognise the card… :frowning:

Note that I suggested something similar be added as a line in /etc/fstab and did not even hint that was to be a literal command line.

I see. I’ll have to do some research regarding what ‘fstab’ is, and how to add to it.

This is always good. You might start here: Welcome to Ask Fedora! Please read me first!
Thats what @computersavvy asked for (Please read Helping your helpers)

That he not has to assume:

Everything you have doubts in Linux, you can read/ask the man(ual) in the terminal, the first lines give you an overview of the command/file etc. you need info.

Let’s start, type the following man commands in the terminal one by one and read at least the header/description, that you have an idea what you are doing.

# Every line is a separate manual entry.
# You can copy/paste the whole block of commands and jump to the next entry
# by pressing the " q " key. 
man cat
man fstab
man sudo
man fdisk
man cp
man ls
man nano
  1. Now we do have a couple of commands do solve the problem (type or copy/paste into terminal)

    cat /etc/fstab
    Please show us the output as preformatet text

  2. To see the information of your hard-disk you like to read/write (if external, verify that it is plugged in and switched on)

    sudo fdisk -l
    Please show us the output as preformatet text

  3. Try to find out your HD’s info where @computersavvy was assuming (please refer to the fdisk -l command output):
    (would like to see your guess!)

  1. Backup your fstab:
    sudo cp /etc/fstab /etc/fstab_backup
    ls -l /etc/fstab* #verify if you have both files original/backup

  2. Before editing your /etc/fstab we would like to get a feedback from you.
    nano testfile # to play around if nano is new for you.
    sudo nano /etc/fstab

I took this in consideration …

Please next time make for every question a new request.

So:

I looked at the man cat, man fstab etc. I get most of it.

I ran some of the commands. I’ve ran some of them before to try and fix this problem. When I got to @computersavvy 's command again ( /dev/sdc1 /home/user/steam ext4 defaults 0 1 #example for /etc/fstab ), I got confused. What am I meant to put in place of #example?

Other than that I feel that this issue will soon be fixed.

Many thanks to both of you again :smiley:

1 Like

This is just a comment, a information for you. I added this, that you can see this was an example. Just let it away …

Please follow the suggestions of @ilikelinux and post the output of your commands as requested, in preformatted text, so we can see the pertinent details of your

  1. system
    and
  2. errors you see

Once we have accurate and detailed information of where you are having problems then it may be possible for us to give detailed guidance of exactly what commands to use and what the expected results should be.

1 Like

Here’s the output, ‘no fluff’ (except some redacted info for privacy/security, mostly names that will not affect anything. Let me know if I’ve put in any potentially sensitive data by accident):

1.

[(user)@fedora ~]$ cat /etc/fstab

/etc/fstab

Created by anaconda on Mon Sep 27 11:41:52 2021

Accessible filesystems, by reference, are maintained under ‘/dev/disk/’.

See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.

After editing this file, run ‘systemctl daemon-reload’ to update systemd

units generated from this file.

UUID=8f35096d-cf48-4248-b85b-6c991ef9a7e9 / btrfs subvol=root,compress=zstd:1 0 0
UUID=ff92c002-0238-46e5-abff-eb5cc46b5308 /boot ext4 defaults 1 2
UUID=572C-8B28 /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=8f35096d-cf48-4248-b85b-6c991ef9a7e9 /home btrfs subvol=home,compress=zstd:1 0 0
/dev/disk/by-uuid/5bb25426-5215-4594-a913-7cafdc7a5215 /mnt/5bb25426-5215-4594-a913-7cafdc7a5215 auto nosuid,nodev,nofail,x-gvfs-show 0 0
LABEL=Games\040&\040Programs /mnt/Games\040&\040Programs auto nosuid,nodev,nofail,x-gvfs-show 0 0

2.

[(user)@fedora ~]$ sudo fdisk -l
[sudo] password for (user):
Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: (SSD)
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B5592110-9F57-47B3-AD98-30E22DE0D364

Device Start End Sectors Size Type
/dev/sda1 2048 1230847 1228800 600M EFI System
/dev/sda2 1230848 3327999 2097152 1G Linux filesystem
/dev/sda3 3328000 488396799 485068800 231.3G Linux filesystem

Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: (SSD)
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x818fed00

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 976773119 976771072 465.8G 83 Linux

Disk /dev/sdc: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: (HDD)
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 83460E7F-9B60-41C3-9B5A-D59C2E45F563

Device Start End Sectors Size Type
/dev/sdc1 34 262177 262144 128M Microsoft reserved
/dev/sdc2 264192 1953523711 1953259520 931.4G Microsoft basic data

Partition 1 does not start on physical sector boundary.

Disk /dev/sdd: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: AB780EDC-3080-4659-A628-1611EA9AD807

Device Start End Sectors Size Type
/dev/sdd1 534528 536575 2048 1M Microsoft LDM metadata
/dev/sdd2 536576 567295 30720 15M Microsoft reserved
/dev/sdd3 567296 1953525134 1952957839 931.2G Microsoft LDM data

Disk /dev/zram0: 8 GiB, 8589934592 bytes, 2097152 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

3.

THIS IS THE INFO OF THE SSD WITH THE ISSUE FROM sudo fdisk -l :

Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: (SSD)
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x818fed00

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 976773119 976771072 465.8G 83 Linux

4.

sudo cp /etc/fstab /etc/fstab_backup

ls -l /etc/fstab*
-rw-r–r–. 1 root root 962 Sep 27 16:10 /etc/fstab
-rw-r–r–. 1 root root 962 Oct 2 11:35 /etc/fstab_backup

5.

sudo nano /etc/fstab

/etc/fstab

Created by anaconda on Mon Sep 27 11:39:59 2021

Accessible filesystems, by reference, are maintained under ‘/dev/disk/’. sudo fdisk -l

See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.

After editing this file, run ‘systemctl daemon-reload’ to update systemd

units generated from this file.

UUID=8f35096d-cf48-4248-b85b-6c991ef9a7e9 / btrfs subvo>
UUID=ff92c002-0238-46e5-abff-eb5cc46b5308 /boot ext4 defau>
UUID=572C-8B28 /boot/efi vfat umask=0077,shortname=wi>
UUID=8f35096d-cf48-4248-b85b-6c991ef9a7e9 /home btrfs subvo>
/dev/disk/by-uuid/5bb25426-5215-4594-a913-7cafdc7a5215 /mnt/5bb25426-5215-4594->
LABEL=Games\040&\040Programs /mnt/Games\040&\040Programs auto nosuid,nodev,nofa>

Please note the difference between the display of the same text above and below. The below is enclosed in code tags from the tool bar above the box where you enter the text of your post and makes reading the post much easier since it is displayed as seen on your screen.

UUID=8f35096d-cf48-4248-b85b-6c991ef9a7e9 / btrfs subvol=root,compress=zstd:1 0 0
UUID=ff92c002-0238-46e5-abff-eb5cc46b5308 /boot ext4 defaults 1 2
UUID=572C-8B28 /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=8f35096d-cf48-4248-b85b-6c991ef9a7e9 /home btrfs subvol=home,compress=zstd:1 0 0
/dev/disk/by-uuid/5bb25426-5215-4594-a913-7cafdc7a5215 /mnt/5bb25426-5215-4594-a913-7cafdc7a5215 auto nosuid,nodev,nofail,x-gvfs-show 0 0
LABEL=Games\040&\040Programs /mnt/Games\040&\040Programs auto nosuid,nodev,nofail,x-gvfs-show 0 0

These fstab entries may be part of the issue with how you can access the data.

In general, most things mounted under /mnt are initially owned and accessible only to the root user. They may not be readable and certainly are not writeable by a normal user without making other changes.

I would suggest you do an eval as to which is actually the device /dev/sdb1 (which you said is your games) then choose to mount it differently.

Using the command "ls -l /dev/disk/by-uuid/" will give an output similar to this

$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx. 1 root root 10 Sep 28 20:38 106df360-4bb3-4cd7-aa1e-f7a070b7bead -> ../../sda4

Note that both the UUID and the device it links to are shown.

What I have done before I wrote these instructions for you was to analyze how my steam install works and where files were created. and where they are located, so the guide should be correct.

1.  First, you need to identify which UUID applies to /dev/sdb1 as said above.
2.  Next you need to know if the entire device is intended as use for steam and all its associated data.
If the answers to #2 above is yes then what follows is step by step how to relocate the existing steam data to the device /dev/sdb1 and mount that for all future use as the steam library.  If no then there are differences in what you do.
3.  Verify the device is not mounted then format the device as ext4
sudo umount /dev/sdb1
sudo mkfs.ext4 /dev/sdb1
4.  Copy all the existing data from the steam install to the device /dev/sdb1.
a. Mount the device  by using
sudo mount /dev/sdb1 /mnt
b. Copy all the data over with
sudo rsync -av /home/<username>/.local/share/Steam/  /mnt/
c. (OPTIONAL: -- if desired to free up space) delete everything in you just copied over.
rm -r /home/<username>/.local/share/Steam/*
d. unmount the device
sudo umount /mnt
5.  Verify the proper UUID for /dev/sdb1 as described above.
6.  Create an entry in /etc/fstab to mount the device by UUID.  The line should read something like
UUID=<uuid found in step 5>  /home/<username>/.local/share/Steam  ext4  user,nosuid,nodev,nofail,x-gvfs-show 0 0
Once this entry is created the user can expect the device to automatically be mounted on boot (if attached), and if not can be mounted by the user with the command "mount -a"
7.  Finally, After doing all the above  the last step is to check that permissions are correct at the mount point so the user is able to read/write to the device.
If the command "ls -ld ~/.local/share/Steam" returns something like
drwx------. 26 user user 4096 Oct  2 12:58 .local/share/Steam/
then you should be done.
1 Like
  1. sudo blkid UUID of the drive=“bb831e11-05c8-47bc-a12f-dd7782d8b420”
  2. No, it will be used for other programs also.

Ok, since it will be used for other things as well I will give you a procedure to allow having it mounted elsewhere but still be able to use it for your steam library.
Will do that tomorrow.

Righto, thanks :slightly_smiling_face:

Here goes.
This procedure will enable you to mount the file system on a different drive and enable use of it as the steam library while sharing it with other programs.

You have said the partition is /dev/sdb1, and from what you have previously posted it seems it may already have been mounted with the line

LABEL=Games\040&\040Programs /mnt/Games\040&\040Programs auto nosuid,nodev,nofail,x-gvfs-show 0 0

in /etc/fstab. If that is correct then there is no issue and it can be used as such. If that is not correct then you need to use the following commands to find out where it is actually mounted.

mount

and look for /dev/sdb1. If you do not see it then do

ls -l /dev/disk/by-uuid

and look for the line that displays sdb1 at the very end. That line will give you the uuid needed to identify the device in /etc/fstab and always ensure it is mounted the same location.

Note that the line above from fstab can be better understood by changing it to

LABEL="Games & Programs" /mnt/"Games+Programs" auto nosuid,nodev,nofail,x-gvfs-show 0 0

Note also that using spaces in file and directory names in linux causes problems with many programs and utilities (including cd) and would be easier to use in the long run if the mount point were changed to /mnt/Games+Programs so there were no spaces involved.

You can use it as you wish but I will for the rest of this discussion use the mount point as /mnt/Games+Programs so no spaces are involved in the paths given.

First, the file system to be used must be mounted. I will use the mount point I suggest above to continue.
Second you need a directory that is initially empty to use for the steam data, and it has to be created with proper ownership
I will suggest that you create it as follows.

sudo mkdir /mnt/Games+Programs/Steam
sudo chown <youruser>:<yourgroup> /mnt/Games+Programs/Steam 
sudo chmod 700 /mnt/Games+Programs/Steam

The username and group used in the chown command above should be that seen when you do an

ls -ld ~/.local/share/Steam

Those commands will create the directory and set ownership and permissons properly.
The next step is to copy the content of the existing steam install to the new location, retaining all the ownership and attributes, including SELinux context.

rsync -aAXv ~/.local/share/Steam/ /mnt/Games+Programs/Steam/

Once this is done, you will need to delete the ~/.local/share/Steam/ direcory content if you wish to save space. If space is not of concern it may be left but the existing data will not be accessible as long as you are using the other drive for steam data and will be out of date as soon as you install a single additional game from steam (possibly as soon as you play another game).

To delete the data a simple “rm -r ~/.local/share/Steam/*” will do that for you.
Now to mount the new steam library over the existing mount point.

sudo mount -t bind /mnt/Games+Programs/Steam /home/<username>/.local/share/Steam 

If this successfully completes then it is time to make a new entry in /etc/fstab to mount it this way each time you boot.

sudo nano /etc/fstab
then add a line 
/mnt/Games+Programs/Steam /home/<username>/.local/share/Steam bind defaults 1 1
at the end of the existing fstab entries.

This should complete relocating the steam library and you should have full access at this point.

Note that all my comments are using my suggested mount point for that drive, and I strongly suggest that you create a directory /mnt/Games+Programs then edit the existing fstab entry as I suggested above so the mount point does not contain spaces in the name. It is OK for the LABEL to contain the spaces since that is only used for the mount, but file utilities such as cd, rm, ls, etc. require special handling when there are spaces in file and directory names. A lot of programs, including simple bash scripts may barf with spaces in names.

2 Likes
sudo mkdir /mnt/Games+Programs/Steam

mkdir: cannot create directory ‘/mnt/Games+Programs/Steam’: No such file or directory

I’m assuming that’s because ‘Steam’ is in (User)@fedora ~]$ whereis steam
steam: /usr/bin/steam /usr/lib/steam /usr/share/man/man6/steam.6.gz

But what does it mean no such file or directory? Isn’t the goal to create a directory that does not yet exist? I’m very confused.

I’ve just copy pasted every single command you’ve put in to terminal in descending order with no editing. I don’t want to end up with a corrupted drive again.

With the command you try to make a directory named Steam where is in /mnt/Games+Programs/ .

As /Games+Programs not exists yet in /mnt, the system tells you No such file or directory

At least now i would check the manual for mkdir and see if there is an parameter to make (p)arent directories, have a look below:

Remember man mkdir

DESCRIPTION
       Create the DIRECTORY(ies), if they do not already exist.

       Mandatory arguments to long options are mandatory for short options too.

       -m, --mode=MODE
              set file mode (as in chmod), not a=rwx - umask

       -p, --parents
              no error if existing, make parent directories as needed

       -v, --verbose
              print a message for each created directory

       -Z     set SELinux security context of each created directory to the default type

       --context[=CTX]
              like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX

       --help display this help and exit

       --version
              output version information and exit