Noob question: what's the deal with my connected drives not being accessible?

I’m definitely new to everything Manjaro and only fiddled with Ubuntu on and off years ago. I’ve installed Manjaro in my small SSD and I noticed the bigger drive that’s in my PC is not mounted by default. I always have to click on it and give my password. Same with the two external HDDs I have. I rely a lot on all those drives because the installation drive is small. I’m coming from Windows mainly so forgive me if this is common knowledge or something.

I am using Obsidian and the vaults are stored on one of those drives, but I think flatpak can’t work with those? Everytime I select the vault and configure it, and I close Obsidian, Obsidian forgets the location and I have to start again the next time I open it. Happened the same with Minecraft Prism, had to migrate the folder inside of the installation drive or it would just break. Am I getting this right? How does it work? How do I get it to work in a more intuitive way?

Thanks in advance!

Welcome to the forum! :vulcan_salute:

First of all, please peruse the following tutorial — it’s quite explanatory… :backhand_index_pointing_down:

Secondly, it does indeed happen with certain games and with FlatPaks or Snaps that you cannot access everything in the system, because FlatPaks and Snaps are containerized applications with limited access to the system’s resources. Certain games are like that as well.

4 Likes

Thank you! I had a hunch that that was the case, from what I gathered so far, but I wasn’t sure. It’s my first time working with containerised applications.

Also, I should have mentioned that I was coming from that tutorial exactly. I’ve read through it and tried opening that fstab file, but I stopped there because I didn’t know how to add a row to it. If putting the wrong thing can stall my boot, I don’t think I know how to repair the damage.

I’m mainly confused about the first column, the UUID, and the concept of mountpoints. I’ve now just noticed another tutorial article at the bottom that I’ll read today about filesystems and permissions that might offer some clarifications though. And I just noticed that it’s you who wrote both - thanks for the help! That’s amazing!

3 Likes

You do that with a text editor — just add a blank line. :wink:

I see you’re on Plasma, so you’ve got two editors that are polkit-aware, i.e. kate and kwrite. Just open the file /etc/fstab in one of them, and it’ll ask you for your password when saving the file, because it’s a system file, and regular users have no write access to that. This is where polkit comes in — it’s a mechanism for elevating privileges.

The UUID is a unique identifier stored in the filesystem itself. You can find the UUIDs for all of your partitions with the command… :backhand_index_pointing_down:

lsblk -fs

Note that if you want to include the UUIDs in /etc/fstab, they have to be literally as in the output of the above command, because UNIX is case-sensitive.

You may also want to add nofail to the mount options, but note that the mount options must be separated by commas only, without spaces between them.

The mountpoint, lastly, is the directory that you want the filesystem to be mounted to.

Considering that you’re coming from MS-Windows, which is generally a single-user system, your other drives probably contain files that are personal to you, and in that case, it is best to create the mountpoints — i.e. directories, or folders, if you will — for those other drives inside your home directory.

That way, the mountpoints are already owned by your user account and will have the proper permissions, although Microsoft-style filesystems need their permissions listed in the mount options, because they do not support POSIX permissions and file ownership.

3 Likes

Thank you for taking the time to reply, I’m starting to get the picture here.

Is the UUID part optional?

I think I want to include the nofail option to avoid messing up with my boot, right? Worst that can happen this way is that the drives don’t get mounted and I have to troubleshoot from there, yeah? Also one is an internal drive, the other two are external, and I’ve read in your other article that you also have to leave that option in case I unplug them one day.

Now this is the part that was also confusing me but the second article will surely help. Remembering this from your linked article:

I’ll figure it out, but if I may ask one favor, could you give me an example of a row with permissions listed in the mount options?

Well, that depends on how you define “optional”. You need to specify what storage device needs to be mounted where, and the storage device can be mentioned in a few different ways. :backhand_index_pointing_down:

  1. By its block device name. This is commonly something like /dev/sdb1 for the first partition on the second drive found by the system when it booted. But therein lies the problem, because the order of the physical drives may differ across boots, given that the kernel enumerates them in the order of discovery, and small glitches may cause one drive to get detected sooner than another drive. So this is not a good strategy.

    /dev/sdb1  /where/to/mount/it   filesystem-type-here  mount,options,here    0    1
    
  2. By its UUID: UUIDs are unique — unless you’ve manually changed them — and are therefore a secure way of indicating what filesystem you want to mount.

    UUID=some-long-string-here  /where/to/mount/it   filesystem-type-here  mount,options,here    0    1
    
  3. By a LABEL. A LABEL is easier to use than a UUID, but it must be set manually by the administrator, which means that your filesystem in question may not have a LABEL attached to it, and if it does, then there’s no guarantee that it’ll be unique.

    LABEL=the-name-you-gave-it  /where/to/mount/it   filesystem-type-here  mount,options,here    0    1
    

There are yet other methods, similar to the above, e.g. by using the PARTUUID or PARTLABEL, but this only works if your drive was partitioned with a GPT partition table; it does not work for MBR-partitioned drives, because they don’t have either a PARTUUID or a PARTLABEL.

The difference between a UUID and a PARTUUID is that the UUID is stored in the filesystem itself, and if it ever gets reformatted, then the UUID will be different. The PARTUUID on the other hand is stored in the GPT partition table, and therefore it will not change if the partition gets reformatted.

Likewise for the difference between LABEL and PARTLABEL, but just as with LABEL, the PARTLABEL has to be manually set, which means that it’s not guaranteed to be unique, and maybe you didn’t even assign a PARTLABEL to the partition.

The bottom line is that using the UUID is the safest bet, especially for newbies.

Yes, that is correct. But you don’t need nofail on your root volume, though. It’s only required for partitions on drives that aren’t guaranteed to be connected to the system when it boots.

Sure. Here’s an example for mounting an ntfs drive… :backhand_index_pointing_down:

UUID=some-long-string  /home/your-user-account/my-winfs  ntfs  auto,nofail,uid=1000,gid=1000,utf8,umask=022,defaults   0   0

In addition to all of the above, a special word also needs to be said about btrfs. This does not apply to your additional drives, but it does apply to your root filesystem if you opted for automatic partitioning, because btrfs is now the default filesystem type in new installs as of Manjaro 25.0.

There is ample documentation on btrfs, but I’ve written a short introduction to it at the link below… :backhand_index_pointing_down:

2 Likes

Thank you very much, this has been incredibly helpful. I didn’t manage to read all the man mount nor the three guides you linked (I’ve started the one on filesystems), but I will in the next few days. It’s a learning journey.

I managed to get it to work after hitting my head a little. It was refusing to load, telling me utf8 wasn’t a valid thing. I looked it up (finding more comments of yours as well in the process), and it turns out I made some mistakes (figures).

  • I have an ntfs3 volume there, not just ntfs - didn’t even know it was a thing
  • apparently I needed an nsl or iocharset in front of the utf8, I don’t understand why (yet, probably because I didn’t read the whole man mount output

It worked with iocharset, now I find it loaded on startup and the two apps I use with it don’t break anymore.

3 Likes

Thank you for pointing that out. This means I need to edit my tutorials, because that’s where the pasted line comes from. :wink:

As a disclaimer, I don’t use Windows, so if anything changes with regard to Windows filesystems, then I won’t know about it until a Windows user tells me. :wink:

Glad you got it sorted out, though. :wink: :+1:

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.