LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2021, 12:55 PM   #1
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Link to folder - broken till I use the link


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
Attached Thumbnails
Click image for larger version

Name:	PODCASTS.png
Views:	27
Size:	212.6 KB
ID:	35467   Click image for larger version

Name:	PODCASTS1.png
Views:	20
Size:	20.3 KB
ID:	35468  
 
Old 02-02-2021, 12:59 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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.
 
2 members found this post helpful.
Old 02-03-2021, 04:28 AM   #3
lvm_
Member
 
Registered: Jul 2020
Posts: 930

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
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.
 
1 members found this post helpful.
Old 02-05-2021, 05:53 AM   #4
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by lvm_ View Post
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
 
Old 02-05-2021, 06:24 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,519

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
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.
 
Old 02-05-2021, 06:41 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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).
 
Old 02-05-2021, 08:57 AM   #7
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by yancek View Post
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

Last edited by GPGAgent; 02-05-2021 at 09:08 AM.
 
Old 02-05-2021, 11:31 AM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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.
 
Old 02-05-2021, 12:13 PM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.
 
1 members found this post helpful.
Old 02-05-2021, 12:17 PM   #10
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by jpollard View Post
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
 
Old 02-05-2021, 12:20 PM   #11
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by computersavvy View Post
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.

Last edited by GPGAgent; 02-08-2021 at 09:17 AM. Reason: typo's
 
Old 02-05-2021, 08:07 PM   #12
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.
 
Old 02-07-2021, 07:34 AM   #13
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by computersavvy View Post
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
 
Old 02-07-2021, 12:42 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,519

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
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.
 
Old 02-08-2021, 09:19 AM   #15
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by yancek View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and remove empty directories till Parent folder SOABEE Linux - General 8 08-25-2015 09:17 AM
BLFS: wget --spider reports broken link even though the link is working? McZ Linux From Scratch 2 03-07-2013 12:40 AM
[SOLVED] how to make a link (user)folder that links to a root folder morganfreeman Linux - Server 6 01-14-2013 05:56 AM
Headbreaker - Wifi link doesn't work till I cause an error Johncc330 Linux - Wireless Networking 9 04-25-2008 02:39 AM
A script within a folder to delete the folder, script, and the folder's contents Cyberman Programming 15 10-17-2007 07:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration