nfsd with chroot debian.

307 views
Skip to first unread message

robert

unread,
Aug 17, 2010, 1:11:15 PM8/17/10
to DealExtreme NAS
Hi,

Has anyone success with snake nfs server?
With chroot debian leny made by Pinguino7 I activate nfsd without
error message

Starting portmap daemon...Already running..
Starting NFS common utilities: statd.
Starting NFS servers: nfsd mountd.
program vers proto port
100000 2 tcp 111 portmapper
100024 1 udp 2076 status
100024 1 tcp 4514 status
100003 2 udp 2049 nfs
100003 2 tcp 2049 nfs
100005 1 udp 1007 mountd
100005 2 udp 1007 mountd
100005 1 tcp 1008 mountd
100005 2 tcp 1008 mountd


but mounting nfs on other machine doesn't work: error message:

root@big:/home/b# mount -t nfs 192.168.178.30:/mnt/sda1 /mnt/snfs/
mount.nfs: mount to NFS server '192.168.178.30:/mnt/sda1' failed: RPC
Error: Success

which is strange.

Maybe Spanish webpages could help but I don't understand -even with
google translate.

Regards,
Robert

yk42b7

unread,
Aug 17, 2010, 3:38:58 PM8/17/10
to DealExtreme NAS
Didn't you get an error during apt-get ? It seems snake os kernel
don't have nfs support.

pinguino7

unread,
Aug 17, 2010, 3:55:47 PM8/17/10
to DealExtreme NAS
Hello Robert .

Posible error ;

Mount usb/sda1 etc ....none , correct is /usb/lenny

After your change with WinSCP ( Win-DOS ) edit 4 files ;

/usb/lenny/etc/host ( IP your machine )
/usb/lenny/etc/exports ( IP machine/DreamBOX )
/usb/lenny/etc/network/interfaces ( IP NAS and gateway )
/usb/lenny/etc/resolv.conf ( IP gateway router ( nameserver
192.168.x.xxx ))


Later start my script

1/ ---> cd /
2/ ---> sh /usb/lenny/start.sh

In the futurewe will realise a translation to English the my manual


Enjoy bests regards . Pinguino7



robert

unread,
Aug 18, 2010, 2:51:22 AM8/18/10
to DealExtreme NAS
Hi,

> Didn't you get an error during apt-get ? It seems snake os kernel
don't have nfs support.

Pinguino7 made this chroot debian, and preinstall all NFS related deb
packages.
Probably He didn't get error messages while apt-get.
Pinguino7 is that true?

The SNAKE OS V1.1.0 (20100613) kernel has no nfsd module.
# more /lib/modules/2.6.16-gazineu/modules.dep
kernel/arch/arm/mach-str8100/resetbutton.ko:
kernel/fs/vfat/vfat.ko: kernel/fs/fat/fat.ko
kernel/fs/fat/fat.ko:

As I know nfsd.ko is needed for nfs daemon.
Pinguino7 what is your opinion?

Regards,
Robert

robert

unread,
Aug 18, 2010, 3:28:15 AM8/18/10
to DealExtreme NAS
Hi Pinguino7,

Thanks for your fast reply. :)
> Mount usb/sda1 etc ....none  , correct is  /usb/lenny

My debian lenny directory is under /usb/sda1/deblen/
therefore I modified your start.sh with this:

mount -o bind /proc /usb/sda1/deblen/proc
mount -o bind /dev /usb/sda1/deblen/dev
mount -o bind /lib/modules /usb/sda1/deblen/lib/modules
mount -o bind /usb/sda1 /usb/sda1/deblen/mnt/sda1
chroot /usb/sda1/deblen /bin/bash

I assume it should be all right.

I modified config files, except /etc/network/interfaces. Now it is
also done .
Nas restarted.
start.sh started

But mount failed again.

Where should be a log to see what is the problem?

Regards,
Robert

pinguino7

unread,
Aug 18, 2010, 9:58:18 AM8/18/10
to DealExtreme NAS
Hi Robert check you file start.sh

My file ;

mount -o bind /proc /usb/lenny/proc
mount -o bind /dev /usb/lenny/dev
mount -o bind /lib/modules /usb/lenny/lib/modules
chroot /usb/lenny/ /bin/bash

You file ;

> mount -o bind /proc /usb/sda1/deblen/proc
> mount -o bind /dev /usb/sda1/deblen/dev
> mount -o bind /lib/modules /usb/sda1/deblen/lib/modules
> mount -o bind /usb/sda1 /usb/sda1/deblen/mnt/sda1 <------- ( to erase this )
> chroot /usb/sda1/deblen /bin/bash

File start.sh assures 775 permissions

Regards . Pinguino7

pinguino7

unread,
Aug 18, 2010, 10:06:49 AM8/18/10
to DealExtreme NAS
Robert ,
you file correct start.sh as ;


mount -o bind /proc /usb/sda1/deblen/proc
mount -o bind /dev /usb/sda1/deblen/dev
mount -o bind /lib/modules /usb/sda1/deblen/lib/modules
chroot /usb/sda1/deblen/ /bin/bash


Copy and paste .
Regards .




robert

unread,
Aug 18, 2010, 4:37:17 PM8/18/10
to DealExtreme NAS
Hi Pinguino7,

Thanks for your help.

mount -o bind /usb/sda1 /usb/sda1/deblen/mnt/sda1
is only for the whole partition access within chrooted debian.
It is not relevant to nfsd.

As I realised it is user space nfsd, so I don't need to compile own
kernel is it true?

Can you please send your lsmod and ps ax output within chrooted env?

Do you know where are the logs or how to increase debuging level?

Regards,
Robert

pinguino7

unread,
Aug 18, 2010, 7:48:09 PM8/18/10
to DealExtreme NAS
Hi Robert ,

None compiled NFS on kernel , with my image Debian-Lenny 5.0.3 running
server NFS on chroot ...

Please I have created on my forum / page see http:wlx652.com one Howto
for English Choot Debian-Lenny .

Please check or register you do not worry very easy .

Check sub-forum name = English Service Chroot

Best regards . ;) pinguino7

robert

unread,
Aug 19, 2010, 5:28:45 PM8/19/10
to DealExtreme NAS
Hi Pinguino7.

I follow your guide. which is very good anyway :)

I tried my best, but no success.

sh-3.2# nfsstat -s
Error: No Server Stats (/proc/net/rpc/nfsd: No such file or
directory).

Can you please send your export, lsmod and ps ax output within
chrooted env?

Do you know where are the logs and how to increase debuging level?

Regards, Robert


pinguino7

unread,
Aug 19, 2010, 6:57:19 PM8/19/10
to DealExtreme NAS
You do not use my Debian-Lenny system Therefore I cannot but help

If in console you have ; sh-3.2#

( On my system is : snake# ) hummmmmmmmmm .......

You have Debian 4.0 ( Never to never obtain Server NFS )

Please so that you do not change and she follows my Howto ?
Greetings.

Testing first you my howto and later I can help. Server NFS and Webmin
this present, please you say if you work to him. Thanks

Regards . ;) pinguino7

adam

unread,
Aug 20, 2010, 3:07:20 AM8/20/10
to DealExtreme NAS
I have not tried nfs on snake but did recently set it up an another
debian based system.
That kernel was not compiled for nfs (I'm guessing the same is true
for snake), so I had to use the nfs-user-server
package, not the kernel version.

apt-get install nfs-user-server

Edit /etc/hosts.allow to look something like this:
lockd: 192.168.1.0/255.255.255.0
rquotad: 192.168.1.0/255.255.255.0
mountd: 192.168.1.0/255.255.255.0
statd: 192.168.1.0/255.255.255.0

... and /etc/hosts.deny
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

and .../etc/exports
/somedir 192.168.1.5(rw)
# allows access from my pc (192.168.1.5).

After rebooting, from the client:
mount -o nfsvers=2 snake-ip:/somedir /mnt/tmp

On my system this only works when I have the "nfsvers=2".

Hope that helps.

robert

unread,
Aug 20, 2010, 12:34:59 PM8/20/10
to DealExtreme NAS
Hi Adam,

With your help I was able to eliminate RPC error. The key is nfsvers=2
as reported many other people using user space nfs also.

With some more googleing Now I was able to increase debug level.
on client side:
rpcdebug -m nfs -s all # set debug level ; check dmesg
showmount -e 192.168.178.30
mount -o nfsvers=2,ro 192.168.178.30:/mnt/sda1 /mnt/snfs

Unfortunately mount not yet working.
Now I had another issue:
[ 632.625651] NFS: nfs mount opts='nfsvers=2,addr=192.168.178.30'
[ 632.625660] NFS: parsing nfs mount option 'nfsvers=2'
[ 632.625669] NFS: parsing nfs mount option 'addr=192.168.178.30'
[ 632.625680] NFS: MNTPATH: '/mnt/sda1'
[ 632.625683] NFS: sending MNT request for 192.168.178.30:/mnt/sda1
[ 632.636527] NFS: MNT request succeeded
[ 632.636546] --> nfs_init_server()
[ 632.636550] --> nfs_get_client(192.168.178.30,v2)
[ 632.636556] --> nfs_get_client() = f1cf9a00 [new]
[ 632.644078] <-- nfs_init_server() = 0 [new f1cf9a00]
[ 632.644082] --> nfs_probe_fsinfo()
[ 632.644085] NFS call fsinfo
[ 632.646566] NFS reply fsinfo: -116
[ 632.646569] nfs_probe_fsinfo: error = 116
[ 632.646572] --> nfs_free_server()
[ 632.646598] --> nfs_put_client({1})
[ 632.646602] --> nfs_free_client(2)
[ 632.646637] <-- nfs_free_client()
[ 632.646650] <-- nfs_free_server()

where -nfs_probe_fsinfo: error = 116 - means a strange error. didn't
find any reason yet.
Next step will be some read only flag, maybe right problem?

Regards,
Robert

robert

unread,
Aug 20, 2010, 12:41:45 PM8/20/10
to DealExtreme NAS
Hi,

> sh-3.2#
It is only because I didnt start bash within chroot.

>>  Please so that you do not change and she follows my Howto ?
Who is she? I don't understand sorry.

I requested your working config files, but Adam provided some help,
thanks.

Please send ps ax, and lsmod output.

Regards,
Robert

adam

unread,
Aug 20, 2010, 11:48:37 PM8/20/10
to DealExtreme NAS
Robert-

116 may be an "ESTALE" error.

http://nfs.sourceforge.net/ lists 5 causes - take a look, but if your
exported file system is FAT, that's likely to be your issue now:

"# The exported file system doesn't support permanent inode numbers.
Exporting FAT file systems via NFS is problematic for this reason.
This problem can be avoided by exporting only local filesystems which
have good NFS support. See question C6 for more information."

robert

unread,
Aug 21, 2010, 10:04:24 AM8/21/10
to DealExtreme NAS
Hi Adam,

Thanks for that help.
Unfortunately it is Not FAT, but ext3 created by snake.

I read some in that site, but I don't have any idea.

So question again:
Is there anybody who can mount a directory with user space NFS served
by SNAKE?

Snake chrooted debian is here:
http://wlx652.discoversweb.com.ar/index.php?topic=80.0

If someone is succeeded please help me.

Regards,
Robert




On Aug 21, 5:48 am, adam <ajv...@gmail.com> wrote:
> Robert-
>
> 116 may be an "ESTALE" error.
>
> http://nfs.sourceforge.net/lists 5 causes - take a look, but if your

pinguino7

unread,
Aug 21, 2010, 6:46:18 PM8/21/10
to DealExtreme NAS
Hi ,

Exact
If you want Server NFS with chroot she Debian etch 4.0 uses ;

Add on file /etc/apt/sources.list

###########################################

deb http://ftp2.fr.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free

###########################################

On Putty or Telnet console uses ;

apt-get updade
apt-get upgrade
apt-get install portmap nfs-common nfs-user-server

Your file configuration is locate ; /etc/exports

See example file ;

###########################################

i# /etc/exports: the access control list for filesystems which may be
exported

/var/multiboot/ -alldirs -mapall=root -network 192.168.x.xxx(rw) -mask
255.255.255.0

1/ /var/multiboot is the machine you export files NFS
2/ 192.1.x.xxx is IP machine you export files NFS
3/ (rw) is Read/Write

Regards . pinguino7

robert

unread,
Aug 22, 2010, 3:57:55 PM8/22/10
to DealExtreme NAS
Hi Pinguino7

Yes!!. :)
Thanks for that help. With your export file I was able to mount NFS.

But I can't mount my original directory yet, the /usb/sda1.
Probably it is related to access right problems somehow.
Thank you very much for that help, I saw it is working, so I try to
step forward.

Some small notes.
1 > apt-get updade small mistype: update

2. You don't need
> apt-get install portmap nfs-common nfs-user-server
because they are already the newest in Your chrooted debian package.

Regards,
Robert.


On Aug 22, 12:46 am, pinguino7 <pinguin...@gmail.com> wrote:
> Hi ,
>
> Exact
>
> > Snake chrooted debian is here:http://wlx652.discoversweb.com.ar/index.php?topic=80.0
>
> If you want Server NFS with chroot she  Debian etch 4.0 uses ;
>
> Add on file  /etc/apt/sources.list
>
> ###########################################
>
> debhttp://ftp2.fr.debian.org/debian/lenny main contrib non-free
> debhttp://security.debian.org/lenny/updates main contrib non-free

Joakim Berge

unread,
Aug 22, 2010, 5:25:06 PM8/22/10
to dealextr...@googlegroups.com
Hi
/usb/sda1 is not a directory, its a mount point.
I dont think you can share that usig nfs or samba, you need to share a
dir inside that mount point.

Please correct me if im wrong.

- Joakim

> --
> You received this message because you are subscribed to the Google
> Groups "DealExtreme NAS" group.
> To post to this group, send email to dealextr...@googlegroups.com
> To unsubscribe from this group, send email to
> dealextreme-na...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/dealextreme-nas-?hl=en

robert

unread,
Aug 23, 2010, 4:16:43 AM8/23/10
to DealExtreme NAS
Hi,

I was wrong. Sorry.
I tried to share /mnt/sda1 which is a pre mounted point in chrooted
env. (My chroot start script mount sda1 with loop before chroot. see
5th message above in this thread. )

Theoretically and (in my practice :) should work. (exactly: I do it
with my PC. A mounted point shared by nfs. )
I tried to share a subdirectory from /mnt/sda1 also but same error
message occured.

I will try different g/uid setting maybe that helps. and try to mount
sda within.
I'm happy because since I have debug feature ( rpcdebug -m nfs -s
all ) so I hope I will find the solution. :)

Message to all:
---------------------
Chrooted Debian package - created by Pinguino7 - is excellent, I
recommend to all. :)
http://wlx652.discoversweb.com.ar/index.php?topic=80.0

Regards,
Robert

pinguino7

unread,
Aug 26, 2010, 7:59:55 PM8/26/10
to DealExtreme NAS
Thanks you Robert for write you have NFS server running .


> Message to all:
> ---------------------
> Chrooted Debian package - created by Pinguino7 - is excellent, I
> recommend to all. :)http://wlx652.discoversweb.com.ar/index.php?topic=80.0
>
> Regards,
> Robert


Are good for knowing you have you it well

Best Regards . Pinguino7


robert

unread,
Aug 27, 2010, 5:34:54 AM8/27/10
to DealExtreme NAS
Hi Pinguino7,

Thanks for your help again.

I made some changes in your CHRDEB I have removed "some" packages from
it.
The goal was push the size under the 100MB.
I did it :)

It seemed to me have sense to remove X11 support from that package -
NS-K330 doesn't have graphical chip.
I assume it was needed only because your personal favorite -plowdown
need some OCR support which -I assume- depends on TTFonts, and many
other packages.
Unfortunately they are all removed as dependency when I removed Xorg
package.
Anyway the size is matter, :) It is under 100MB, so Im happy.

I'll distribute this trimmed chroot debian soon.

Regards,
Robert

dersu uzala

unread,
Aug 28, 2010, 10:16:10 AM8/28/10
to DealExtreme NAS
What is the benefit of running debian besides the ability to install
progs - the ram is very limited as it is.
Can any one give some ideas as to what it might be used for ?

Thanks

robert

unread,
Aug 29, 2010, 4:42:06 AM8/29/10
to DealExtreme NAS
Hi,

CHROORT is easiest way to expand features of NAS.
If you want use any program which is not in SNAKEOS you have 3 option:

1. Get an ARM binary and copy to USB storage. Like unrar
http://code.google.com/p/snake-os/downloads/detail?name=unrar&can=2&q=
But unfortunately most of ARM binaries don't run on NAS becasuse of
library dependences.

2 You can compile. But needs deep linux, and embeded system
knowledges.

3. chroot debian. ~5000 compiled binary is available. DEBIAN Lenny is
very compact and dependences are well built.
very easy to add new package just issue: apt-get install packagename.

bye,
Robert
Reply all
Reply to author
Forward
0 new messages