Suse not supporing NFS entry in /etc/fstab / adding entry to chkconfig fails

Hi every body

I’m a newbie in suse.

Recently I got an embedded board with a ported suse linux in that. The processor is atmel with ARM core.

Here I describe my problem:

I have to mount NFS in the end of system boot time. I do not have an rc.local in Suse to enter all local commands to execute **at the last of boot. **

I searched for another option, that was /etc/fstab. I tried to make an entry here for **nfs mount **as follows:

**192.168.174.134:/nfs/nfs_server /my_mnt nfs rw,soft,bg,timeo=3,intr 0 0
**
which could provide my a mount point my_mnt and I could access nfs_server from that point.

But **I could not succeed in it. :frowning: **

I got to know about** chkconfig** command. I tried to add a script /etc/init.d/rc.local to** chkconfig** but it given me an error as follows:

service rc.local does not support chkconfig

**How to add rc.local in chkconfig list **??? chkconfig --add rc.local failed]

Finally, I modified **/etc/init.d/rcS **file as follows:

-> Initialize the network ( eth0 up) with a delay
-> Mounted NFS using ***mount -t nfs -o nolock <nfs_server> <my_mnt> ***command after initializing network( given a delay to make network stable, then mounted nfs)

It works for me :expressionless: . But I would like to know why my fstab entry as well as chkconfig fails here.

/etc/init.d/rc.local file :

#!/bin/sh
#rc.local , Local initialisation tasks
#Author: SJR
#chkconfig:345 25 75
#description : add local commands

if “$1” = “start”]
then
echo -n “Mounting NFS …from rc.local”
mount -t nfs -o nolock 192.168.174.134:/nfs/nfs_test/ /mnt
fi

if “$1” = “stop”]
then
umount /mnt
echo -n “Unmounting NFS …from rc.local”
fi

Please help me out

Thanks in advance

SJR

Hi all

I could make the entry of my script “my_script” in chkconfig list with out the error "service my_script does not support chkconfig" . The reason was very unexpected and was unpredictable for me. I would like to mention it here ( I’m sure you guys r aware of this already. But mentioning for the newbies like me:P ) .

My script was some thing like this :

*#! /bin/sh

my_script - add local commands at boot up time

chkconfig: 345 25 75

description: The my_script manages all local commands

processname: my_script

#Author : SJR

if “$1” = “start”]
then
echo -n “Mounting NFS …from my_script”
mount -t nfs -o nolock 192.168.174.134:/nfs/nfs_test/ /mnt
fi

if “$1” = “stop”]
then
umount /mnt
echo -n “Unmounting NFS …from my_script”
fi*

When I did not give any information in description comment as

description :

even though it looks like a commented line , its not ] i got the error “service my_sciprt doesnot support chkconfig

But when I added ‘# description: abcd’, it took the entry to chkconfig list

and it appeared in chkconfig --list *"my_script 0: off 1: off 2: off 3: on 4: on 5: on 6: off " *

This was the only problem for that error.

But still my problem exists. I am not able to find the echo statements or mount application, which I MENTIONED IN MY_SCRIPT. Any one can help me ???

I see that this is your first post in our forums. Thus: Welcome!

That said, you may be served with the following:

Please put copied and pasted computer input/output (like your /etc/fstab entry and your script texts) between CODE tags and not between BOLD or ITALIC. CODE tags (by using the # button in the tool bar, sadly this button is only available when you use the Advanced Reply feature) preserves white space and in general shows better how the computer text is, so one can see the eventual errors. Also do please do not use all sorts of colours where the use for it is not obvious. Some people get sore eyes from this.

And to your problem. Mounting an NFS file system at boot time is normaly done by giving an appropriate entry in /etc/fstab (as you tried), not by using all sorts of scripts. I will thus concentrate on your /etc/fstab entry:

192.168.174.134:/nfs/nfs_server /my_mnt nfs rw,soft,bg,timeo=3,intr 0 0

I assume you created this entry yourself and not by using YaST > Network Services > NFS Client which in itself is a helpfull way of doing these things.

The above entry can only function if:
. you have installed the package* nfs-client *(and better also yast2-nfs-client to give you the possibility to configure using YaST).
. you have running the service nfs (NFS client services), This can be started using YaST > System > System services (Runlevel), but it will be done automagicaly by YaST when you configure using YaST > Network Sertvices > NFS client.
. The firewall does not block the needed ports. Again YaST will do this automagicaly when you start the service through it.
. the system 192.168.174.134 exists and more obvious things here and when /nfs/nfs_server is an exported item there.
. the directory /my_mnt nfs should exist on your system (again doing it with YaST, it will be created).

I do not think that you acknowledged any of the above as being checked by you in your post.

A handy way to check what is wrong is using

mount -a

after you entered (or changed) the entry and see what error message is given. When this error message does not help you enough, please post it here.

Hope this helps.

#test_code#

Thanks for the concern hcvv

Yes. /etc/fstab entry was created by myself. Since I do not have yast in machine It’s an embedded board with arm core processor]

After giving

192.168.174.134:/nfs/nfs_server /my_mnt nfs rw,soft,bg,timeo=3,intr 0 0

in /etc/fstab , I could check the functionality by giving

mount /my_mnt 

manually. It was giving me the following error


portmap: server localhost not responding, timed out
RPC: failed to contact portmap (errno -5).
portmap: server localhost not responding, timed out
RPC: failed to contact portmap (errno -5).
lockd_up: makesock failed, error=-5
portmap: server localhost not responding, timed out
RPC: failed to contact portmap (errno -5).
mount: mounting 192.168.174.134:/nfs/test_nfs  on /my_mnt failed: Input/output error

I could find and** solve the error** by running portmap in the back ground followed with a mount command as shown here

portmap &
mount /my_mnt

So here, /etc/fstab entry helped me, with out using yast.
I do not want to do this steps manually[obviously, that’s what I am looking for here;)]. What is your suggestion? How can I go ahead with out using yast or any other application here? I hope /etc/fstab will do this. May be I am missing some thing.

Thanks in advance

SJR

[Hope my post looks decent now. Even though, I cannot avoid giving a light electric blue color here. I cant digest letters in black :shame: ]

This is the scond point I mentioned: is NFS client running? Start it (and registering it for start at boot) using

chkconfig nfs on

should work.

The fact that you have a more or less crippled openSUSE does not mean that openSUSE does not support NFS entries in /etc/fstab as your title suggests. Please be carefull blaming the software where it could be your fault/lack of knowledge.

Also the fact that you do not have YaST preinstalled in your system does not mean that you can’t do this.

zypper in yast2

will instal enough of YaST to give you YaST > Software > Software managment. Maybe you have to use YaST > Software > Repository Management first to add the basic repositories.

EDIT: before doing the zypper in yast2, you must have the appropriate repository. When you want to go for this (or for installing other software from the repos) please state so and I will try to provide tthe statements to register to the repos.

Hi HVV
Thanks for the advices. I will try and update u.

Hi every body

I’m a newbie in suse.

Hope you have seen this in my first post.

And your quote says :

The fact that you have a more or less crippled openSUSE does not mean that openSUSE does not support NFS entries in /etc/fstab as your title suggests. Please be carefull blaming the software where it could be your fault/lack of knowledge.

Please do not consider my post as “blaming the s/w or distributor” as u said. Becoz I am also a TRUE Linux lover.

As I am new to this( ie suse), I do not know what suse supports and what not. Or I do not know the tips to activate these functionality. So only asking help from you guys.

If I get a suggestion from you (eg: add entry to chkconfig) , I will check my system and will try to do the necessary changes to make the option active. This is the only way to upgrade myself.

And my TITLE… How you felt its a blaiming??? :slight_smile: Its only to attract people to the subject Mr.Hvv. If some body faced the same problem any time, they can come and share their experience and their suggestions. Thats y we are using titles. Hope I should not explain more to a senior like you. This is not my first forum. I am active in other linux forums too. I do read/share/update solutions every day from them. But I am new to suse forum. That’s it.

So please take every thing professionally. Its not the place to discuss non-professional things. Bcoz like you, I am also a linux user and a lover :slight_smile:

Anyway thanks for helping me
Regards
SJR

On Mon, 06 Sep 2010 05:06:01 GMT, sjremya
<sjremya@no-mx.forums.opensuse.org> wrote:

>
>Hi HVV
>Thanks for the advices. I will try and update u.
>
>>
>> Hi every body
>>
>> I’m a newbie in suse.
>
>Hope you have seen this in my first post.
>
>And your quote says :
>
>>
>> The fact that you have a more or less crippled openSUSE does not mean
>> that openSUSE does not support NFS entries in /etc/fstab as your title
>> suggests. Please be carefull blaming the software where it could be your
>> fault/lack of knowledge.
>>
>
>Please do not consider my post as “blaming the s/w or distributor” as u
>said. Becoz I am also a TRUE Linux lover.
>
>As I am new to this( ie suse), I do not know what suse supports and
>what not. Or I do not know the tips to activate these functionality. So
>only asking help from you guys.
>
>If I get a suggestion from you (eg: add entry to chkconfig) , I will
>check my system and will try to do the necessary changes to make the
>option active. This is the only way to upgrade myself.
>
>And my TITLE… How you felt its a blaiming??? :slight_smile: Its only to attract
>people to the subject Mr.Hvv. If some body faced the same problem any
>time, they can come and share their experience and their suggestions.
>Thats y we are using titles. Hope I should not explain more to a senior
>like you. This is not my first forum. I am active in other linux forums
>too. I do read/share/update solutions every day from them. But I am new
>to suse forum. That’s it.
>
>So please take every thing professionally. Its not the place to discuss
>non-professional things. Bcoz like you, I am also a linux user and a
>lover :slight_smile:
>
>
>Anyway thanks for helping me
>Regards
>SJR

Henk, SJRemya. I have a couple of possibly useful things to say.

Henk, you seem to have missed that this an EMBEDDED Linux situation.

Both:

This has very serious implications, nothing like yast, zypper, rpm,
chconfing, exists on the target platform. It has been stripped to an
absloute minimum to get the job done. If you need added facilities to
get the job done you have to reconstruct the whole embedded linux on
the chip and then install it

JSRemya, many of the people here that might reply are comming in on
the nntp side, any bold, italics, colors, and other effects that you
so frequently in webforums simply don’t translate. Out of respect for
us please keep this in mind.

That being said you may need to get a real news reader and a real news
provider.

Then try:

comp.os.linux.embedded

out in the real wild and wooly USENET. Mucho spam, unlike this
protected place.

@JosephKK. The implications of the EMBEDDED situation was indeed not understood by me. Thanks for pointing this out.

In any case, the OP did not point out his very particular sitiation in his title. By this he failed to draw the attention the few people that know anything about these type of embedded systems.
By stating in the title that “SUSE does not support …”, things most of us know that openSUSE does support (like all Unix/Linux systems support NFS) he probably shyed away a lot of people looking seeing this title and he lured me in, trying to find out what his real problem his. I lot of time spoiled here by both of us :(.

If you know more about his embedded system and the availabliity of NFS in it, please try to help him. But could it be that, by not supporting NFS in such a system, it was the intention of the makers not to have it? Thus why trying to break this “feature”?

On 2010-09-02 11:06, sjremya wrote:
>
> Hi every body
>
> I’m a newbie in suse.

Hi,

I will try to answer some of your questions you made that are not already answered.

> Recently I got an embedded board with a ported suse linux in that.
> The processor is atmel with ARM core.

Interesting! I’m curious, what is it for, what’s its name, etc?

> Here I describe my problem:
>
> I have to mount NFS in the end of system boot time. I do not have an
> rc.local in Suse to enter all local commands to execute *at the last
> of boot. *

The equivalent scripts are:

/etc/init.d/boot.local (1)
/etc/init.d/before.local (2)
/etc/init.d/after.local (3)
/etc/init.d/halt.local (4)

(1) runs after alll the “boot.*” scripts, and before the named scrips that start services. So, you
can not use it in your case because network has not started. (3) runs after all services. That could
be the place for yours. (2) I have just discovered it, it runs before any runlevel change, and (3)
after. (4) Well, when halting. I think it runs after all services have stopped.

The difference between 1 and 2 is that 1 runs only once, 2 runs on every runlevel change.

All three scripts are intended to be written by you, and they might not exist (till you create them).

> I searched for another option, that was /etc/fstab. I tried to make
> an entry here for *nfs mount *as follows:
>
> 192.168.174.134:/NFS/NFS_SERVER /MY_MNT NFS
> RW,SOFT,BG,TIMEO=3,INTR 0 0

Code:

192.168.174.134:/nfs/nfs_server /my_mnt nfs rw,soft,bg,timeo=3,intr 0 0

Notice that features such as bold in the forum come out as “uppercase” to nntp users like me. To
the problem - I think you need:


chkconfig nfs on
chkconfig rpcbind on

I got to know about* chkconfig* command. I tried to add a script
/etc/init.d/rc.local to* chkconfig* but it given me an error as
follows:

Use another name or use after.local

To add an script, as you have noticed, the comments are important. As your machine is en embedded
one, I don’t know how much documentation you have, but if you can, have a look at
/etc/init.d/skeleton and skeleton.compat - this commented section is mandatory:


### BEGIN INIT INFO
# Provides:          FOO
# Required-Start:    $syslog $remote_fs
# Should-Start:      $time ypbind smtp
# Required-Stop:     $syslog $remote_fs
# Should-Stop:       ypbind smtp
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: FOO XYZ daemon providing ZYX
# Description:       Start FOO to allow XY and provide YZ
#       continued on second line by '#<TAB>'
#       should contain enough info for the runlevel editor
#       to give admin some idea what this service does and
#       what it's needed for ...
#       (The Short-Description should already be a good hint.)
### END INIT INFO

The lines define when a particular script should run. The traditional symlinks are in fact ignored,
and can be deleted later if you create them manually.

This is explained in “/etc/init.d/README”, “man init.d”, and in a chapter of the PDF/HTML manual
included with the distribution.

>
> -service rc.local does not support chkconfig-
>
> HOW TO ADD RC.LOCAL IN CHKCONFIG LIST ??? CHKCONFIG --ADD
> RC.LOCAL FAILED]
>
> FINALLY, I MODIFIED */ETC/INIT.D/RCS *FILE AS FOLLOWS:

I think that “rcs” script is a modification of your machine, it is not standard (in a suse). I don’t
have it.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

On 2010-09-12 11:06, hcvv wrote:

> If you know more about his embedded system and the availabliity of NFS
> in it, please try to help him. But could it be that, by not supporting
> NFS in such a system, it was the intention of the makers not to have it?
> Thus why trying to break this “feature”?

Hint: notice the portmap error he posted, when trying to mount via fstab (5th post). :wink:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

Good evening all

@all : Thanks for the concern
@HVV : Hi I’m back with a new title :slight_smile:

So its not possible to make an /etc/fstab entry for NFS mounting without using yast ???

My /etc/fstab entry as follows :


192.168.174.134:/nfs/nfs_server /my_mnt nfs rw,soft,bg,timeo=3,intr 0 0

I would like to remind you how I made /etc/fstab entry worked and how I made nfs mounting. I given the following commands manually in command prompt[As mentioned in my 1st post]


portmap &
mount /my_mnt

And after that, I was able to access nfs mounted files.
I do not want to enter any thing in command prompt.I Read that an /etc/fstab entry will do ‘mounting’ automatically. How to achieve that??
Regards
SJR

Good evening all

@all : Thanks for the concern
@HVV : Hi I’m back with a new title :slight_smile:

So it’s not possible to make an /etc/fstab entry for NFS mounting without using yast ??? My OS is in an atmel board with limited memory]

My /etc/fstab entry as follows :


192.168.174.134:/nfs/nfs_server /my_mnt nfs rw,soft,bg,timeo=3,intr 0 0

I would like to remind you how I made /etc/fstab entry worked and how I made nfs mounting. I given the following commands manually in command prompt[As mentioned in my 1st post]


portmap &
mount /my_mnt

And after that, I was able to access nfs mounted files.
I do not want to enter any thing in command prompt.I Read that an /etc/fstab entry will do ‘mounting’ automatically. How to achieve that??
Regards
SJR

I would like to mention one more thing here mentioned already in post 1 ]. Re posting here to prove that, NFS mounting can be done here using other ways also. I have done it for the same AT91sam9260 board .

Finally, I modified /etc/init.d/rcS file as follows:

-> Initialize the network ( eth0 up) with a delay, say 500 msec
-> After the delay, mounted NFS using the following command

mount -t nfs -o nolock <nfs_server> <my_mnt>  

( the given delay used to make network stable)

I need to know how it can be done using /etc/fstab support. Hope now you guys would have identified the scenario in which I’m.

Thanks in advance
SJR

As you know I do not know much about your embeded system. But normaly when one has an entry like yours in /etc/fstab, it is there to be used at boot. And your NFS file system will be mounted at boot.

There are of course some prerequisits (like: mount point must exist, NFS/Portmapper must run), but as you can mount it with a mount statement, this seems all to be OK. Thus I see no problem for the system to mount at every boot (except when the NFS server is unreachable).

Also, it does not matter how the entry got into /etc/fstab, either by using YaST, or by using an editor or w hatever, the fact that it is thre is enough.

On 2010-09-13 16:26, sjremya wrote:

> I need to know how it can be done using /etc/fstab support. Hope now
> you guys would have identified the scenario in which I’m.

I replied to that yesterday, look it up.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

@HVV : thanks.
@Carlos :

I have seen the reply u posted yesterday. thank u very much.

You mentioned about .local files there. But nothing about /etc/fstab. As this is the standard mounting option, I would like to use /etc/fstab entry. Please go thru the steps I have done for fstab entry. Why does it fail? The entry is working because, I can mount the nfs with out following mount command format. ie , after fstab entry,


mount /my_mnt

will do the mounting instead of giving

mount -t nfs -o nolock <nfs_server> <my_mnt>

.

But I do not want a manual ‘mount /my_mnt’ command.

Hope a reply only wrt fstab entry

Regards
SJR

On 2010-09-14 15:40, sjremya wrote:

> I have seen the reply u posted yesterday. thank u very much.
>
> You mentioned about .local files there. But nothing about /etc/fstab.
> As this is the standard mounting option, I would like to use /etc/fstab
> entry. Please go thru the steps I have done for fstab entry. Why does it
> fail? The entry is working because, I can mount the nfs with out
> following mount command format. ie , after fstab entry,

I told you you have to activate certain two services. Read my post again…


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))

Hi Carlos

In your post, you mentioned about chkconfig and activate certain services for that. Its as follows:

chkconfig nfs on
chkconfig rpcbind on

Does it has any connection with /etc/fstab? Kindly revert back.

Please read my latest post/query about /etc/fstab entry. I expect a reply wrt fstab NOT wrt chkconfig

Thanks in advance.

Regards
SJR

On 2010-09-16 09:06, sjremya wrote:
>
> Carlos E. R.;2223124 Wrote:

>> I told you you have to activate certain two services. Read my post
>> again…

> Hi Carlos
>
> In your post, you mentioned about chkconfig and activate certain
> services for that. Its as follows:
>
>
> Code:
> --------------------
> chkconfig nfs on
> chkconfig rpcbind on
> --------------------

That.

> Does it has any connection with /etc/fstab? Kindly revert back.

Yes, it does.

> Please read my latest post/query about /etc/fstab entry. I expect a
> reply wrt fstab NOT wrt chkconfig

That’s the reply with regard to fstab.

Don’t argue. Do it, if it works or if it doesn’t, report, and then ask why - but I already said why
several posts ago.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))