OSMC NFS boot over wifi

Hello,

I have RPI2 with OSMC installed on it. It is booting from NFS server over ethernet connection.

Now I would like to get rid of cable and use there only WiFi dongle. I successfully installed and connected WiFi, but I expect it won’t boot as WiFi initialization is done after NFS root is connected.

In pure linux, I would normally create custom initrd and put all needed things to setup wifi into it and after that just mount NFS root and continue with boot. I think I can implement this, but before digging too deep I wanted to ask: have anyone tried this? Is there any HowTo related to OSMC(tried google, no results)? I’m asking, because I don’t want to re-invent wheel.

Thank you for any response.

Don’t do this. The performance will be awful

Sam

Actually I don’t think it will be an issue. With 802.11ac transfer speed is fine, as NFS server and client will be on same network latency will be also OK.

What will be bit slower is boot - this box will be running 24/7 so it wont boot that often and also updates might be slower, but it is only few times per month and can be scheduled during deep night so it does not matter if it will take few more minutes…

  • Move ConnMan in to initrd
  • Patch ConnMan in userland to ignore the interface
  • Add modules and firmware to initramfs.

You will need to do all of the above each update

Sam

I struggle to see the point of the exercise. NFS root on a Pi is generally done to improve performance, this will make it dramatically worse. A cheap Wifi adaptor does not make a good root file system device.

Good luck keeping an NFS connection running 24/7 over a wifi connection. In normal use a momentary loss of wifi connection won’t cause you much of an issue, however if you have your root file system mounted over the wireless connection the system can’t do anything if the wifi connection is lost - including trying to regain the connection.

If the program that manages the connection retries tries to read or write to disk it will block and the system will be deadlocked and unable to reconnect. The first time it loses the connection it will be a death sentence and the box will require a hard reboot.

Not worth the hassle when a fast SD card like a Samsung Evo is available for a similar price to a wifi adaptor.

On my Samsung Evo cards (one 32GB one 64GB) I can get a sustained write throughput of around 12MB/sec (96Mbps) and sustained read throughput of 20MB/sec (160Mbps) - you won’t get anything remotely like that on an NFS root connection over Wifi. You’ll be lucky if you can get 1/5th of that in real world use over wifi.

Lots and lots of hassle to set up and maintain for no real gain.