Move OSMC from sd card to NFS root?

I really don’t want to do a re-install.

I’ve copied the rootfs to an nfs share, setup dhcpd

It starts and hangs at “waiting for network to be configured”

There’s about 4 seconds where it’s ping able so I’m guessing it’s just shot itself in the foot by trying to configure an already up network.

Is it an easy fix ?

Thanks !

You need to seriously consider how much work you are willing to put into your solution. Backing up the Kodi stuff, reinstalling, then restoring is probably far more straight-forward and robust method.

You don’t need dhcpd.

You need to adjust cmdline.txt and copy the root filesystem to an nfs share. You’ll also want to adjust /etc/fstab. Have a look how it’s done in the installer here:

Thanks for the pointers.
I should have been clearer - dhcpd was configured on my DHCP server to provide the boot path.

fstab is correct and I’ve just done a diff on an sdcard vs nfs OSMC install - it looks like there’s some systemd differences

That doesn’t sound right.

Assume both were both on the same updated version?

Show me your cmdline.txt, which also needs adjusting

They were both May - the NFS install was fresh today and the original has been around for a few months.

This works now:

cat /boot/cmdline.txt
root=/dev/nfs nfsroot=10.0.0.3:/vmfs/NFSPi/lachlanpi ip=dhcp rootwait quiet osmcdev=rbp2

I need to try to retrace my steps to work out why it didnt work yesterday…

Sadly I couldnt replicate my issue.

On a related topic, I’d like to specify the nfsroot using dhcp rather than the cmdline.txt

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=145971
implies this should work with:
option root-path “10.0.0.3:/vmfs/NFSPi/lachlanpi,tcp,vers=3”;

unfortunately osmc hangs at initrd

That’s not implemented in initramfs.

If you want to improve it, look for osmc/init at master · osmc/osmc · GitHub. Unfortunately it’s quite a niche feature request so I will not have much time to look at this.

Sam

thanks sam!

ill look into it

Btw, I think I know what accused the issue. I think o used a raspbian /boot partition rather than an OSMC boot partition.