LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-08-2011, 07:12 AM   #1
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
change order of scripts in rc.M to accomodate nfs over wireless


Hi all,

Just after some thoughts really. The picture here is that I have a server with my media on served over nfs, so that when I boot my laptop it is available from KDE.
Problem is, the rc.M script seems to assume that mounting nfs happens directly after the wired network is setup, but prior to wireless setup.
So, any danger here if I move the mount instruction further down the script, or conversely move the call to wireless networking further up the script?
Also, is it worth letting PV know about this, perhaps for modification at his end so that everyone benefits?

Cheers to all
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-08-2011, 08:43 AM   #2
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Rep: Reputation: 30
Not exactly answering your question but here's another solution for you which is the way I do it. I use wicd to establish the connection on my laptop and have a post-connection script defined in wicd which just runs /sbin/mount -a -t nfs.
 
Old 12-08-2011, 10:54 AM   #3
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Original Poster
Rep: Reputation: 98
Hi vulcan59. I do use WICD, but if you have a look in the rc.M file and see where WICD starts, it is after the command to mount other (including nfs) file systems. I am still able to utilise my nfs mounts as fstab takes care of it anyway. Just thought it might be worth pointing out, and check whether changing the rc.M script was the right way to go about it while mitigating any potential detrimental effects that action might cause while at the same time getting rid of the annoying error message on boot up.
 
Old 12-08-2011, 11:32 AM   #4
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351

Rep: Reputation: 30
vdemuth, you have /etc/rc.d/rc.inet1 /etc/rc.d/rc.wireless, /etc/rc.d/rc.inet1.conf and /etc/rc.d/rc.wireless.conf. And this is only places where you must configure your network to be accessible during boot. And you will never require wicd for you task.
 
1 members found this post helpful.
Old 12-08-2011, 11:47 AM   #5
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Original Poster
Rep: Reputation: 98
Quote:
Originally Posted by FeyFre View Post
vdemuth, you have /etc/rc.d/rc.inet1 /etc/rc.d/rc.wireless, /etc/rc.d/rc.inet1.conf and /etc/rc.d/rc.wireless.conf. And this is only places where you must configure your network to be accessible during boot. And you will never require wicd for you task.
Then what's the point of WICD, or for that matter NetworkManager as provided by AlienBob.

Still doesn't answer the question, but thanks anyway.
 
Old 12-08-2011, 05:16 PM   #6
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
Not exactly a solution you're looking for but you can use autofs and that way NFS partitions will be mounted on-demand. I'm in the same boat as you and I could have probably changed rc.M but then I came across rc.autofs and it has worked well enough for me.

With autofs, there's a timeout after which NFS is unmounted but it is remounted automatically if you try to access your nfs share via Thunar or Dolphin.

There's a tutorial out there if you google it.

Thanks,

Last edited by tuxrules; 12-08-2011 at 05:17 PM.
 
1 members found this post helpful.
Old 12-08-2011, 05:48 PM   #7
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351

Rep: Reputation: 30
Quote:
Then what's the point of WICD, or for that matter NetworkManager as provided by AlienBob.
Probably to have pretty balloon to popup when network subsystem fails. I'm really don't know. I never used neither wicd nor NM nor any other tool to configure network. /etc/rc.d/rc.(inet1|wireless).conf was enough form me.
I reread your message
Quote:
the rc.M script seems to assume that mounting nfs happens directly after the wired network is setup, but prior to wireless setup.
In Slackware officially wireless network is setup in the same moment as setup wired network - in rc.inet1, i.e before mounting network filesystems. If you dig deeply into rc.M, you will probably notices rc.wicd is started after startup of some critical system daemons(console-kit, messagebus). I don't thinks it is good idea to move start of rc.wicd before them, or move mount of other fs's after them.
 
2 members found this post helpful.
Old 12-08-2011, 06:26 PM   #8
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 69
FeyFre, if you never take your computer out with you, doing all your networking using inet1.conf makes sense. Otherwise, those network managing programs are really handy.
 
1 members found this post helpful.
Old 12-08-2011, 11:00 PM   #9
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
Without a shadow of doubt, the best way (as @tuxrules says - and never argue with a penguin !), is to use autofs. One of the problems with NFS is that if the server goes down, it can hang your connection, sometimes requiring a reboot. The auto-disconnect when not in use is a tremendous feature. And it's damn fast - you won't even notice it. Slight learning curve. If you want to try this, we can post our configs !
 
Old 12-09-2011, 07:05 AM   #10
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Original Poster
Rep: Reputation: 98
Thanks for all the feedback so far. I will look closely at autofs, and feedback here when completed as it seems the way to go.
 
Old 12-10-2011, 09:40 AM   #11
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Original Poster
Rep: Reputation: 98
Thanks to all for the advice. Ended up using autofs. Pretty straightforward once you get around deciphering the not so easy instructions and it does just what I am looking to achieve.
 
Old 12-10-2011, 09:54 AM   #12
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
I have a similar requirement as the OP. I have a wireless laptop which needs nfs during boot, and I also need the flexibility of GUI network manager for when I'm on the road. My solution was to use both rc.inet1 and WICD. Configure rc.inet1 with your wireless setting with wpa_supplicant if you are using encryption (which you should be using). This will enable your wireless connection before your nfs volumes are mounted. When rc.M gets to WICD, it takes over the network settings allowing GUI control.

This was a complete accidental discovery on my part. I have been using rc.inet1 without the need of a GUI network manager. Since I am more of a road worrier now, I was getting annoyed with having to restart my wireless connection after reboot. I installed WICD, without changing rc.inet1 and everything just worked. When I got my second laptop, I only setup WICD which cause my NFS mounts to fail during boot. Upon comparing the rc scripts of both laptops, I discovered that rc.inet1 was still required.

I also explored autofs but it does not support nested nfs mounts. It was too much of a hassle to reconfigure my nfs mounts and the above solution didn't require any extra utility.
 
Old 12-10-2011, 12:41 PM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by tux_dude View Post
I also explored autofs but it does not support nested nfs mounts. It was too much of a hassle to reconfigure my nfs mounts and the above solution didn't require any extra utility.
Well, you end up using symlinks to the /net/blah/blah autofs mount point at the places you want to nest to do that.
 
Old 12-10-2011, 02:19 PM   #14
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
Symlinks wouldn't work in my case. The mounts are not the same path on all my systems. The links would resolved to different path on each system. IMO, not supporting nested mount is a major limitation of autofs.
 
Old 12-10-2011, 10:19 PM   #15
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by tux_dude View Post
Symlinks wouldn't work in my case. The mounts are not the same path on all my systems. The links would resolved to different path on each system. IMO, not supporting nested mount is a major limitation of autofs.
Sorry, that doesn't make any sense. Could you provide a simple example of what you would like to do?
 
  


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
How do you control the order init.d scripts are started in SLES 10.2 64-Bit? j_unix Linux - Server 5 04-16-2009 12:42 PM
change grub boot order, all instructions say change default, but I don't see default mhg Linux - Newbie 5 11-09-2008 10:01 AM
Help, how to find boot order of scripts/services? Avatar Linux - Server 4 07-30-2008 07:48 AM
nfs and bind-mount order in /etc/fstab mr.neil Linux - Server 6 06-16-2008 02:41 AM
SysV-Init scripts...change order during bootstrapping? tsw Mandriva 2 07-02-2004 08:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:41 AM.

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