RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Is there a better way to run ROMs from an external drive using automount?!?!?

    Scheduled Pinned Locked Moved Help and Support
    17 Posts 6 Posters 9.3k 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.
    • L
      LucidEye
      last edited by

      Ok... so I am running a Pi2 with latest Raspbian Jessie, KODI, and RetroPie all on the same card as per the following instructions...
      https://retroresolution.com/2016/03/31/multipurpose-raspberry-pi-installing-a-media-gaming-pc-replacement/

      I was able to boot into Raspbian and KODI and had full access to my 2TB USB hard drive from those GUIs... however I could not access the drive from Emulationstation.

      I would really like to be able to run all my movies, music, and game roms from one source... my USB hard drive. So I followed these instructions....
      https://github.com/RetroPie/RetroPie-Setup/wiki/Running-ROMs-from-a-USB-drive

      Now I can only see the /RetroPie directory at boot and can not see anything else on that drive!!! Also, Emulationstation does not see any of the roms!!! The directions are a bit confusing.... am I supposed to copy the whole RetroPie FOLDER intact into the root directory on the USB drive... or am I supposed to copy WHAT IS IN the RetroPie folder into the root directory of my USB drive? Either way... this option is a really POOR way to run ROMs from an external drive... especially if you need to have access to other things on the drive... which I am sure many people would rather do instead of needing to setup a separate USB drive that is dedicated to only running ROMs (especially on a Raspberry Pi with only 4 USB ports... one for WiFi, one for keyboard, one for game controller, and one for hard drive... would be nice to not have to manually change boot cards or USB hard drives every time I want to play a game, and switch back to watch a movie. This is in an embedded system cabinet and once it is setup, I do not want to have to physically open the cabinet to change a boot card or USB drive.... get it?) Also, by keeping the ROMs off the Pi's boot card, it keeps the card image MUCH smaller which is ideal for making backup images of the boot card (6gb instead of 60gb!!!)

      Is there some better way of setting this up so that I can mount and access the entire drive instead of just the RetroPie folder, yet still have Emulationstation see the ROMs directory? Why does this need to be a forced mount in fstab? Why can't RetroPie simply have a setting in the setup menu that allows ANY USB drive to be automounted and then search for the needed (RetroPie) directory? (And no, the USB ROM Service is not an option here either since as I understand it, you need to use a blank formatted USB drive to first setup that service.)

      Really hope someone can tell me a better way to do this as now, after several days of building the enclosure and setting up software, my project is stuck because of this snag :-(

      Thanks in advance.

      ShakzS 1 Reply Last reply Reply Quote 0
      • dankcushionsD
        dankcushions Global Moderator
        last edited by

        this is the way to do it. if you think you have a better way of it working using the existing functionality, why not write your own guide? it's a wiki.

        the reason for using fstab and UUIDs is because it guarantees the right drive is mounted in the right place. if you plug in two drives it would still work.

        there's nothing stopping you using the drive for other things also. it's fat32.

        as for bits which are "confusing", please post the specific sections that you think this applies, as for the most part it's a series of Linux commands so I don't see where there could be ambiguity?

        L 1 Reply Last reply Reply Quote 0
        • L
          LucidEye @dankcushions
          last edited by

          @dankcushions
          Please read my post more carefully.

          There has got to be a better way to do this. If I knew how to do this another way, I would be more than happy to add it to the wiki... but I don't know of a way... which is why I am here asking for help.

          As I explained... I can NOT plug in another drive, because all the USB ports are already being used. The enclosure is already built for this project I am making... I can not go and add something like another power adapter and a USB powered hub because there is no room for it in my setup. So I need to figure out how to do all of this from the one drive I have. Why does it have to be a hard set UUID in fstab? Why can't RetroPie have a "browse-to" setting that lets you point to any complete "RetroPie" folder on whatever USB drive gets plugged in? Seems to me there would be many benefits from that kind of configuration... for instance, the ability to easily share ROM folders with friends... just pop in any USB drive and play all your friend's favorite games.... stuff like that.

          My external 2TB hdd is ext4... (why would anyone format 2TB in fat32? Wouldn't work nowadays since some movie files exceed fat32's 4gb per file size limit) I am all Linux here... no need for any NTFS or fat32 partitions for anything I do other than flashing SD cards before writing Pi images to them. And don't forget I am also running Raspbian desktop and KODI on this same setup... both like ext4 as it is a linux format and linux OSes can read faster from native partitions.... and any little performance boosts go a long way with the Pi.

          "The directions are a bit confusing.... am I supposed to copy the whole RetroPie FOLDER intact into the root directory on the USB drive... or am I supposed to copy WHAT IS IN the RetroPie folder into the root directory of my USB drive?" ... not sure how I can be more concise about this.... the instructions say... "copy the contents of the /home/pi/RetroPie folder into your USB stick. The reason for copying the whole folder, and not just /home/pi/RetroPie/roms is that there are other folders, such as /home/pi/RetroPie/BIOS` that are worth keeping on the external drive also." So, I guess the ambiguity lies in do I copy the "contents" or "the whole folder"? Regardless... I tried it both ways and neither one ended up working... Emulationstation did not see any of my ROMs on the USB HDD even though the drive was mounted exactly per the instructions and I could see the folders and files from RetroPie's file manager (while everything else on the drive became inaccessible from the OS)

          So again I ask... is there a way to mount my external 2TB ext4 HDD so that Raspbian and KODI can still see everything on the drive, while still being able to point RetroPie to my game Roms on the same drive? Once this is all in the case and closed up, I do not want to have to touch the HDD or the Pi's boot card. The drive will stay where it is and always be plugged in, so if I have to use fstab, that's fine, I just want to be able to access the whole drive and not just a few RetroPie folders.

          Thanks.

          dankcushionsD cyperghostC 2 Replies Last reply Reply Quote 0
          • dankcushionsD
            dankcushions Global Moderator @LucidEye
            last edited by

            @LucidEye obviously there is not a simpler way or we would have documented it in the official wiki :) it recommends UUID direct mounting for the reasons I have outlined. if you know Linux you could do it a number of different ways, but nothing "simple" like what you want. the guide just outlines a suitable method using built-in Linux functionality.

            there is no simpler automatic way. the reason why? because that takes coding. retropie may have such a feature in time, but not yet. kodi and co are much larger projects.

            1 Reply Last reply Reply Quote 0
            • dankcushionsD
              dankcushions Global Moderator
              last edited by

              "The directions are a bit confusing.... am I supposed to copy the whole RetroPie FOLDER intact into the root directory on the USB drive... or am I supposed to copy WHAT IS IN the RetroPie folder into the root directory of my USB drive?" ... not sure how I can be more concise about this.... the instructions say... "copy the contents of the /home/pi/RetroPie folder into your USB stick.

              the guide says copy the contents. where's the ambiguity? it goes on to detail the exact Linux commands to achieve this. if you follow these commands correctly the result is always the same.

              L 1 Reply Last reply Reply Quote 0
              • cyperghostC
                cyperghost @LucidEye
                last edited by cyperghost

                @LucidEye
                Try this:
                https://retropie.org.uk/forum/topic/2582/can-my-usb-device-have-data-on-it-already/5

                This will set a link to your HDD and you are free in choosing name for rom system folders.

                Consider if you just link to the roms - the folderstructure in /home/pi/RetroPie/roms must be the same as on your external device.
                You can try to point from /home/pi/RetroPie/roms/snesto yourusbdevicepath/Nintendo/SuperNES_Roms/ for example :)

                Hope this helps you... The fstab method works always but it's a kind of unflexible and if you read more post from me I always say (and you also said the same)... Use a small SD card for system (4GB) and the roms are stored on an external device.

                @dankcushions
                No I think playing with fstab is NOT the simpelst way. It's the robustest one :)

                1 Reply Last reply Reply Quote 0
                • ShakzS
                  Shakz @LucidEye
                  last edited by Shakz

                  @LucidEye Sounds like there is no roms link in the /home/pi/RetroPie directory.....or this common gotcha...you have
                  /home/pi/Retropie
                  in fstab instead of
                  /home/pi/RetroPie
                  It is unfortunatly necessary to have the drive mounted with fstab so it is mounted in the same place every time. However I think I know what you are trying to do.
                  May I suggest the following.

                  cd /home/pi/RetroPie
                  mkdir external
                  

                  This just makes a directory for you to mount your external drive.
                  edit fstab and make it point to this directory. sudo nano /etc/fstab
                  change
                  UUID=<your uuid> /home/pi/RetroPie ext4 nofail,user,umask=0000 0 2
                  to
                  UUID=<your uuid> /home/pi/RetroPie/external ext4 nofail,user,umask=0000 0 2

                  Reboot your pi
                  sudo reboot
                  move all the little stuff back to your local pi directory. No need to have it on an external drive.

                  cd /home/pi/RetroPie/
                  mv  /home/pi/RetroPie/external/BIOS .
                  mv  /home/pi/RetroPie/external/retropiemenu .
                  mv  /home/pi/RetroPie/external/splashscreens .
                  ln -s /home/pi/RetroPie/external/roms roms
                  sudo reboot
                  

                  Now your pi should be reading games from the external drive.
                  Hope this helps!

                  RetroPie tips, tricks, and tweaks: https://www.youtube.com/eazyhax

                  cyperghostC 1 Reply Last reply Reply Quote 0
                  • cyperghostC
                    cyperghost @Shakz
                    last edited by cyperghost

                    @Shakz
                    Why du you use fstab?
                    You can use several usb sticks and the first will be mounted as /media/usb0 the second stick will be mounted as /media/usb1

                    So in my humble opinion it is not necesasry to use fstab. I see no advantage to use fstab and then link the external device :)

                    Lucid is asking for automount devices and automount-usb package is installed by default in RetroPie packages.

                    ShakzS 1 Reply Last reply Reply Quote 0
                    • ShakzS
                      Shakz @cyperghost
                      last edited by

                      @cyperghost In my case I use a 2tb Western Digital Mybook. As those that have this drive know it mounts up two disks/mount points when you plug it in. One is the actual drive for storage...then other is a drive with a buncha tools from WD that no one uses. Sometimes its mounted on usb1 sometimes usb0...they flip flop depending on which one answers first when the pi boots up and automounts. That is why I use fstab.

                      RetroPie tips, tricks, and tweaks: https://www.youtube.com/eazyhax

                      cyperghostC 1 Reply Last reply Reply Quote 0
                      • cyperghostC
                        cyperghost @Shakz
                        last edited by

                        @Shakz Ah... I didn't know :) Well I think that's a special case but good to know the reasons.

                        dankcushionsD 1 Reply Last reply Reply Quote 0
                        • dankcushionsD
                          dankcushions Global Moderator @cyperghost
                          last edited by

                          @dankcushions
                          No I think playing with fstab is NOT the simpelst way. It's the robustest one :)

                          you can use the fstab method to link to the media/ default mount point as well (rather than the UUID), which makes it as simple as your symlink method :) but in my experience you'll want to make sure your permissions are right, and fstab is the way to do that, so you might as well mount it to the right place whilst you're there.

                          but yeah like I said there's a number of ways to achieve the same thing.

                          1 Reply Last reply Reply Quote 1
                          • L
                            LucidEye @dankcushions
                            last edited by

                            @dankcushions
                            If it says to copy the just the contents, then why is the path you have shown in the instructions "/home/pi/RetroPie"? If you are only copying the contents, shouldn't the path be "/home/pi/"? I did follow the instructions... twice... using the path /home/pi/RetroPi as well as /home/pi in fstab and neither one worked. Emulationstation did not see any of the roms on the external HDD. Any ideas why?

                            ShakzS dankcushionsD 2 Replies Last reply Reply Quote 0
                            • ShakzS
                              Shakz @LucidEye
                              last edited by

                              @LucidEye
                              What is the output of the following?

                              df
                              

                              and

                              ls -latr /home/pi/RetroPie/roms
                              

                              RetroPie tips, tricks, and tweaks: https://www.youtube.com/eazyhax

                              1 Reply Last reply Reply Quote 0
                              • dankcushionsD
                                dankcushions Global Moderator @LucidEye
                                last edited by

                                @LucidEye said in Is there a better way to run ROMs from an external drive using automount?!?!?:

                                @dankcushions
                                If it says to copy the just the contents, then why is the path you have shown in the instructions "/home/pi/RetroPie"? If you are only copying the contents, shouldn't the path be "/home/pi/"? I did follow the instructions... twice... using the path /home/pi/RetroPi as well as /home/pi in fstab and neither one worked. Emulationstation did not see any of the roms on the external HDD. Any ideas why?

                                I've edited the wiki to make it less ambiguous, but like i said, the Linux commands are there. if you paste these commands in it will work. however if you've already deleted the path from your old install then it's too late.

                                1 Reply Last reply Reply Quote 0
                                • D
                                  dsstrainer
                                  last edited by dsstrainer

                                  For those looking for a simpler one-line solution, you can just run this all in one line at the prompt (after you disable the USB service from the retropie-setup menu and move the folder structure over to usb)

                                  sdauuid=$(ls -l /dev/disk/by-uuid/ | grep sda1 | cut -d " " -f 9) && echo UUID=$sdauuid  /home/pi/RetroPie      vfat    nofail,user,uid=pi,gid=pi 0       2 | sudo tee -a /etc/fstab
                                  

                                  It simply sets the value of the UUID to a variable, then generates the necessary fstab line, substituting the uuid value for $sdauuid variable and appends it to the fstab file. I could have also added the part where it moves the existing structure over to this one line but for readability sake I didn't.

                                  Alternatively, if you are planning on only ever having a single usb drive, you can just use a symlink and not worry about uuid

                                  cd ~;mv RetroPie RetroPie-local;ln -s /media/usb0 RetroPie
                                  

                                  This will goto your home directory, rename the existing RetroPie to RetroPie-local, and create a symlink to the usb0 drive named RetroPie

                                  Note this method isn't recommended when using more than one usb drive as it could cause a race condition on which drive is which. Fstab is best and the one liner should make it nice and easy.

                                  RetroPie v4.2 • RPi3 Model B • 5.1V 2.5A PSU • 8GB SanDisk class 10 microSD • 16GB External USB Thumb Drive
                                  Roms, images and configs stored in USB and symlinked from normal microsd location
                                  Xarcade Keyboard encoder + Zero Delay Joystick encoder

                                  1 Reply Last reply Reply Quote 1
                                  • B
                                    Bobbensun
                                    last edited by

                                    Hello all !! I've followed what's written in

                                    https://www.htpcguides.com/properly-mount-usb-storage-raspberry-pi/

                                    and also read thru and tried everything in this thread, and Retropie still doesn't load anything from the HDD.

                                    Working with a Pi3 and a Seagate usb hdd, powered thru a usb hub.

                                    The HDD is mounted, as i can see the messages in the loading screens. But nothing gets copied over.

                                    On my HDD, i made a folder called /mount.
                                    I copied the complete RetroPie folder in it ( /mount/RetroPie/ ), roms and all.

                                    I have no clue what i'm missing, and it's frustrating after 3 days of trial and error.

                                    Any help ???

                                    dankcushionsD 1 Reply Last reply Reply Quote 0
                                    • dankcushionsD
                                      dankcushions Global Moderator @Bobbensun
                                      last edited by

                                      @bobbensun our guide is here: https://retropie.org.uk/docs/Running-ROMs-from-a-USB-drive/ - it's very simple and will work.

                                      we don't support guides written on other sites.

                                      1 Reply Last reply Reply Quote 0
                                      • 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.