Symlinks work, but don't activate at startup

earlier response updated “after reboot”… see above. Thanks for the assist.

(bolding mine)

It’s not necessary or useful to use uid= or gid= options with an ext4 file system, since ext4 has its own support for Linux uid/gid. Try configuring /dev/sdc1 to mount without them?

Not to be unappreciative, but that assumes I presently know how to configure a device at all, and that I would comprehend the difference between configuring with or without uid/gid… which before you suggested it, I didn’t even know were options in that “mount options” window.

So, rather than “uid=1000,gid=1000” where [user id]=1000, what should be in that “mount options” specification… cause I’ve got no clue how to set it for “ext4” file type.

Back to revisiting the original problem from the original post topic: symlinks active and working:

With drive properly mounted AND attributed to the current [user] (the drive to which these symlinks refer), I’ve rewritten the symlinks in question and one works as intended, the other works with a bit of encouragement…

241207_desktop_symlinks_working_sorta

The “Members_PMA” link takes me right to the intended folder and I’m looking at work files five or six directories down… a time and effort saver.

The “0_System_Maintenance.txt” symlink doesn’t work when double-clicked, as I had hoped, but opens as expected in the Text Editor if R-Clicked and “Open with other application” is selected.

Is there a step to associate the link with a particular app? I don’t remember having to do this the first time I toyed with setting up symlinks; the references I accessed online and followed don’t mention any such thing… I can find no reference to any such.

Here are my notes (in 0_System_Maintenance.txt) for what I did (for those that follow):

create symbolic link to file using $ ln -s ( / for /)
[link] [symbolic] [path to folder “Members_PMA”] [location to write symbolic link: “Desktop” path]

EX1: $ ln -s /mnt/2Tb_ExFat/Documents/dp_Business/david*****.com/Members_PMA /home/david/Desktop

EX2: $ ln -s /mnt/2Tb_ExFat/MySystem/System_Maintenance/0_System_Maintenance.txt /home/david/Desktop

Sorry for not being clear. Try same as in your screenshot except for omitting uid=1000,gid=1000, i.e.

nofail,x-gvfs-show,x-gvfs-name=WD_1Tb_HDD

There’s just no substitute for knowledge and experience… Thank you for your patience @halogen2 ! Very much appreciated.

I’ve got the two problem drives, which now mount at startup, and are accessible by the [user]. Major problems solved… minor problems to be dealt with.

I don’t know how to choose “one solution” among the 25 posts… It was a series of things, including:

This post explains how:
https://askubuntu.com/questions/164926/how-to-make-partitions-mount-at-startup

[Mount Options is accessed in Disks app, under the device, gear icon, Edit Mount Options]

Where it says “nosuid,nodev,…”, append the following (comma-separated) parameters:

uid=YOUR_UID,gid=YOUR_GID

Replace YOUR_UID and YOUR_GID with the numeric values for your user, which you can find by running id in Terminal.

241207_2Tb_ExFat_mount_options

241207_WD_1Tb_drive_mount_options

and the and adjusted ext4 adaptation:
It’s not necessary or useful to use uid= or gid= options with an ext4 file system, since ext4 has its own support for Linux uid/gid.
AND
same as in your screenshot except for omitting uid=1000,gid=1000, i.e.

nofail,x-gvfs-show,x-gvfs-name=WD_1Tb_HDD
1 Like

Thanks, halogen2. That’s new info to me - I just looked it up. For anyone else wondering “What’s that about?”, here’s a ref I found:
https://unix.stackexchange.com/questions/169571/what-is-the-difference-between-mounting-in-fstab-and-by-mounting-in-file-manager

1 Like

I’m not ready to digest that yet… it’s above my pay-grade! ;-D
I’ll get back to “how to replace broken symlinks and rewrite ones that work…
(now that my drives are properly mounted, mount at startup, and are assigned to “me”)

A sincere thanks to everyone who contributed; patient enough to work through it.
Look for the notes I’m taking on the symlinks, correct me if I’m wandering off the path…

With the larger problems fixed, I now have storage devices which are properly mounted at /mnt points, and mount automatically at startup. This enabled the symlinks I intended to establish to be active and available to the system, and properly route data to other devices, a 2Tb SSD, a 1Tb HHD (old-repurposed for backups), and USB devices rather than my 500Gb system disk.

The old symlinks, routed to incorrectly mounted drives, didn’t work anymore, so they needed to be removed (rm) and replaced. Here’s how I accomplished those tasks. (a component of the original posted problem).

Note that the “Documents”, “Music” and “Templates” symlinks are broken (red/black background), but the “Pictures” symlink still works. The USB device where the “Pictures” symlink routes to hasn’t changed, therefore, works as intended. The others, where the referenced device is now mounted to a different area (properly mounted to /mnt vs. /media) don’t work.

I removed each of the broken symlinks using the remove ‘rm’ command.
ref: https://linuxize.com/post/how-to-remove-symbolic-links-in-linux/
I find that “Linuxize” tends to explain things well and tends not to leave holes

I tested the first ‘rm’ command on the “Templates” symlink since the Templates directory to which it referred was empty. If for some reason I acted upon the source directory, I wouldn’t lose anything.

Command line: $ rm -i Templates

The -i operator from I’ve read enables “interactive” (?) response with the remove command, prompting the user with a description of what it’s about to do. For those of us with lesser levels of experience, a nice option. “y” to accept, “n” to reject the operation. Note it confirms “remove the symlink”… rather than jumping to remove the directory and everything in it without any warning or feedback.

Changing directory to the Templates directory on my target drive ensures the directory is still intact… list ‘ls’ simply displays it’s still empty.

Next, I removed the “Music” and “Documents” symlinks… “Music” first as that volume is again, empty (yes, I have trust issues…)

With the /home directory now free of broken symlinks, I reposted symlinks to the properly mounted drives and directories where I wanted data to be routed:

SYNTAX: [ln link command] [-s symlink option] [target directory path] [symlink name/path]
for the last section, [symlink name/path]:
- name if creating symbolic link in the present working directory (which I did)
- path with directory name [link name] to be created by “ln” if in relative directory (?)

EX 1: $ ln -s /mnt/2Tb_ExFat/Templates Templates

EX 2: $ ln -s /mnt/2Tb_ExFat/Music Music

EX 3: $ ln -s /mnt/2Tb_ExFat/Documents Documents

Now I have what I originally intended, active symlinks which load at startup and are actively routing files to the larger data drives of my choosing; even for system automated saves. Now when the system (as with screenshots saving to Pictures), it is routed to the device I designated by symlink rather than to the m2 system drive.

My sincere thanks to everyone who pitched in with that effort: @halogen2 , @cantankerousoldgit , @Actionparsnip , @bernard010 , and @wiil . I hope my additional notes serve to assist someone like me with limited knowledge and experience in the future.

1 Like