I thought I had it all figured out, but now I'm not so sure. I found Network Boot - NFS - OpenELEC but that's OpenELEC and dauntingly complex anyway. Is there just a simple 1-liner I can put in my /flash/cmdline.txt that mounts an NFS?
I'm running the latest LibreELEC on an R.Pi 3.
Mounting /storage on NFS from cmdline.txt
-
RoccoJones -
January 28, 2017 at 8:18 PM -
Thread is Unresolved
-
-
- Official Post
-
Didn't work. My cmdline.txt is:
(boot field unchanged) When I tried to restart, it just said it couldn't boot from that. When I try executing:
on Ubuntu or even the Raspbian server that 192.168.1.105 is, they run fine. -
- Official Post
on Ubuntu or even the Raspbian server that 192.168.1.105 is, they run fine.and what about if you mount in withing LibreELEC?
-
Following Mounting network shares - OpenELEC it mounted ok. But because I didn't fix it w/the options, there was a problem accessing any files or directories that didn't have global permission. The 2 roots are, of course, different. Could that be the problem?
-
So how do I troubleshoot this? From what it seems, there's no log when this happens and the feedback I get is minimal.
-
I just went and asked the Raspberry Pi guys about this and got this answer:
Quote
You also need the ntfs-3g driver built into their Linux kernel or as a kernel module to support mounting NTFS.
(END QUOTE)Does that give any more insight into what the problem is? The guy went onto say that the mount command is non-standard and that it must be a LibreELEC script managing it.
-
- Official Post
NTFS has nothing to do with NFS
If you can mount the NFS share from command line while LibreELEC is booted, then it will work for NFS storage.
-
That's what I said. Then the other guy said:
Quote
Same answer as before, NFS or NTFS your mount command is non-standard so there's probably some funky LibreElec script doing it.
(END QUOTE)So they seem confident that ntfs-3g is necessary for this. In any case, I'm told very little about why it fails when I start, and I wouldn't know where to go to find more.
-
- Official Post
No. Ntfs-3g is used for mounting ntfs partitions (windows partitions) into linux user space. It has nothing to do with NFS.
If you really want to debug then you will want to add the "break=load_splash " to the kernel arguments in the bootloader. This will drop you to a shell where you can mount the /storage partition manually and see what is happening.
You can see how the init works here. LibreELEC.tv/init at master · LibreELEC/LibreELEC.tv · GitHub
-
Then maybe someone wants to weigh in, because someone doesn't understand something: Raspberry Pi • View topic - Can't mount NFS through cmdline.txt
Ok, I followed your debugging advice, and in the end, the reason it seems to fail is that the network doesn't come up.
Once I re-established the normal disk, I logged in and pinged the NFS server.
So clearly this is a problem of the network being down when the mount is attempted.
-
- Official Post
try adding ip=dhcp to the end of cmdline.txt
-
That definitely had an effect, but now it just froze the Pi w/a blank screen. Attempts to ssh in were just met w/"Connection refused". This was still w/the "break=load_splash" btw. Could this be related to the root problems I mentioned earlier, where a successfully mounted NFS couldn't act as root?
If doing it through were a long-term workaround, it would present difficulties as I need a static IP to locate the Pi. My router's server is supposed to be able to assign specified addresses to specified MAC addresses, but it doesn't seem to work. -
- Official Post
dhcp is just one option.
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>
See, nfsroot.txt
Don't worry about the nfsroot part in that document.
-
Same problem: black screen, nothing going on. I wouldn't swear on my life that all the parameters are right, though:
Coderoot=UUID=A5AD-A5ED disk=NFS=192.168.1.105:/mnt/mainhdd/ break=load_splash quiet ip=192.168.1.103:192.168.105.1:192.168.1.1:255.255.255.0:DosPace:eth0:off:208.67.220.220:208.67.222.222
For instance, there shouldn't have been any need to give the gateway since the NFS server is on the same subnet, but I didn't know what else to know.
-
Remove "quiet" if you want to see what's going on. Add "debugging" otherwise it won't break on anything (yeah, I know...).
-
Very well,
Code[code] root=UUID=A5AD-A5ED disk=NFS=192.168.1.105:/mnt/mainhdd/ break=load_splash debugging ip=192.168.1.103:192.168.105.1:192.168.1.1:255.255.255.0:DosPace:eth0:off:208.67.220.220:208.67.222.222
[/code]
That got me my shell, and it then let me mount the NFS from the command-line. So I've managed to get that far. How do I go about turning that into something that will mount on startup? -
There is no root= option, LibreELEC uses boot=. Other than that, simply adding ip=dhcp worked for me last time I tried this (PR621).
-