Secondary Drive Not Mounting

To make along story short, I had to reinstall ZorinOS, and now my secondary drive is not automounting. I searched the forum and tried a few things already, including; checking the mount options and ensure that "Mount at System Startup" and "Show In User Interface" are checked, but that didn't fix the issue.

I also tried the following code:

sudo ntfsfix /dev/sdd2

This didn't work, but I should note that my drive location appears to be /dev/sda2, so I tried the code again like this: sudo ntfsfix /dev/sda2 ... but it still didn't work.

I remember their being a way to do this through labelling the drive in Terminal, so any help would be appreciated. Please keep in mind that I'm not an advanced user, so feel free to explain it to me like I am a child.

Have you tried it with gnome-disks?

1 Like

I tried to adjust it in the Disks section, but to no avail. I'm not sure if that's the same thing as Gnome Disks, but feel free to let me know.

Yes, that is the same.
When you are in gnome-disks,
select the drive, click the gear icon, and then select "Edit Mount Options".
Enable "mount at system startup" and "show in user interface"

1 Like

I tried that already. Didn't work.

Let's take a closer look at your drives. In the terminal, run: lsblk to list all drives.

1 Like

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 10.9T 0 disk
├─sda1 8:1 0 15M 0 part
└─sda2 8:2 0 10.9T 0 part /media/linux/12 TB Hard Drive
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
└─sdb2 8:18 0 931G 0 part /

That shows that your drive is mounted at /media/linux, which is a normal location for external drives, USBs, etc.

First, are you able to open that location through your file manager? It should be available in the sidebar.

And second, where would you like that drive to appear. In "Disks" you need to specify that location, but I think it needs to be created upfront as an empty folder.

1 Like

I can open the drive and access my files, but I have to manually mount the drive every time I restart my system. I really have no idea where I want the drive to appear. All I want to do is have it mount when I restart my system, but I don't know how to do that.

Ok, good. Well, we can do that manually by editing some configuration file but I'd prefer to use the Disks application since that also should work...

Can you share a screenshot of what that looks like for you? Note that you have to disable the first option "Use Session Defaults".

It's probably best to unmount the drive before doing this, by the way.

An example, for reference:

1 Like

Here's a screenshot of the drive.

That looks all fine. So, with those settings, what is the output of that same command from earlier right after you restart the computer? Don't do anything else, just launch a terminal and run lsblk again.

1 Like

I rebooted and ran lsblk again, but the drive is still not mounted.

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 10.9T 0 disk
├─sda1 8:1 0 15M 0 part
└─sda2 8:2 0 10.9T 0 part
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
└─sdb2 8:18 0 931G 0 part /

Mmm, well that's disappointing. Not sure what's going on there, but we can make this manually by editing a configuration file. Since it's a system file, you'll need to edit it with elevated permissions.

The exact location to the file in question is /etc/fstab, and the goal is to add an entry to this file that obeys the following format: <drive> <mount point> <file system> <options> <more options>. For example:

UUID=a9c0a86c-8d78-4166-8f2c-980553918563 /home ext4 defaults 0 0
  1. First you need that long string of characters, the UUID which is an identifier for your drive. You can find this out by running this in a terminal: lsblk -f — very similar to last one but with an extra option.

    Copy the value from that UUID column and paste it, and make a note also from the FSTYPE column which you'll use in a minute.

  2. You need a mount point, or where this drive will be visible in the file system. Let's create that somewhere predictable so that you can come back to it later if you ever need to. I'd suggest the /mnt directory similar to how it appears in your last screenshot from Disks.

    In this case, I'm just copying and pasting the output from the previous command:

    Note that you need to run sudo and that will mess up permissions, that is why I'm running the chown command to change ownership to my own user. You can take this a little further if you share this computer with other people and run: chmod 750 /mnt/febc6cb7-142e-4ba7-b05e-7b0fea87c9b9. This will make it so that only you can access this directory.

  3. And that's about it, you have all the information you need to add that entry in /etc/fstab:

    It looks long and intimidating but you can just copy and paste a lot of this. Note that the file system (the third column ) comes from the FSTYPE column on that previous command. The options, are the same as they appear in Disks and the other two options at the end leave them at "0".

    Make sure to only use spaces between each of the fields, this is important. And, if you have any questions, is better to ask!

1 Like

Is Your secondary Drive formatted to ext4?

1 Like

I followed the steps, and while it does show that it's "mounted" when I restart my system, it's still technically not mounted because none of the links on my desktop are working. When I go into disks it shows that it's mounted, but it's not really.

Not sure what you mean. The drive is formatted to ext4. Do I need a driver as well?

Yes, that is what I meant. I typed it wrong, sorry. I corrected it now.

1 Like

That's probably because the location is simply different. Before, when using the file manager manually, the drive was mounted at /media. But now as per the instructions above that's going to be at /mnt.
You can fix this in one of two ways: re-create the shortcuts in your desktop to point to the new location, or just change the mount location in the configuration file /etc/fstab.

The one thing that you should watch out for are spaces in filenames — Linux doesn't like spaces in files and folders. For example, in your previous reply you showed that the drive was mounted at /media/linux/12 TB Hard Drive. In your /etc/fstab file you would write that as /media/linux/12\040TB\040Hard\040Drive.

So, step by step, that would be the same as before but with small nuance:

  1. Create the directory, and set up ownership and permissions (one command at a time):

    sudo mkdir -p "/media/linux/12 TB Hard Drive"
    sudo chown $USER:$USER "/media/linux/12 TB Hard Drive"
    sudo chmod 750 "/media/linux/12 TB Hard Drive"
    
  2. Update the mount point in the /etc/fstab configuration file:

    UUID=<uuid> /media/linux/12\040TB\040Hard\040Drive ext4 nosuid,nodev,nofail,x-gvfs-show 0 0
    

In case this doesn't work, run ls -l ~/Desktop to see where those shortcuts are pointing to.

1 Like

I think you're right to say that the location is now different because I figured out what the problem was. I ended up following your previous steps and saw that it was mounting, but the links weren't working, so I just ended up re-creating the desktop links again and now it works fine. Thanks for your help!!

1 Like