brent saner via plug on 9 Feb 2025 12:41:13 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Network shares not mounting automatically after NIC change


1. Use systemd mounts instead[0]

2. Use `Requires=network-online.target`

3. Profit


[0] https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html


On Sun, Feb 9, 2025, 15:38 Frank via plug <plug@lists.phillylinux.org> wrote:
Oh, that's *really* ugly.  But thank you, I imagine that would
technically work.


To be fair, though, I'd much rather just type "sudo mount -a" every time
I start up my computer than re-mount the shares every minute!


- Frank


On 2/9/25 3:35 PM, Casey Bralla via plug wrote:
> This is a real Kludge, but you can put the mount commands into
> /etc/crontab and remount it every minute.
>
> (I'm kinda ashamed to even suggest this since it's such an ugly
> solution, but it will get you going until you find the real answer.)
>
> On 2/9/25 3:29 PM, Frank via plug wrote:
>> On a Linux Mint workstation, I recently switched from using wi-fi to
>> wired Ethernet.  When I was using wi-fi, all of my network shares
>> auto-mounted when the computer started up.  Since I've switched to
>> wired Ethernet, none of the drives are shared when the computer
>> starts.  I have to type "sudo mount -a" every time after this
>> computer starts.  I suspect it's because the NIC on the motherboard
>> is taking longer to start up and the wi-fi chip did, and it's a
>> timing issue. All of the lines in /etc/fstab look like this:
>>
>> "//192.168.200.200/Music /mnt/Music cifs
>> username=[username],password=[password],file_mode=0777,dir_mode=0777,auto
>> 0 0"
>>
>> Is there a simple way to fix this?
>>
>>
>> Thanks, Frank
>>
>> ___________________________________________________________________________
>>
>> Philadelphia Linux Users Group         -- http://www.phillylinux.org
>> Announcements -
>> http://lists.phillylinux.org/mailman/listinfo/plug-announce
>> General Discussion  --
>> http://lists.phillylinux.org/mailman/listinfo/plug
> ___________________________________________________________________________
>
> Philadelphia Linux Users Group         -- http://www.phillylinux.org
> Announcements -
> http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug