I am trying to mount a drive on boot so i can keep games on it, but when i use something like gnome disks, it always mounts as root, so i am unable to use it without remounting it. Any help?
You should add a line to your
Here is the procedure:
Is it a ntfs/fat32/exfat partition? If so, you need to specify the user/group as mount options.
its a exfat partition
So you will have to add something like this to your
UUID=... /path/to/mountpoint auto defaults,uid=1000,gid=1000,umask=022 0 0
Spaces are important. Fields are delimited by one or more spaces, and no field may contain a space within it.
You can discover the UUID of your drive by running
It will be something like
/path/to/mountpoint with the correct path to where you want to mount your drive. I usually make empty directories in my home directory, but it can be anywhere.
auto you should probably specify the proper fstype, you can find it with
lstblk -f, too, just like UUID. It will probably be
exfat or something like that.
Check that your UID is really 1000, as well as GID (it most probably is, but it doesn’t have to be). You can find your UID and GID by looking at the
/etc/passwd file. It contains entries for every user, find the line that has:
It’s these two numbers you want, the first is UID, the second is GID. If both are not 1000, just replace the
gid= in the
fstab file with the numbers from your
umask as 022, unless you have a reason to use something different.
And leave 0 and 0 at the end. These are
EDIT: fixed the mistake where I’m suggesting 2 for
fsck option. Apparently, it should be 0.
Alternatively, you could set it up as a systemd mount:
Yes, that’s certainly an option, but I don’t like it. I like having everything in one
fstab file, it’s transparent and easy. I feel like systemd mount is not as transparent…
But it’s a matter of personal preference, of course.
is there anything wrong with this:
UUID=BC1F-1E8C /drive/shared exfat defaults,uid=1000,gid=1000,umask=022 0 2
when i put it in there it just freezes when i boot
Does that directory exist?
If it does, can we see the output of
lsblk -o name,fstype,size,uuid
Is the UUID correct?
Does the path
/drive/shared exist? It should be an empty directory, prior to mounting the drive.
Is the fstype
i am trying to mount the partition sdb3
and yes, i made the directory /drive/shared
sudo chown 1000:1000 /drive/shared
Assuming your UID and GID are indeed 1000.
Also, have you changed any other line in your
fstab file? If so, this could be the problem.
Could you share your
Also try to replace the last 2 with 0, like this:
UUID=BC1F-1E8C /drive/shared exfat defaults,uid=1000,gid=1000,umask=022 0 0
Also, you don’t need to reboot to test it, just
mount. When you get it to work, then reboot. It’s easier that way, rather than always getting stuck at boot.
umount /drive/shared mount /drive/shared
Maybe add the
nofail mount option. Will make things less of a faff while you get to the bottom of things.
Also, do you have the user-space exfat programme?
I don’t think that’s needed, exfat should be supported by the kernel.
thank you, seems like changing that 2 to a 0 seems to make it mount correctly.
Oops, that was my mistake. I’ll fix the post above.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.