My system has a dual storage configuration that consists of a PCIe SSD where the OS is located and a secondary, internal HDD for general mass storage needs.
I can easily mount the HDD via the GUI and I've created a symbolic link to it which works after I've mounted the HDD via the GUI. However, prior to taking the aforementioned step my symbolic link will not work.
Is there a way to remove the need to mount the HDD manually so my symbolic link always works?
What you're doing via GUI is that you're mounting the filesystem. Once a filesystem is mounted, files can be accessed ( if the drive is mounted with appropriate permissions ).
There's a couple things you can do to make your life easier:
Mount the filesystem at boot via
/etc/fstab
file. Obtain the UUID of that partition viasudo blkid
command. Write a line in/etc/fstab
that should look roughly like this:The example above is my actual setup. As mentioned in comments , I've a symlink to folder on that 400 Gb partition. If hard drive is mounted at boot, the symlink always works (of course , you have to ensure that you mount filesystem at proper directory and symlink is pointing to right file/folder).
If you wish to mount the filesystem on-demand, use this command for mounting:
udisksctl mount -b /dev/sdX
, where/dev/sdX
is device file of that filesystem. This is essentially the same thing that GUI method uses. This can be scripted as well