Games on flash drive
  • I would like to keep all my games on a flash drive and have the emulators look at my specified folders in the flash drive.
    This is where I need help.
    What are all the files I will need to modify for this. I know ill have to change the directories for the emulators but I will probably also have to change the directories for Rom Scraper.

    Also, what is the directory for the flash drive?
    Is it /media/nameofflashdrive? or am I missing something?

    Thanks for the help!
  • the easiest way is to create a symbolic link (symlink). It's basically like a shortcut. So you would do
    cd ~/pimame
    rm - r roms
    ln -s /path/to/flash-drive roms


    but first, I would make your system auto-mount your usb stick. it makes things way easier.
  • As always, thanks for your generous assistance mholgatem. Now can you dumb it down for us inexperienced users... haha
  • Im pretty sure I accomplished the auto-mount. I did the step by step instructions... not sure why we called it NASDRIVE but I did everything it said.

    Now do I enter your code into the terminal as well or do I have to add that to one of the files?

    I tried plugging in your code into the terminal and I get a message saying:
    cannot remove roms: Is a directory
  • you can call the mount point anything that you want. I called mine usb-drive.

    you are probably getting an error because it looks like I have an extra space in there between the '-' and the 'r'. It should just be:
    cd ~/pimame
    rm -r roms
    ln -s /media/NASDRIVE roms
  • should I change that last line to
    ln -s /media/NASDRIVE/roms
    because I have a "roms" folder inside the flashdrive

    Or should it be
    ln-s /media/NASDRIVE/roms roms?
  • it should be
    ln -s /media/NASDRIVE/roms roms
  • If I sucessfully do this, would I need to keep the images for rom scraper on my flash drive as well? I see that I am supposed to keep them in the rom folder.
  • yes, you would keep them on the flash drive as well
  • I couldnt get it to work following the instructions posted on that website, but I found another site with different directions and I got it to work with a combination of the two... Ill try to do it from scratch and if I figure out how I did it will post up instructions for anybody else interested in doing the same thing.
  • make sure usb drive is not plugged in. open terminal and run this
    ls -l /dev/disk/by-uuid/
    you will get something like this
    lrwxrwxrwx 1 root root 15 Feb 21 04:59 1263ae8d-aaf3-41b6-9ac0-03e7fecb5d6a -> ../../mmcblk0p2
    lrwxrwxrwx 1 root root 15 Feb 21 04:58 CB99-4C7E -> ../../mmcblk0p1


    now plug in the usb drive and run this again
    ls -l /dev/disk/by-uuid/
    now you will get a different result here is what i got
    lrwxrwxrwx 1 root root 15 Feb 21 04:59 1263ae8d-aaf3-41b6-9ac0-03e7fecb5d6a -> ../../mmcblk0p2
    lrwxrwxrwx 1 root root 10 Mar 4 02:21 BEDB-4D23 -> ../../sda1
    lrwxrwxrwx 1 root root 15 Feb 21 04:58 CB99-4C7E -> ../../mmcblk0p1

    you want to focus on the new one and take the uuid listed. mine is BEDB-4D23

    next you want to run this
    sudo cp /etc/fstab /etc/fstab.backup
    then this
    sudo nano /etc/fstab
    you will get something like this
    proc            /proc           proc    defaults          0       0
    /dev/mmcblk0p1 /boot vfat defaults 0 2
    /dev/mmcblk0p2 / ext4 defaults,noatime 0 1
    # a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that


    next you want to add this line using your own uuid
    this is the line i am adding
    UUID=BEDB-4D23 /media/GAMESDRIVE vfat    auto,users,rw,flush,utf8=1,uid=1000,gid=1000,umask=007     0      0

    note that my usb drive is fat32 and named GAMESDRIVE

    so the file should look like this with that line added
    proc            /proc           proc    defaults          0       0
    /dev/mmcblk0p1 /boot vfat defaults 0 2
    /dev/mmcblk0p2 / ext4 defaults,noatime 0 1
    UUID=BEDB-4D23 /media/GAMESDRIVE vfat auto,users,rw,flush,utf8=1,uid=1000,gid=1000,umask=007 0 0
    # a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that


    now press ctrl o and enter to save and ctrl x to exit
    no do sudo reboot and hope for the best...

    At this point I rebooted but it kept freezing. I unplugged everything and plugged the usb on my laptop and it said there are some errors and gave me the option to fix. I agreed. it did its thing and said it was fixed. I plugged it back into the raspberry pi and it booted right up.
    Once it loaded I pressed esc and typed this in
    cd ~/pimame
    rm -r roms
    ln -s /media/GAMESDRIVE/roms roms


    Note: my flashdrive is called GAMESDRIVE and inside I have a folder named roms, and inside that folder I have individual folders that hold games for individual emulators. Basically the same layout that is in the original roms folder on the piplay.

    next I typed exit. and it showed my games. I then rebooted the pi just to be safe and everything is still good.

    Hope this helps others.
  • Thanks @krayzielilsmoki - glad you got it working!
  • just so you know, you can wrap your text in the following html tags:
    open - ><code><pre><b><i>
    close -></code></pre></b></i>
  • Wow that looks so much cleaner. Thanks!
  • yup, no problem! Took me a while to figure that out as well!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!