NFS Mount Issues

Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  doozy 2 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #100333


    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
    # 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 > /dev/null ; then
    	    echo "Mounting NFS Shares..."
                sudo mount -a -t nfs
                # 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."
        echo "Note: NFS Shares already mounted."

    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

Viewing 4 posts - 1 through 4 (of 4 total)

Forums are currently read only - please visit the new RetroPie forums at

PLEASE NOTE: All orders that are placed between January 14th and January 28th will be shipped on January 29th. Dismiss