Running ROMs from a Network Share
-
A much better way (for me) is using overlay file system, that way even if it can't connect to my server I can still play the games stored locally on the pi.
I have all the MAME ROM's on a share on my Windows PC, and this is what I put in autostart.sh:
(sudo mount -t cifs //10.88.44.17/Emu /net/emu -o username=Guest,guest,forceuid,uid=pi,ro,nounix,vers=3.0 && sudo mount -t overlay overlay -o lowerdir=/net/emu/Mame/roms,upperdir=/home/pi/RetroPie/roms/arcade,workdir=/home/pi/overlay.work /home/pi/RetroPie/roms/arcade ) &
emulationstation #autoEverything starting with ( and ending with & is supposed to go on one line.
Now it will mount the Windows share on my desktop 10.88.44.17/Emu in /net/emu (you need to create an empty directory there first), and I have all my MAME roms under Mame/roms under that share, and then it will underpin what was already in RetroPie/roms/arcade and when you make changes it gets written to that directory, but it can access all the files from my server, which is mounted read-only.
Because I do the mounting in a "( ) &" subshell, it will run in the background and not prevent or slow down the normal startup if the server can't be reached.
-
Re: Running ROMs from a Network Share
I am trying to mount in autostart.sh using the following command:
sudo mount -t cifs -o vers=1.0,username=roms,password=password,nounix,noserverino //192.168.0.5/roms /home/pi/RetroPie/roms
When I run this manually from the shell it works fine, but when I put it in autostart.sh it doesn't work (the roms directory is empty).
Suggestions on how to debug this?
-
@heythereharpo A more elegant way to mount shares on startup would be to use the
/etc/fstab
. See here for one of the many how-tos on the web:https://wiki.ubuntu.com/MountWindowsSharesPermanently
Suggestions on how to debug this?
Put a
> /home/pi/mount.log
behind the command to save its output into the text filemount.log
in the userpi
's home directory.A single
>
will overwrite the file every time. Use>>
to append the output to an existing file. -
-
Thanks @Clyde , I went the SystemD option. I found this page very helpful in addition to the ones you shared: https://michlstechblog.info/blog/systemd-mount-examples-for-cifs-shares/
Sharing this info for others that are trying to mount to a share on an old SMB 1.0 device.
Content of home-pi-RetroPie-roms.mount
[Unit] Description=roms mount [Mount] What=//192.168.0.5/roms Where=/home/pi/RetroPie/roms Type=cifs Options=vers=1.0,rw,user=myusername,password=mypassword [Install] WantedBy=multi-user.target
Content of home-pi-RetroPie-roms.automount
[Unit] Description=roms automount [Automount] Where=/home/pi/RetroPie/roms [Install] WantedBy=multi-user.target
People having problems with cifs can check tail -f /var/log/kern.log for more info
-
I am running successfully ROMs from my network share using the modification of autostart.sh file. However:
-
when setting "parse XML gamelist only " to "OFF" the startup of ES is extremely slow - too slow to be workable. I then switched to the next option below.
-
when setting "parse XML gamelist only " to "ON", the startup of ES is fine, however, now loading the artwork (I presume) is extremely slow - too slow to be workable as well.
Any ideas of speeding things up in either options?
this is what I have added in the autostart.sh "sudo mount -t cifs -o username=pi,password=raspberry,nounix,noserverino //192.168.1.110/roms /home/pi/RetroPie/roms" where pi is an account I created on my windows 10 server and roms a share (pi has read/write access).
Any help would be very appreciated....even if it is confirming running off network is so slow it isn't a viable option. If so, then I will abandon it.
-
-
@kdeman The reason for both effects it the same – networks are much slower than local storage, and Emulation Station reads the artwork of a game only when you reach it while browsing the list.
Apart from any potential network tweaks that don't really change this ugly fact, the best way to speed up things is to set Parse Gamelists Only to ON and store the artwork locally. Most scrapers have an option (not) to store the media files in the rom folders.
-
@Clyde thanks for the tips! I have since found a problem with my Ethernet connection though that caused a very, very long delay. Resolving that, made the network operation much faster, even to an acceptable level to use it.
In ES there is the option to Get Art Locally (I believe under the Parse XML Gamelist Only option), how would that work actually if I have mapped the Roms folder to a network share (and that is where I also have the art in the Media folder(s))....?
many thank in advance!
Karel
-
@kdeman said in Running ROMs from a Network Share:
In ES there is the option to Get Art Locally
That option does something else - it will search for artwork by looking in the filesystem instead of using the paths declared in the gamelist. For your setup, it's better to leave it off.
-
@kdeman The option to save the artwork locally (i.e. not in the roms directory that is remote in your setup) and the actual location both depend on the scraper you are using. At least the popular Selph's Scraper and Skyscraper have such options.
If you don't mind to scrape everything a second time, just flip the option to not use the roms folder and scrape away. The artwork will then be saved outside of your remote roms mount and thus, locally.
If you however want to use your already scraped artwork, you'll have to do a little more homework on how to import it in the scraper. If you have questions about that, ask away. But if you can spare the time and bandwith, I would recommend to go the easy path of re-scraping.
-
Hello everyone,
I am a new user of retropie, and after some painful "first time user, no idea why this doesn't work" stint, I have stumbled upon this beautiful guide, which I closely followed and lo and behold, the share is visible. I even managed to make it writable using the alternative mount command from the guide.
Excellent work, congratulations!
-
Hello friends, after a lot of head banging, I solved the problem in an extremely simple way and without following the steps mentioned in the tutorial...
I just did:
sudo nano /etc/rc.local
I wrote the following line before EXIT=0
sudo mount -t cifs //HOSTNAME/SHARENAME /home/pi/RetroPie/roms -o username=YOURUSER,password=YOURPASSWORD,vers=1.0
saved, exit, reboot and everything working perfectly!!! -
-
@luireef THANK YOU SOOOOO MUCH... I have been banging my head so much with not getting things to work and have tried about anything I can find both in this forum and outside without any solutions. Your help worked like a charm.
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.