Running ROMs from a Network Share
-
I avoid using fstab also, and just add the mount to the
/opt/retropie/configs/all/autostart.sh
script (4.0 feature)cat /opt/retropie/configs/all/autostart.sh
sudo mount -t cifs -o username=something,password=something //nas/retropie /home/pi/RetroPie kodi #auto emulationstation #auto
-
It might be better to recommend
nano
instead of vi as it's more user friendly when editing. Thanks for making the guide :-) -
I found some people that were running ROMs from USB (and recently, noticed the guide on the wiki) are using your suggestion of moving everthing from ~/RetroPie/. The only reason I didn't do this was because I had some issues moving/copying one of the ports/ to my PC. I'll play with it a little later but I had 2 kids and my wife wanting one of two things (To play SNES or watch TV) so I was a little rushed and decided not to mess with it at the time.
I had no idea the autostart.sh existed so I went with the method I use on my MediaPi which hasn't failed me yet.
I did have an "Assumptions" section which mentioned that I habitually use vi instead of nano and to be prepared to figure it out or use something else. But it seemed a little... rude? And seeing as it's in the advanced section, it already assumes some level of know-how.
I'll take your suggestions, do some experimentation, play with my config and update the guide. This may have to wait until this weekend when things at home settle down a little. For now, your suggestions are here for anyone that wanders over with problems.
Thank you for your hard work on the overall project and advice on this topic!
-
Cheers. Regarding editor - the rest of the wiki references nano - so even just for the sake of consistency it would be good to use that in the examples.
-
I just made several revisions to the document. I might go through the setup again this weekend in case I forgot something, especially taking the alternate (preferred) route. But for now, most people should be able to figure it out if they run into issue.
It would be awesome to see this implemented into the GUI but to my understanding, EmulationStation is currently abandoned.
Using Kodi as an example. I played with all sorts of methods of mounting the drive locally and ran into problem after problem after problem. Ultimately, I just started pointing the paths directly to //192.168.1.10/Storage/Media. The first time you access it, Kodi prompts you for the credentials and... Voila, everything works!
But for now, this seems to work just fine.
-
I will probably add some additional mounting features in a later release via the retropie-setup gui.
-
Hi JFamily and BuZz!
Just wanted to say many thanks for this! I'm extremely interested in getting this to work, and will be testing on a QNAP NAS drive very soon. I am running 3.8.1 with the most recent setup script, so I was wondering if Option 1 of the method to mount using the autostart script would work (as it is marked as a 4.0 feature?) Many thanks in advance for your help, and all the best!
-J
-
@jpxdude I'm very new to the RetroPie scene but from the looks of it, autostart.sh most likely will not exist on your version of 3.8.1. If you check the file and it is already there, I would have to assume it will work.
That being said, I was playing with putting my RaspberryPi 3 in a sega genesis case this weekend and in the process of removing the raspberry from it's old enclosure, broke my sd card in half.
SO I followed my guide, using the recommended steps and had a issue with using autostart.sh. I think I've since figured out the problem and I don't think it had anything to do with the fact that I was using autostart.sh.
I have a lot going on tonight because we're expecting a baby within the next month. But if I do get some time to sit down tonight, I will switch it back and see what happens.
Again, I do believe that is the best method. The issue was just on my end and I think it's worked out now.
I have no experience with QNAP and very little with NAS so I'm wishing you the best of luck. Hopefully, if anything, it will be easier.
Edit: I've made quite a few changes to the guide today. I removed any option or suggestion of ONLY mounting the roms folder. I had no issues transferring all of the files if I used FTP and I see no reason for any of the contents of the RetroPie folder to be stored locally.
-
@JFamily I really appreciate you taking the time to reply! I wish you all the best with the upcoming addition to your family, it will be a great moment!
So I tried your instructions out a little while ago, and couldn't get the autostart method working, and as you quite rightly say, the file didn't exist, however after a little struggle with option 2 and the fstab I did eventually get it working, as I wasn't getting the path correct. I am not sure if the path issue is what prevented autostart.sh from working, but now I know what it should be, I'll test it another time.
I haven't tested saving or scraping yet, but things do seem to load fine from my NAS share, which is great. If I have some time during the week, I might reattempt a fresh install of RetroPie, but with a 4.0 beta and see if I can get the autostart working, however I will test saving and scraping before then.
Thanks again for everything, it is much appreciated!
-J
-
I'm just writing to add that some kind of Network Share functionality should be incorporated going forward, as it is amazing!
I like that I can stick a bare copy of RetroPie on a tiny SD, and just map my RetroPie folder directly to a share on my NAS drive. I'm compiling and organising the roms on my NAS remotely, which will be ready to mess with later when I get home. I can also access shares remotely, meaning at some point I'll probably test a RetroPie install with a mapping to my NAS over the Internet. All really exciting stuff. Thanks again!
-J
-
@jpxdude I'm glad it helped! Completely agree with adding some network functionality. On my other Pi, running Kodi, I can go into the settings and point directly to //192.168.1.10/Storage/Media and voila, no mounting or anything. The first time you select the path, it asks for a username/password, you put it in and it remembers it for any other path that uses the same IP/Hostname. That would be the most optimal setup in my opinion. The configuration is so much simpler.
I'm still having some issues saving, really thought I had it worked out. My wife and I worked through the first act in super mario world for the 800th time last night. Went back in after we were done and no saved game... Maybe I missed something. I can definitely save and reload states though... Not sure what's going on, maybe a typo somewhere...
-
@JFamily Are you saving using a particular emulator? Tried doing the same thing in other emulators, or an alternative SNES emu within RetroPie? I've not tested this yet, but maybe I'll try later tonight if I have time!!
-
@JFamily
You will have to mount the drive in Linux otherwise it will never let you write to it.
https://wiki.ubuntu.com/MountWindowsSharesPermanently
Once the drive is mounted you will need to go into linux cmd line and chmod it so its writable.
sudo chmod -R 777 <path to mounted drive>
You should then be able to write your save games to the drive. Had the same issue with my setup. -
@Shakz
It is mounted in Linux. I was just talking about how Kodi works and how I would like RetroPie to work. Strangely, that Pi can save to the drive (When I download subtitles, they save next to the video) without any chmod'ing.
At any rate, both of my save paths are now set to ~/RetroPie-Save. A local folder, completely separate from the mounted drive. I'll definitely try your suggestion by chmod'ing the mounted drive and the RetroPie-Save folder just in case.@jpxdude
I'm using the default SNES emulator which was saving just fine before I moved to network shares. If @Shakz's tip doesn't do anything, I'll experiment with other emulators. I'm pretty sure he has our solution though.When I first started playing with it, I thought it might have something to do with the fact that Root owns the mounted drive but of course made no progress in chown'ing the drive to pi:pi
-
@JFamily I guess that I can't currently save anything to the NAS. I have tried saving states which do not work, and if I try to shutdown RetroPie, I get an error that appears as follows:
lvl0: Error saving gamelist.xml to ""/home/pi/RetroPie/roms/fba/gamelist.xml"" (for system fba)!
lvl0: Error saving gamelist.xml to ""/home/pi/RetroPie/roms/gba/gamelist.xml"" (for system gba)!
lvl0: Error saving gamelist.xml to ""/home/pi/RetroPie/roms/gbc/gamelist.xml"" (for system gbc)!I'll try reapplying permissions, however when I tried @Shakz method, I used:
sudo chmod -R 777 RetroPieand it didn't seem to make a difference.
-
@jpxdude interesting....your gamelists are not saved to
/home/pi/.emulationstation/gamelists/<system>
? -
@Shakz Yes, I have no idea why this is!
-
OK, so I have it half working, which is weird...
I unmounted my existing share using:
sudo umount -a
Then: sudo nano /etc/fstab
Edited my one line to:
//192.168.0.18/Share/RetroPie /home/pi/RetroPie cifs username=user,password=pass,uid=1000,gid=1000,nounix,noserverino,rw,user,exec 0 0
Save then remount using: sudo mount -a
Now it lets me save normally in a game (tried with SNES) and also save/load states (tested in both SNES and lr-fba-next), however it is crashing on exiting/restarting emulation and shutting down.
Feel like I'm half way there now! Any ideas?
-J
-
@jpxdude I might be having the same problem but I haven't put much thought to it. Whenever I tell ES to close or tell the Pi to restart from within ES, it just goes to a black screen. I can switch terminals, log in and sudo reboot if I have a keyboard plugged in. I've just started loading PuTTy and sudo reboot'ing from there.
This didn't happen in my first image with this setup. I thought it might be related to the release I pulled down because I'm manually installing RetroPie which is why I didn't put a lot of thought to it. But if it's happening to you on 3.8.1 then back to the drawing board...
Edit: Now that I'm getting a better grasp on all the steps required, I might re-image again and see what happens. Hopefully I can refine the process a bit. This is how my relationship with the Pi's (and linux in general) goes. Experiment, experiment, reinstall, experiment, reinstall, experiment, reinstall, EVERYTHING WORKS, enjoy and never touch it again.
You should see the looks I get when I mention reimaging the MediaPi to try something different out!
-
@JFamily If you added a buncha roms on the network drive when you shutdown the pi emulation station will do a write to all the gamelist files. This will take quite a while if you have a ton of games on the network drive. Which if you are like me....you do.
https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#why-does-shut-down-and-reboot-take-ages
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.