public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Problems with NFS server
@ 2006-06-16  8:13 Nicolas Boudin
  2006-06-16 16:37 ` Sam Robb
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Boudin @ 2006-06-16  8:13 UTC (permalink / raw)
  To: cygwin; +Cc: Sam Robb


> -----Original Message-----
> From: Sam Robb
> Sent: donderdag 15 juni 2006 19:54
> To: Nicolas Boudin
> Cc: cygwin@cygwin.com
> Subject: Re: Problems with NFS server
> 
> 
> On Thu, 2006-06-15 at 15:36 +0200, Nicolas Boudin wrote:
> > Hello,
> > 
> > I am trying to export via NFS a cygwin directory as a root 
> > filesystem for an embedded Linux system (I hope it can work..)
> 
> It should - that's the whole reason I ported it for cygwin in 
> the first place :-)

This is encouraging. :)

> Could you post your /etc/exports file, please?

I gave the only uncommented line from this file, that is:
/usr/src/buildroot-20060308/build_arm/root	172.16.7.65(rw,no_root_squash)

If I try to mount a random directory, like just /usr, I get the expected result that it is blocked:
Root-NFS: Server returned error -13 while mounting /usr/

Nicolas

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Problems with NFS server
  2006-06-16  8:13 Problems with NFS server Nicolas Boudin
@ 2006-06-16 16:37 ` Sam Robb
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Robb @ 2006-06-16 16:37 UTC (permalink / raw)
  To: Nicolas Boudin; +Cc: cygwin

> > On Thu, 2006-06-15 at 15:36 +0200, Nicolas Boudin wrote:
> > > Hello,
> > > 
> > > I am trying to export via NFS a cygwin directory as a root 
> > > filesystem for an embedded Linux system (I hope it can work..)
> > 
> > It should - that's the whole reason I ported it for cygwin in 
> > the first place :-)
> 
> This is encouraging. :)
> 
> > Could you post your /etc/exports file, please?
> 
> I gave the only uncommented line from this file, that is:
> /usr/src/buildroot-20060308/build_arm/root	172.16.7.65(rw,no_root_squash)
> 
> If I try to mount a random directory, like just /usr, I get the expected result that it is blocked:
> Root-NFS: Server returned error -13 while mounting /usr/

Nicolas,

  Could you please try adding a map_static directive to your exports?
It should then look something like this:

/usr/src/buildroot-20060308/build_arm/root
172.16.7.65(rw,map_static=/etc/nfs/server.map,no_root_squash)

  If you ran the nfs-server-config script to set up the nfs-server, then
you should already have an /etc/nfs/server.map file that was created for
you by the setup script.  If not, you can create it, with the following
contents:

----- CUT -----
# Sample server map for nfsd
#
# This file maps 500/500 on an NFS client to the uid/gid of the
# user who ran nfs-server-config, and maps 0/0 on an NFS client
# the uid/gid of the Administrator account.
#
# Note that a server map is host-specific (which makes sense,
# if you think about it...)  So you can only use a plain IP
# address or DNS name to specify a client that uses a static_map.
#
# Examples of valid /etc/exports lines using map_static:
#
#   /gaunt   192.168.1.42(map_static=/etc/nfs/server.map)
#   /chaney  twilley(map_static=/etc/nfs/server.map)
#
uid     500     xxxxx   # user id - replace 'xxxxx'
gid     500     yyyyy   # group id - replace 'yyyyy'
uid     0       500     # user id for Administrator
gid     0       513     # group id for Administrator
----- CUT -----

  If you're having to create the server.map for your export by hand, you
will have to replace 'xxxxx' with the number reported by 'id -u
${USERNAME}' and 'yyyyy' with the number reported by 'id -g
${USERNAME}', ex:

  $ id -u ${USERNAME}
  <use this number to replace xxxxx in the above server.amp file>
  $ id -g ${USERNAME}
  <use this number to replace yyyyy in the above server.amp file>

-Samrobb



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Problems with NFS server
@ 2006-06-21  8:47 Nicolas Boudin
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Boudin @ 2006-06-21  8:47 UTC (permalink / raw)
  To: Sam Robb; +Cc: cygwin


Hello,

>   - If I'm understanding you correctly, it seems like your server.map
> didn't get created properly.  For the administrator uid and 
> gid entries,
> there should definitely be a mapping of id '0' to the 
> appropriate cygwin
> system administrator uid/gid.  You can find these using 'id -u
> administrator' and 'id -g administrator' from a cygwin bash shell.  If
> these aren't present, then the NFS server may have a problem obtaining
> permissions to read/write files on the NFS mount.

I have put correct values here now.

>   - In your original message, you mentioned that you are 
> running Windows
> XP.  Do you have a firewall running on that system that might be
> interfering with NFS? You'll need to make sure that ports 111 and 2049
> are open for TCP and UDP traffic.  Microsoft provides 
> information about
> opening ports in the Windows XP Internet Connection Firewall on their
> web site at http://www.microsoft.com/security/protect/ports.asp.

These ports are open. I don't understand why NFS transfers work with U-Boot but not with the kernel.

File Monitor told me nfsd was failing to open the C:/ directory (my cygwin is in C:/local), so it looks like it was a permission problem, but everything was allowed for members of my Administrators group, like my nfs user who is running the NFS services. So it is strange it didn't report me an "acces denied" error.

Now it goes a bit further, it can mount the root filesystem at last, and I get other errors about device files, but this is another problem. ;)

Thanks a lot!

Nicolas

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Problems with NFS server
  2006-06-19 10:45 Nicolas Boudin
@ 2006-06-20 16:33 ` Sam Robb
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Robb @ 2006-06-20 16:33 UTC (permalink / raw)
  To: Nicolas Boudin; +Cc: cygwin

On Mon, 2006-06-19 at 12:21 +0200, Nicolas Boudin wrote:
> >   Could you please try adding a map_static directive to your exports?
> > It should then look something like this:
> > 
> > /usr/src/buildroot-20060308/build_arm/root
> > 172.16.7.65(rw,map_static=/etc/nfs/server.map,no_root_squash)
> > 
> >   If you ran the nfs-server-config script to set up the 
> > nfs-server, then
> > you should already have an /etc/nfs/server.map file that was 
> > created for
> > you by the setup script.  If not, you can create it, with the 
> > following contents:
> > 
> > ----- CUT -----
> > # Sample server map for nfsd
> > #
> > # This file maps 500/500 on an NFS client to the uid/gid of the
> > # user who ran nfs-server-config, and maps 0/0 on an NFS client
> > # the uid/gid of the Administrator account.
> > #
> > # Note that a server map is host-specific (which makes sense,
> > # if you think about it...)  So you can only use a plain IP
> > # address or DNS name to specify a client that uses a static_map.
> > #
> > # Examples of valid /etc/exports lines using map_static:
> > #
> > #   /gaunt   192.168.1.42(map_static=/etc/nfs/server.map)
> > #   /chaney  twilley(map_static=/etc/nfs/server.map)
> > #
> > uid     500     xxxxx   # user id - replace 'xxxxx'
> > gid     500     yyyyy   # group id - replace 'yyyyy'
> > uid     0       500     # user id for Administrator
> > gid     0       513     # group id for Administrator
> > ----- CUT -----
> 
> This file was properly created with correct xxxxx and yyyyy. For Administrator I had only:
> uid 0
> gid 0
> but the map_static directive don't seem to have any influence on my error.

Sorry about the delay in responding, Nicolas.

Some things to check:

  - If I'm understanding you correctly, it seems like your server.map
didn't get created properly.  For the administrator uid and gid entries,
there should definitely be a mapping of id '0' to the appropriate cygwin
system administrator uid/gid.  You can find these using 'id -u
administrator' and 'id -g administrator' from a cygwin bash shell.  If
these aren't present, then the NFS server may have a problem obtaining
permissions to read/write files on the NFS mount.

  - In your original message, you mentioned that you are running Windows
XP.  Do you have a firewall running on that system that might be
interfering with NFS? You'll need to make sure that ports 111 and 2049
are open for TCP and UDP traffic.  Microsoft provides information about
opening ports in the Windows XP Internet Connection Firewall on their
web site at http://www.microsoft.com/security/protect/ports.asp.

-Samrobb



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Problems with NFS server
@ 2006-06-19 10:45 Nicolas Boudin
  2006-06-20 16:33 ` Sam Robb
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Boudin @ 2006-06-19 10:45 UTC (permalink / raw)
  To: cygwin; +Cc: Sam Robb


>   Could you please try adding a map_static directive to your exports?
> It should then look something like this:
> 
> /usr/src/buildroot-20060308/build_arm/root
> 172.16.7.65(rw,map_static=/etc/nfs/server.map,no_root_squash)
> 
>   If you ran the nfs-server-config script to set up the 
> nfs-server, then
> you should already have an /etc/nfs/server.map file that was 
> created for
> you by the setup script.  If not, you can create it, with the 
> following contents:
> 
> ----- CUT -----
> # Sample server map for nfsd
> #
> # This file maps 500/500 on an NFS client to the uid/gid of the
> # user who ran nfs-server-config, and maps 0/0 on an NFS client
> # the uid/gid of the Administrator account.
> #
> # Note that a server map is host-specific (which makes sense,
> # if you think about it...)  So you can only use a plain IP
> # address or DNS name to specify a client that uses a static_map.
> #
> # Examples of valid /etc/exports lines using map_static:
> #
> #   /gaunt   192.168.1.42(map_static=/etc/nfs/server.map)
> #   /chaney  twilley(map_static=/etc/nfs/server.map)
> #
> uid     500     xxxxx   # user id - replace 'xxxxx'
> gid     500     yyyyy   # group id - replace 'yyyyy'
> uid     0       500     # user id for Administrator
> gid     0       513     # group id for Administrator
> ----- CUT -----

This file was properly created with correct xxxxx and yyyyy. For Administrator I had only:
uid 0
gid 0
but the map_static directive don't seem to have any influence on my error.

I have seen that I can transfer files through NFS from the u-boot bootloader on the same board. It looks like it takes more time, there is a latency of about 5 seconds before the beginning of the transfer and at the end, so I tried to play with the timeo option in the kernel arguments, without any effect.

Thank you,

Nicolas

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with NFS server
  2006-06-15 13:55 Nicolas Boudin
@ 2006-06-15 17:57 ` Sam Robb
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Robb @ 2006-06-15 17:57 UTC (permalink / raw)
  To: Nicolas Boudin; +Cc: cygwin

On Thu, 2006-06-15 at 15:36 +0200, Nicolas Boudin wrote:
> Hello,
> 
> I am trying to export via NFS a cygwin directory as a root filesystem for an embedded Linux system (I hope it can work..)

It should - that's the whole reason I ported it for cygwin in the first
place :-)

Could you post your /etc/exports file, please?

-Samrobb


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Problems with NFS server
@ 2006-06-15 13:55 Nicolas Boudin
  2006-06-15 17:57 ` Sam Robb
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Boudin @ 2006-06-15 13:55 UTC (permalink / raw)
  To: cygwin


Hello,

I am trying to export via NFS a cygwin directory as a root filesystem for an embedded Linux system (I hope it can work..), but I get problems. I installed the NFS services properly on Windows XP (nfsd, portmap, mountd). As indicated in the install script, they are running as an user that I created, member of the Administrators group. The Linux system can use an NFS root filesystem from a Linux PC without any problem, so my configuration should be OK. I use the NFS cygwin package version 2.3-4.

My kernel command line is:
console=ttyCL1 root=/dev/nfs nfsroot=172.16.20.245:/usr/src/buildroot-20060308/build_arm/root ip=172.16.7.65

At boot I get the following messages:
(...)
eth0: using half-duplex 10Base-T (RJ-45)
IP-Config: Guessing netmask 255.255.0.0
IP-Config: Complete:
      device=eth0, addr=172.16.7.65, mask=255.255.0.0, gw=255.255.255.255,
     host=172.16.7.65, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=172.16.20.245, rootpath=
Looking up port of RPC 100003/2 on 172.16.20.245
Looking up port of RPC 100005/1 on 172.16.20.245
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

It waits for about 3 seconds after the "Looking up..." lines and then it gives this error.

All I get in my logs on my server are these messages:
15:01:54: mountd: PID 4064: NFS mount request received (/usr/src/buildroot-20060308/build_arm/root, from 172.16.7.65).
15:01:58: mountd: PID 4064: NFS mount request completed (/usr/src/buildroot-20060308/build_arm/root, from 172.16.7.65).

I am exporting a directory with correct permissions, my /etc/exports contains:
/usr/src/buildroot-20060308/build_arm/root	172.16.7.65(rw,no_root_squash)

What is strange is that I don't get any error from nfsd.

If you have any idea... Thanks in advance for any help.

Nicolas

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-06-21  8:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-16  8:13 Problems with NFS server Nicolas Boudin
2006-06-16 16:37 ` Sam Robb
  -- strict thread matches above, loose matches on Subject: below --
2006-06-21  8:47 Nicolas Boudin
2006-06-19 10:45 Nicolas Boudin
2006-06-20 16:33 ` Sam Robb
2006-06-15 13:55 Nicolas Boudin
2006-06-15 17:57 ` Sam Robb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).