You are not logged in.
Pages: 1
Slitaz 4.0 stable
Recently I've been playing a bit with NFS on RaspberryPi (Wheezy), Slitaz-ARM and a laptop withv4.0.
In my setup a raspberry pi is acting as the server hosting a USB drive.
All works fine after mounting the shares but then I attempted to take it one step further i.e. mounting nfs shares at boot. Apparently nobody has ever tried this because the implementation is broken on all slitaz versions.
Running the NFS daemons is a prerequisite to mount nfs shares but networking is still not initialized when /etc/fstab is processed. As a result, there is no way you will be able to mount anything nfs. Where fstab is checked in my Bootlog it says:
mount: RPC: Unable to send; errno = Network is unreachable
mount: mounting rpi:/usb1 on /usb1 failed: Bad file descriptor
We need to edit /etc/init.d/rcS to fix this problem. The fix is to add another mount command near the end of the file. For v4.0 this seems to be rather time critical. It works only when I put the mount after the "Welcome to your box" message. I have attached modified versions for v4.0 stable and Slitaz-RaspberryPi. The latter is named rcSmod.
/emgi
EDIT: @#$%^ I thought it would be possible to at least upload these simple plain text files but alas. Thus far I have never been able to upload anything here and it is becoming a nuisance. Perhaps time to get this fixed?
Anyway; In case anyone wants these files, just leave a reply and I will make them available.
Offline
Hi emgi,
Sorry, I have no access to the forum configs. Anyway, I do not know how to fix wordpress forums.
As a side note I can only suggest you to use paste.slitaz.org to share your text files.
Offline
OK. It's there. Valid for one month.
For Sliaz-ARM:
http://paste.slitaz.org/?73692ccaedeae2b0#Hw/QhDlbY2fD7urL3yzNACNkpuFntBuvV6JUa6FDF2M=
For v4.0 stable:
http://paste.slitaz.org/?7ff817e583a9b0a3#Z1YCPwna45ajB8V1T3M2GoJsWuFxaU+yanb8OpSVSIg=
/emgi
Thnx Aleksej ;-)
Offline
[c]vi /etc/init.d/local.sh[/c]
Slitaz-4.0
/etc/init.d/portmap start
mount <nfs.server ip addr>:<exported.share> <local.mnt.folder>
Cooking/5.0 (mount.nfs is broken but busybox mount works)
/etc/init.d/portmap start
busybox mount <nfs.server ip addr>:<exported.share> <local.mnt.folder>
Qemu running slitaz-arm is not bridged to the local net the nfs-server is on so I couldn't test.
Offline
Hi Mojo,
Thank you for your interest in this subject. Your proposal undoubtedly works as well but I have my nfs shares in /etc/fstab which I think is where they should be. NFS is started via the init.d script (nfsd) as per the original design. This also starts the portmapper.
The only thing that has changed is the moment at which the mount is attempted. Using /etc/init.d/local.sh or the similar rc.local is not (IMHO) the recommended way to start system services like nfs. Not sure why but at least that's what you can find as the general opinion on many linux forums. If I am saying something silly here(?) then at least I'm not on my own.
One more improvement that just popped into my mind is to run the first mount -a with the option -t nonfs. I haven't tested this yet but according to the docs it should exclude nfs shares and hence the error messages also.
/emgi
Offline
Pages: 1
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]