Mounting a share on startup causes boot loop or crash

I’ve got an issue that happens using ce-no nightlies for the past few months on both an Homatics Box R 4K Plus and a Minix U8K-Ultra.

If I try to mount a nfs share in .config/autostart.sh with:-

mount -t nfs 192.168.0.100:/volume1/Media storage/media

On boot CoreELEC just goes into a boot loop, and after a random number of loops it will eventually boot and the share will be mounted and work.

If I let CoreELEC fully boot and then ssh into it and issue:-

mount -t nfs 192.168.0.100:/volume1/Media storage/media

CoreELEC just crashes and reboots.

I’ve also tried using the LibreELEC guide here:- Mount Network Share | LibreELEC.wiki

nano /storage/.config/system.d/storage-media.mount

[Unit]
Description=test nfs mount script
Requires=network-online.service
After=network-online.service
Before=kodi.service

[Mount]
What=192.168.0.100:/volume1/Media
Where=/storage/media
Options=
Type=nfs

[Install]
WantedBy=multi-user.target

But as soon as I test the mount with:-

systemctl start storage-media.mount

Same thing, CoreELEC just crashes and reboots. Is it just not possible to mount a nfs share on start up with CoreELEC?

If it doesn’t work manually from terminal then it will not work from autostart and with service.
I will check it in next days.

Thanks.

I don’t get a kodi crash log after it crashes so I’m not sure what if any logs I can provide.

You should still have old crash log.

Yep, usually if Kodi crashes you get a kodi.crash.log file in the temp directory, but if I issue the mount command and it crashes then there is no crash log file on next boot.

I’m assuming there’s no crash log because it’s not Kodi that is crashing, it’s the underlying OS.

Sure, if OS dies you get nothing :frowning:

I just tested with CE build in NFS server and I can’t reproduce the issue with it. The exported folder can be mounted. No crash. Don’t have real NFS server to test.

I can get this to happen pretty regular. It can take upto 5 or 6 crash and reboot cycles before the share will mount without crashing. As I said this happens on two different boxes and started with one of the nightly updates a few months ago, I just don’t know which.

My NAS is powered 24/7 so it’s not a problem the the share not being ready, and my other Linux machines have no problems mounting the shares.

Open 2 terminals: in first type

while true; do dmesg; done

and in second mount share manually. Do you see anything in first terminal why it crashes?

This is the last few seconds before it crashes:-

Can you try different nfs version (4, 3, 2)?

mount -t nfs -o vers=4 ......

vers=4 crashes however vers=3 seems to work ok, I have now rebooted and mounted the share half a dozen times and no crash yet. I’ll test for a couple more days but that seem to have fix it :+1:

1 Like