Boot over NFS

hey i’m stefan and i’m new, so hello :smile:

i’m experiencing problems with booting over NFS
i tried windows server 2012 R2 and ubuntu 14.04 (or was it 14.03?)
both shares get the filesystem (usr, lib, tmp, home,…) installed with rwxr_x_r_x root root. but when it is booting the second time i get different errors.

ubuntu:
i tried with august and july version of osmc
kernel panic: not syncing: vfs: unable to mount root fs on unknown-block(2,0)
i tried forcing nfs3 on the server and in cmdline.txt - the same

windows:
i tried the august images of osmc
Failed to start Login Service
Stopping Login Service …
Stopped Login Service…
it also has problems with other services like avahiDNS something…
after that i got an osmc logo and a “PLAY” logo on black background on the upper left of the screen and once i got a sad smiley as well

i also tried 777ing the whole filesystem on the share
what do? thanks

You won’t be able to NFS boot from a Windows server as the necessary file system permissions are not supported by Windows, so you can give up on that one, however it should work on Ubuntu.

Firstly make sure that you actually have NFS 3 enabled on the server and also paste a copy of your exports file from the server for us to see as you need the right NFS export options for a NFS boot.

Also show the output of ‘ls -al’ for the directory that your export is sharing - generally it should be chmod 0777 or the client won’t have read/write access to it.

thank you for your response!

interesting and very good, that windows server nfs won’t work (so i can forget this one and i also kind of know why it doesnt work) :grinning:
the last export line i used (in ubuntu of course) was:
/mnt/osmc 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check,insecure)

right now i only have the directory that was created, when i was using windows as nfs server.

It’s actually the mount point directory we need the permission of, so as you have yours at /mnt/osmc, try

ls -al /mnt

i started from the beginning with new paths… it’s now srv02:/osmc

/etc/fstab:
/dev/sdb1 /osmc ext3 defaults 0 2

/etc/exports:
/osmc 192.168.1.164(rw,sync,no_root_squash,no_subtree_check,insecure)

stefan@srv02:~$ showmount -e
Export list for srv02:
/osmc 192.168.1.164

stefan@srv02:/$ ls -lsa
total 101
[…]
4 drwxrwxrwx 22 root root 4096 Sep 23 13:51 osmc
[…]

stefan@srv02:/osmc$ ls -lsa
total 88
4 drwxrwxrwx 22 root root 4096 Sep 23 13:51 .
4 drwxr-xr-x 25 root root 4096 Sep 23 13:40 …
4 drwxr-xr-x 2 root root 4096 Sep 23 13:44 bin
4 drwxr-xr-x 2 root root 4096 Sep 23 13:51 boot
4 drwxr-xr-x 4 root root 4096 Sep 23 13:44 dev
4 drwxr-xr-x 67 root root 4096 Sep 23 13:44 etc
4 drwxr-xr-x 3 root root 4096 Sep 23 13:44 home
4 drwxr-xr-x 15 root root 4096 Sep 23 13:45 lib
4 drwxr-xr-x 2 root root 4096 Feb 28 2015 lib64
4 drwxr-xr-x 2 root root 4096 Sep 23 13:45 media
4 drwxr-xr-x 2 root root 4096 Aug 30 06:04 mnt
4 drwxr-xr-x 3 root root 4096 Sep 23 13:45 opt
4 drwxr-xr-x 2 root root 4096 May 31 18:11 proc
4 drwx------ 2 root root 4096 Sep 23 13:45 root
4 drwxr-xr-x 5 root root 4096 Sep 23 13:45 run
4 drwxr-xr-x 2 root root 4096 Sep 23 13:45 sbin
4 drwxr-xr-x 2 root root 4096 Feb 28 2015 selinux
4 drwxr-xr-x 2 root root 4096 Aug 30 06:04 srv
4 drwxr-xr-x 2 root root 4096 Apr 6 21:11 sys
4 drwxrwxrwt 2 root root 4096 Sep 23 13:45 tmp
4 drwxr-xr-x 10 root root 4096 Sep 23 13:51 usr
4 drwxr-xr-x 11 root root 4096 Sep 23 13:51 var

root@srv02:/# nfsstat
Server rpc stats:
calls badcalls badclnt badauth xdrcall
31 0 0 0 0

Server nfs v3:
null getattr setattr lookup access readlink
31 100% 0 0% 0 0% 0 0% 0 0% 0 0%
read write create mkdir symlink mknod
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
remove rmdir rename link readdir readdirplus
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
fsstat fsinfo pathconf commit
0 0% 0 0% 0 0% 0 0%

Client rpc stats:
calls retrans authrefrsh
0 0 0

from syslog:
Sep 23 14:20:12 srv02 kernel: [ 823.264070] NFSD: laundromat service - startin
Sep 23 14:20:12 srv02 kernel: [ 823.264077] NFSD: laundromat_main - sleeping fr 90 seconds
Sep 23 14:19:58 srv02 rpc.mountd[1206]: authenticated mount request from 192.168.1.164:933 for /osmc (/osmc)
Sep 23 14:20:34 srv02 rpc.mountd[1206]: authenticated mount request from 192.168.1.164:866 for /osmc (/osmc)
Sep 23 14:21:21 srv02 rpc.mountd[1206]: authenticated mount request from 192.168.1.164:911 for /osmc (/osmc)

i tried the following, but it didn’t work either :frowning:
chown -R 1000:1000 /osmc

(i don’t remember, if that was the exact command, but you get the idea)

I’m thinking about giving up :confused:

edit: i’ll try another OS. any recommendations? without gui and not that demanding…

My functioning export from my testing root mount used async rather than sync. There was also an issue at one point that caused problems when Gb network was set for high mtu/jumbo frames. Is that your exact export line? Because yours also doesn’t include the netmask designation (/24).

/media/raspbmc 192.168.0.0/24(rw,async,no_root_squash,no_subtree_check,insecure)

well, i think for using a nfs share as root i’d rather user “sync”?! i don’t think this would make a difference in being able to boot or not, but i can try it (just installing CentOS right now)
also i chose to only share it with the exact ip of the raspberry pi… why? i don’t know, but it works (the installer is copying files to the share!)
i dont think i need the /24 netmask or whatever in this case

edit:
it’s working with CentOS 7… same Exports line, 777 to /osmc - don’t know why, but i’m happy… thank you :smile: