LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Link to folder - broken till I use the link (https://www.linuxquestions.org/questions/linux-newbie-8/link-to-folder-broken-till-i-use-the-link-4175689749/)

GPGAgent 02-02-2021 12:55 PM

Link to folder - broken till I use the link
 
2 Attachment(s)
I created a link to a folder and saved it to the desktop


When I boot up it's shown as a broken link, but after I access the folder by navigating to it with file mangler and access it the link is repaired, how can I make the link good immediately after booting up my machine?


Linux Mint 20 - 64bit

Emerson 02-02-2021 12:59 PM

I'm just guessing, your device probably is not mounted until you access it, then some automount mechanism kicks in and mounts it. Running some command on it like ls will probably trigger automount.

lvm_ 02-03-2021 04:28 AM

More likely the disk is mounted automatically regardless of access, it just happens later than desktop is painted. Is it a magnetic disk? It may take some time to spin up and that may explain a delay. Check syslog to see what is actually happening.

GPGAgent 02-05-2021 05:53 AM

Quote:

Originally Posted by lvm_ (Post 6215450)
More likely the disk is mounted automatically regardless of access, it just happens later than desktop is painted. Is it a magnetic disk? It may take some time to spin up and that may explain a delay. Check syslog to see what is actually happening.

Yes 2TB hdd

yancek 02-05-2021 06:24 AM

Is the link you have on your user Desktop pointing to a location on the same partition and on the same physical device? If not, it is not mounted or available until you access it from either a terminal or file manager. If it is on another partition (other than root or home) or on another device, you would need to put an entry in fstab to have it mounted on boot. If it is on a secondary drive that is not attached permanently, this can create problems, at least slowing down the boot process.

jpollard 02-05-2021 06:41 AM

Might be entered as a "usermount" device in /etc/fstab.

It is also possible the system is just being really slow at mounting (I've caught systemd that way a time or two with a "nofail" mount taking longer than usual).

GPGAgent 02-05-2021 08:57 AM

Quote:

Originally Posted by yancek (Post 6216424)
Is the link you have on your user Desktop pointing to a location on the same partition and on the same physical device? If not, it is not mounted or available until you access it from either a terminal or file manager. If it is on another partition (other than root or home) or on another device, you would need to put an entry in fstab to have it mounted on boot. If it is on a secondary drive that is not attached permanently, this can create problems, at least slowing down the boot process.

The link is on my desktop so the links are pointiong to a different physical drive, here's an ls of Desktop
Code:

jonke@charlie:~/Desktop$ pwd
/home/jonke/Desktop
jonke@charlie:~/Desktop$ ls -al
total 152
drwxr-xr-x  2 jonke jonke  4096 Feb  2 18:51  .
drwxr-xr-x 39 jonke jonke  4096 Feb  5 14:50  ..
lrwxrwxrwx  1 jonke jonke    59 Aug 23 12:02 'jonk - 2TB' -> /media/jonke/6e725920-1c32-4931-bab9-fc8c12d01128/home/jonk
-rwxr-xr-x  1 jonke jonke  669 Mar  9  2020  org.gnome.Calculator.desktop
lrwxrwxrwx  1 jonke jonke    68 Nov 21 13:35  PODCASTS -> /media/jonke/6e725920-1c32-4931-bab9-fc8c12d01128/home/jonk/PODCASTS
lrwxrwxrwx  1 jonke jonke    53 Nov 16 18:56  USB-DRIVES-DESKTOP.pdf -> /home/jonke/00MYSTUFF/000INDEX/USB-DRIVES-DESKTOP.pdf
lrwxrwxrwx  1 jonke jonke    50 Aug 19 18:14  USB-STICKS.pdf -> /home/jonke/00MYSTUFF/000INDEX/PDFs/USB-STICKS.pdf
-rwxr-xr-x  1 jonke jonke 11183 Apr  9  2020  vlc.desktop
jonke@charlie:~/Desktop$

Here's df -h
Code:

jonke@charlie:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            5.9G    0  5.9G  0% /dev
tmpfs          1.2G  1.7M  1.2G  1% /run
/dev/sda5      228G  121G  96G  56% /
tmpfs          5.9G    0  5.9G  0% /dev/shm
tmpfs          5.0M  4.0K  5.0M  1% /run/lock
tmpfs          5.9G    0  5.9G  0% /sys/fs/cgroup
tmpfs          5.9G  24K  5.9G  1% /tmp
/dev/sda1      511M  4.0K  511M  1% /boot/efi
tmpfs          1.2G  88K  1.2G  1% /run/user/1000
/dev/sdd2      3.7T  2.3T  1.4T  62% /media/jonke/SEAG_4GB
/dev/sdb5      1.8T  1.4T  340G  81% /media/jonke/6e725920-1c32-4931-bab9-fc8c12d01128
/dev/sdb1      511M  14M  498M  3% /media/jonke/0628-D3D6
jonke@charlie:~$

The folders are on /dev/sb5
Home folder is on /dev/sda5

And this is fstab
Code:

jonke@charlie:~$ more /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=92c6eff1-78fc-4faa-8389-c88454e80d11 /              ext4 noatime,errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=EB15-5510  /boot/efi      vfat    umask=0077      0      1
/swapfile                                none            swap    sw              0      0
jonke@charlie:~$

Linux Mint 20 64bit

jpollard 02-05-2021 11:31 AM

Since it isn't in the /etc/fstab, it is only mounted on first connection; which would be made during access to the symbolic link.

computersavvy 02-05-2021 12:13 PM

You could add a line to the fstab such as
Code:

UUID=6e725920-1c32-4931-bab9-fc8c12d01128 /media/jonke/6e725920-1c32-4931-bab9-fc8c12d01128  ext4 user=jonke  0 0
and add whatever other options needed so it is mounted at boot time and accessible by you. I would recommend however that you select another location to mount it since /media is normally used for auto mounting and relocating it to somewhere under $HOME would be easier for permanent access.

GPGAgent 02-05-2021 12:17 PM

Quote:

Originally Posted by jpollard (Post 6216553)
Since it isn't in the /etc/fstab, it is only mounted on first connection; which would be made during access to the symbolic link.

That's what I thought but wasn't too sure

GPGAgent 02-05-2021 12:20 PM

Quote:

Originally Posted by computersavvy (Post 6216575)
You could add a line to the fstab such as
Code:

UUID=6e725920-1c32-4931-bab9-fc8c12d01128 /media/jonke/6e725920-1c32-4931-bab9-fc8c12d01128  ext4 user=jonke  0 0
and add whatever other options needed so it is mounted at boot time and accessible by you. I would recommend however that you select another location to mount it since /media is normally used for auto mounting and relocating it to somewhere under $HOME would be easier for permanent access.

I wondered about that, I never specified this specifically when I rebuilt my machine.
What I did was this.
I had Mint running off this drive originally. A added an SSD and just built a new version of Mint on that drive. I never specified anything to do with the original drive which is the one in question. Why it was hung off the /media folder structure is mystery to me.

computersavvy 02-05-2021 08:07 PM

Probably because mint saw it was data and decided to make it available there when needed.It did not mount it in fstab because you did not specify a mount point when you did the install on the other disk.

According to your fstab you do not even have /home on a separate partition. It appears to be part of the / file system.

GPGAgent 02-07-2021 07:34 AM

Quote:

Originally Posted by computersavvy (Post 6216766)
Probably because mint saw it was data and decided to make it available there when needed.It did not mount it in fstab because you did not specify a mount point when you did the install on the other disk.

According to your fstab you do not even have /home on a separate partition. It appears to be part of the / file system.

That's correct, confuses me, but it's exactly as built by the install process

yancek 02-07-2021 12:42 PM

Quote:

Whey it was hung of the /media folder structure is mystery to me.
I'm not sure if I understand by the above, but that is the standard location for the various Ubuntu distributions such as Mint. External drives are generally accesible under /media/username.

If you don't have this drive permanently attached, there would be not point in putting an entry in fstab.

GPGAgent 02-08-2021 09:19 AM

Quote:

Originally Posted by yancek (Post 6217466)
I'm not sure if I understand by the above, but that is the standard location for the various Ubuntu distributions such as Mint. External drives are generally accesible under /media/username.

If you don't have this drive permanently attached, there would be not point in putting an entry in fstab.

First let me apologize on my keyboard's behalf for all the typo's - my keyboard at work is equally bad at spelling!


The drive's are all permanently mounted and are installed onto the motherboard bus.


All times are GMT -5. The time now is 08:01 PM.