Results 1 to 8 of 8

Thread: mount nfs share via WiFi on boot

  1. #1

    Default mount nfs share via WiFi on boot

    Hello,

    I installed 15.2 with KDE desktop with autologin with username, and want to mount nfs share via WiFi on boot (to access home NAS)
    I put
    Code:
    10.10.2.104:/film                  /opt/film  nfs4  nfsvers=4.2,auto 0  0
    to /etc/fstab but the share is not mounted on boot.
    Code:
    sudo systemctl status opt-film.mount
    ● opt-film.mount - /opt/fili
       Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
       Active: active (mounted) (Result: exit-code) since Mon 2020-09-21 17:40:45 MSK; 3min 51s ago
        Where: /opt/film
         What: 10.10.2.104:/film
         Docs: man:fstab(5)
               man:systemd-fstab-generator(8)
      Process: 1484 ExecMount=/usr/bin/mount 10.10.2.104:/film /opt/film -t nfs4 -o nfsvers=4.2 (code=exited, status=32)
        Tasks: 0
       CGroup: /system.slice/opt-film.mount
    if after boot I open terminal and run "sudo mount /opt/film", it will be mounted after enter root password.
    Is it possible to mount the share on boot?
    I think first step must be connect to WiFi and next mount. but how?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,152

    Default Re: mount nfs share via WiFi on boot

    Are you using Network Manager? And are you letting the user connect to the Wifi at/after his/her login?
    Then it is logical that there is no network (Wifi) connection at boot and thus mount on boot is impossible.

    You must see that the network is connected at boot. Either (when this is a system with a fixed place, always connecting to the same network) by switching to Wicked, or (when this is a "walk around" system that regularly connects to several different networks) by configuring in Network Manager that the particular connection is a "system" connection.
    Henk van Velden

  3. #3

    Default Re: mount nfs share via WiFi on boot

    it looks like that I use network manager
    Code:
    sudo systemctl show -p Id network.service
    Id=NetworkManager.service
    I've connect via right down corner with WiFi icon in KDE. How can I connect to network on boot?
    Did you mean "Wicked" https://www.suse.com/media/presentation/wicked.pdf ?

  4. #4
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    4,885

    Default AW: mount nfs share via WiFi on boot

    Not wicked see:
    https://doc.opensuse.org/documentati...c-nm-configure

    To make your connection available as a system connection go to the Identity tab and set the check box Make available to other users. For more information about user and system connections, see Section 28.4.1, “User and System Connections”.
    It is described for Gnome but Plasma is aeqivalent.
    Last edited by Sauerland; 21-Sep-2020 at 10:23.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,152

    Default Re: mount nfs share via WiFi on boot

    Another solution, which is independent of how you configure your network, is using autmounter. The NFS export will then only be mounted when it is to be used. There is of course the good old automounter, which is easy to configure, but nowadays there is systemd.automount, which is even easier.
    Code:
    10.10.2.104:/film                  /opt/film  nfs4  nfsvers=4.2,noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10 0  0
    That is all (but you may want to change the timeout to another value).
    Henk van Velden

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,152

    Default Re: mount nfs share via WiFi on boot

    Sorry, but I was a bit hastened in my post and want to add a bit to it.

    I assume (from the name of thedirectories involved: film) that this file system is to be accessed by logged in end-users. Thus it will not be used before a user is logged in and, by doing that, made the network connection (through NM).
    Thus irrespective if the network is upped at boot or at login, when a user wants to see a film, it will be there through the automount.

    Maybe, because of much confusion about the word "automount". It seems that it is used in several meanings:
    • connected to the file system independent mount option (no)auto, which rules if the mount is to be included at mount -a (also at boot);
    • the automounter (now in two incarnations, old automount configured in auto.master and new systemd,automount) that mounts when required (and umounts after a certain time of no requirement);
    • some people call the mount through the desktop of spontanious connected mass-storage (e.g. USB stick) automounting, probably because they do not know what happens and when people do not understand how a computer action works, they often think it is automagic.
    Last edited by hcvv; 21-Sep-2020 at 10:48.
    Henk van Velden

  7. #7

    Default Re: AW: mount nfs share via WiFi on boot

    Quote Originally Posted by Sauerland View Post
    Not wicked see:
    https://doc.opensuse.org/documentati...c-nm-configure



    It is described for Gnome but Plasma is aeqivalent.
    doesn't help https://prnt.sc/um2p42

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,426
    Blog Entries
    3

    Default Re: AW: mount nfs share via WiFi on boot

    Quote Originally Posted by BloodAngel View Post
    doesn't help
    I'm not sure of your current setup.

    If you are using KDE, then you also need to set it to save your connection password in a file unencrypted. That setting should be in the WiFi connection security tab. If I recall, it is an icon on the same line as where you enter the passphrase.

    If that sounds insecure, it really isn't. The passphrase will be saved in a file that is readable only by root or by providing the root password.
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •