RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Running ROMs from a Network Share

    Scheduled Pinned Locked Moved General Discussion and Gaming
    109 Posts 48 Posters 87.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      EVH @mitu
      last edited by EVH

      @mitu said in Running ROMs from a Network Share:

      @evh If the share name is Media, then the mount command is not correct. You can't mount arbitrary folders inside a share, you should mount the share itself.
      My advice is to create a different share and name it RetroPie-Roms, then follow the docs and add the share to the /etc/fstab file to be auto-mounted to /home/pi/RetroPie/roms. Restart and see if the share is correctly mounted, then restart Emulationstation and see if the ROMs from the share appear in the list.

      Makes sense, I'll try it later and update.

      The docs suggest that the path can contain folders... which I wrongly assumed would work.

      sudo mount -t cifs -o username=something,password=something **//REMOTEHOST/path/to/roms** /home/pi/RetroPie/roms

      1 Reply Last reply Reply Quote 0
      • E
        EVH
        last edited by

        Well, I can confirm it still doesn’t work.

        Mounting a cifs share called RetroPie and having all the usual folders inside didn’t work.

        I even tried appending the path to 10.0.0.10/volume 1/RetroPie/roms thinking that maybe I needed the volume name but I couldn’t get it working.

        I’m almost about to give up which is a shame because I’ve got a NAS full of roms that I want to use and only a 16GB SD card :(

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @EVH
          last edited by mitu

          @evh Is the remote share mounted if you issue the command manually ? Does mount -a works after you set up the fstab ? Is there an error when you run the mount command ?

          E 1 Reply Last reply Reply Quote 0
          • E
            EVH @mitu
            last edited by EVH

            @mitu said in Running ROMs from a Network Share:

            @evh Is the remote share mounted if you issue the command manually ? Does mount -a works after you set up the fstab ? Is there an error when you run the mount command ?

            I gave up on cifs and finally got it working through NFS. Not sure which is better, but I was able to mount my folder inside the Media share i.e. 10.0.0.10/Media/RetroPie/roms which is good as it means less "what is this retropie thing" questions from the other half :D

            1 Reply Last reply Reply Quote 0
            • qraygQ
              qrayg
              last edited by

              Just in case someone comes into this topic and none of the posts in this thread or the wiki solves their issues (like what happened to me). Here's how I got mine working. I'm using an ASUS RT-AC86U router with a Network Place (Samba) Share on a Raspberry Pi 3 B running RetroPie 4.4.x:

              Mount:
              sudo mount -t cifs -o username=xxx,password=xxx,vers=1.0 //server/path/to/roms /home/pi/RetroPie/roms

              Notice the vers=1.0. That was the only thing that would make the mount work for me. I found that option on a Linux support forum.

              Permissions:
              sudo chown -R pi /home/pi/RetroPie/roms

              I tried every variation of sec, file_mode, and dir_mode, but no matter what I did my gamelist.xml, save states, battery saves, etc. would not get created or updated. After chowning the newly mounted shared rom folder, everything worked like a charm.


              http://qrayg.com

              1 Reply Last reply Reply Quote 1
              • B
                bolski @ringnutz
                last edited by

                @ringnutz said in Running ROMs from a Network Share:

                @guy-sensei

                I had the exact same issue. It is not the fstab part that is important here but the options. Specifically one of "nounix,noserverino,defaults,users,auto". I have not deduced which one fixed it, but I am using the Autostart.sh and it works fine as follows

                sudo mount -t cifs -o gid=1000,uid=1000,username=USER,password=PASS,domain=DOMAIN,nounix,noserverino,defaults,users,auto //192.168.X.X/SHARENAME /home/pi/RetroPie/roms

                Note that you may not need domain above for your share.

                After unmounting and remounting the share using the above arguments, I am now able to launch Mame2003 Roms just fine.

                I know this is old, but thank you! This worked! Those extra options at the end allowed me to play Mame from my NFS file share, whereas before, everything BUT Mame worked.

                1 Reply Last reply Reply Quote 0
                • XyberDAWGX
                  XyberDAWG
                  last edited by

                  I have been racking my brain. I switched from USB to Network share. I have followed everything in the guide, and in this thread. everything mounts properly, I can see everything when I enter the terminal on my RetroPie, or via SSH.

                  Even viewing the Samba Share via windows Explorer.

                  But when emulationstation starts, it hangs at checking system config. it will not move past that. I have verified the es_systems.cfg it is all proper, and matches my rom paths exactly.

                  there doesnt seem to be any logs, i check every log i can think of for emulationstation and they are all blank.

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @XyberDAWG
                    last edited by

                    @XyberDAWG said in Running ROMs from a Network Share:

                    But when emulationstation starts, it hangs at checking system config. it will not move past that. I have verified the es_systems.cfg it is all proper, and matches my rom paths exactly.

                    Start Emulationstation with the --debug option and post the log you get - in a new topic please where you add the info about your system as requested in https://retropie.org.uk/forum/topic/3/read-this-first.

                    1 Reply Last reply Reply Quote 0
                    • snydeaS
                      snydea @BuZz
                      last edited by

                      @BuZz said in 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
                      

                      Maybe it is a stupid question but what username has to be put in? The User, i use as a User on my pi? Or the User on the Server?

                      BuZzB ClydeC 2 Replies Last reply Reply Quote 0
                      • BuZzB
                        BuZz administrators @snydea
                        last edited by

                        @snydea the user for the share on your server.

                        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                        1 Reply Last reply Reply Quote 0
                        • ClydeC
                          Clyde @snydea
                          last edited by Clyde

                          @snydea For a better understanding, the username and password is needed to log into the NAS. You don't need the local username and password, because you're already logged in locally when you are in the text console (edit) the autostart already runs as the local user. sudo may ask for your local user's password, however, to gain temporary administrative rights to mount the remote share locally. (It will store the passwort for a short time, so subsequent sudo commands may not ask for it again. edit: And on the official RetroPie image, its password request is disabled alltogether.)

                          I hope I could make myself intelligible. :) I always find it better to understand something than to just know the necessary actions.

                          1 Reply Last reply Reply Quote 0
                          • T
                            TH
                            last edited by

                            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 #auto

                            Everything 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.

                            1 Reply Last reply Reply Quote 0
                            • H
                              heythereharpo
                              last edited by

                              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?

                              ClydeC 1 Reply Last reply Reply Quote 0
                              • ClydeC
                                Clyde @heythereharpo
                                last edited by Clyde

                                @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 file mount.log in the user pi's home directory.

                                A single > will overwrite the file every time. Use >> to append the output to an existing file.

                                1 Reply Last reply Reply Quote 0
                                • ClydeC
                                  Clyde
                                  last edited by

                                  Even more convenient could be to let the share be auto-mounted on access to the local mount point, either using autofs or systemd. 😎

                                  1 Reply Last reply Reply Quote 0
                                  • H
                                    heythereharpo
                                    last edited by heythereharpo

                                    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

                                    1 Reply Last reply Reply Quote 1
                                    • kdemanK
                                      kdeman
                                      last edited by kdeman

                                      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.

                                      ClydeC 1 Reply Last reply Reply Quote 0
                                      • ClydeC
                                        Clyde @kdeman
                                        last edited by

                                        @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.

                                        kdemanK 1 Reply Last reply Reply Quote 1
                                        • kdemanK
                                          kdeman @Clyde
                                          last edited by

                                          @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

                                          ClydeC 1 Reply Last reply Reply Quote 0
                                          • mituM
                                            mitu Global Moderator
                                            last edited by

                                            @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.

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            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.