- This topic has 3 replies, 2 voices, and was last updated 11 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘New to RetroPie? Start Here!’ is closed to new topics and replies.
Our team is taking a summer pause. Any orders made from 5 July to 23 July will be handled right after we’re back. Thanks for your understanding. Dismiss
Skip to contentHomepage › Forums › RetroPie Project › New to RetroPie? Start Here! › NFS Mount Issues
Hi All,
I’ve just installed Linux retropie 3.18.11-v7+ and I have configured it store the roms on the my home server using NFS shares. I have mounted an NFS share directly onto ~/RetroPie/roms using /etc/fstab.
The problem I have is that the NFS shares don’t mount when the system boots. I guess its because it tries to mount before the network is ready?
If I quit my emulationstation front end and issue a “sudo mount -a” everything mounts fine and I can run emulationstation and play games etc.
I edited /usr/bin/emulationstation and added a “sudo mount -a” at the beginning. This does not help when the device first boots, the mounting still doesn’t happen. However, if I quit emulationstation and reload it everything mounts fine.
So I need some advice on how to delay the startup a little to allow time for the network to come up and everything to mount properly before emulationstation front end is launched.
any ideas or thoughts?
Hi doozy,
Had the same issue and found a post in this forum with a script made by erdnuesse member, I modified it a bit for my needs and here it goes:
Just after the #!/bin/bash in /usr/bin/emulationstation:
# Thx erdnuesse
# Set retry to the number of times you want the loop to repeat
RETRY=20
# As long as we have retries left...
if [ `mount -l -t nfs | wc -l` -eq 0 ]; then
while [ $RETRY -gt 0 ]; do
# This will become true if 'ping' gets a response
# Modify the following IP with your server address
if ping -c 1 -W 1 192.168.1.7 > /dev/null ; then
echo "Mounting NFS Shares..."
sudo mount -a -t nfs
RETRY=0
else
# Wait for 1 second
sleep 1
RETRY=$((RETRY - 1))
if [ $RETRY -eq 0 ]; then
echo "[ERROR] NFS Failed to mount: server sent no response to ping."
fi
fi
done
else
echo "Note: NFS Shares already mounted."
fi
Hope it helps !
I just edited my previous post, as I had troubles to get the backticks appearing in the code block, I also misplaced one…
Should be fixed now.
Spot on!
Just what I needed. One day I will learn to write scripts like that!
Cheers same