Forum Replies Created
-
AuthorPosts
-
erdnuesseParticipant
Hi,
I’m going towards a minimal install on SD (4GB) and a rather big usb (nano) pen drive for the roms, because you can have p.e. 16 Gigs of roms separately, mountable and safe from corruption which occurs mostly on SDs.
When I manage to save rom states on usb on the fly (inside the rom folder), I surely don’t want any data corruption.One more thing: I guess you’re using wired network – I am using wifi, which is why I needed to tweak my mounts because wifi’s not always ready when using default fstab.
Regards.
erdnuesseParticipantHi,
since I did not want to delete rom directories from the basic install of the retropie, I couldn’t test it.
Basically it’s one thing:
AFAIK, I can not mount nfs into a non-empty directory.Another thing – when I want to have it portable to take it to a friend, I might not have my nfs share available (I don’t want to be dependent on having Internet available for a vpn) so I was thinking on having some rom folders on a USB drive, which mounts if I have no connection to my NAS.
That would be single mount or rom-specific.
Since I did not try that as well, I left the rom directories as-is.
That’s all.
If you get it to work, please let us know.All the best,
erdnuesseerdnuesseParticipant<Reserved for the single-mount thingy>
erdnuesseParticipantOkay, so here we go.
What remains open is the part where I only mount one folder “roms/”.
But my mounts in .profile and rc.local totally went south.Prerequisites:
- empty rom folders on the pi – because I mount the nfs folders into the existing rom folders
- a working nfs share on your IP (replace 192.168.2.1 with your nfs share)
What I now did was edit the file /usr/bin/emulationstation
and inserted the following code right after#!/bin/bash
# Set retry to the number of times you want the loop to repeat RETRY=20 # As long as we have retries left... while [ $RETRY -gt 0 ]; do # this will become true if 'ping' gets a response if ping -c 1 -W 1 192.168.2.1 > /dev/null ; then # insert all your mounts here sudo mount -t nfs 192.168.2.1:/volume1/shares/games/roms/snes /home/pi/RetroPie/roms/snes sudo mount -t nfs 192.168.2.1:/volume1/shares/games/roms/nes /home/pi/RetroPie/roms/nes RETRY=0 # and if there's no response... else # set sleep higher if you want to wait more than 1sec between attempts sleep 1 RETRY=$((RETRY - 1)) if [ $RETRY -eq 0 ]; then echo "NFS Failed to mount, server sent no echo response, or check your network connectivity" fi fi done
As long as your network connection is set up (I had minor problems with wifi) your mounts should come up and running. When you see the emus in emulationstation, everything should be fine.
Consider this one solved. But: I may reserve a post, for when I will be able to replace the multiple mountpoints by a single one for all emulators. (I might run into an issue due to too many mounts for that little box and my 54Mbit wifi)
erdnuesseParticipantI have made some interesting experiences with mounting multiple folders which brought me to the ideaof mounting only the roms folder directly. It just did not work flawlessly.
So what I did was:
cd /home/pi/RetroPie/ mkdir oldromfolders cd roms mv * ../oldromfolders/
in order to get rid of everything inside the rom folder.
after that I changed my script to include only one mount command
mount -t nfs 192.168.0.1:/path/to/nfs/roms /home/pi/RetroPie/roms
Which worked just fine.If you have a problem that ES won’t start (white dot), it might be because the paths in /home/pi/.emulationstation/es_systems.cfg got messed up or you renamed a folder incorrectly. (for me at least)
Still testing the setup, so marked as unsolved – but on a good way here.
erdnuesseParticipantI inserted this right above the
exit 0
entry in /etc/rc.local
Remember:
1. I won’t be responsible for any damages you cause from information given here
2. try your mount commands first, before you insert them
3. replace the ip with the ip of your nfs storage# Set retry to the number of times you want the loop to repeat RETRY=20 # As long as we have retries left... while [ $RETRY -gt 0 ]; do # this will become true if 'ping' gets a response if ping -c 1 -W 1 192.168.0.1 > /dev/null ; then # insert all your mounts here mount -t nfs 192.168.0.1:/path/to/roms/snes /home/pi/RetroPie/roms/snes mount -t nfs 192.168.0.1:/path/to/roms/nes /home/pi/RetroPie/roms/nes echo "NFS mounted" RETRY=0 # and if there's no response... else # set sleep higher if you want to wait more than 1sec between attempts sleep 1 RETRY=$((RETRY - 1)) if [ $RETRY -eq 0 ]; then echo "NFS Failed to mount, server sent no echo response" fi fi done
Thanks to chrishsin for pointing me there.
erdnuesseParticipant1. autofs s*cks.
2. /etc/rc.local must include sleep 30 / a ping check to the nfs storage, / mount only if successful, then exit. Gotta check on how to script it correctly. Last scripting-time is long ago : (erdnuesseParticipantEDIT: I will try autofs next.
-
AuthorPosts