Mame4all Roms on USB Drive
  • I am sorry if this was already answered, I looked but wasn't able to find a forum post that got me over the hump.

    I want to store my ROMS on a USB drive, not the SD card.
  • Having trouble posting more details ...
  • I have a USB drive called 'Passport' that is connected to a powered USB hub
  • At the PI Desktop I can browse to /media/passport and see the roms. I have tried to change the mame.cfg rompath value to match, but is does not work
  • Can anyone help?
  • which MAME are you trying to run? Advmame or MAME4All
  • Mame4All - What I read suggests this is the faster of the two
  • I did find that I can launch mame4all from the desktop and see the roms, but not when I run mame4all from the startup. Do I need to do something to mount the drive at startup?
  • You need to mount your drive at startup. It's very easy to setup.

    -Plug in your drive and then startup your system and get to the console.
    -type: 'ls -laF /dev/disk/by-uuid' and press 'enter'.

    The first couple of lines will be the sd card partitions, after that, you will see something like 'lrwxrwxrwx 1 root root 9 Jan 1 1970 6060A74A60A725AE -> ../../sda'. In this case '6060A74A60A725AE' is the UUID of my drive (yours will be different).

    -Save the the UUID number.

    -type: 'sudo nano /etc/fstab' and press 'enter'.

    This is the file that is read by mount at boot. Add a new line for your device, here is an example:

    UUID=6060A74A60A725AE /home/pi/roms ext4 defaults 0 0

    the breakdown of an fstab entry:

    [device] [mountpoint] [filesystemtype][options] [dump] [fsckorder]

    -quit and save fstab.
    -type: 'sudo mount -a' to mount everything listed in fstab (or you can reboot).

    your drive should now be mounted to '/home/pi/roms' and if you set up your file structure the same as what is in the pimame roms folder, then you wont need to edit any of the config files or create any symlink's.


    Additional notes:
    -You may need to change the owner settings with 'chown'.
    -If your drive is formatted to a different filesystem type, you need to change that in your fstab entry. If you want to use ntfs (so that your drive is also windows compatible), you have to download a driver.
    -If you want to mount your drive somewhere else or your file structure is different, you may want to look into using symlink's (symbolic links) to direct your system to the correct locations.
    -You can also download 'usbmount' by typing: ‘sudo apt-get install usbmount’, 'enter', 'y', 'enter'; then edit the configuration file to tell it where to mount.

    if you need help, here are references:
    http://elinux.org/RPi_Adding_USB_Drives
    http://www.debianhelp.co.uk/fstab.htm
  • mholgatem - Thank you for all of your help.

    I followed your instructions and had to make a few changes.

    1) The usb drove is formatted as extFat, which I downloaded the driver for and added the line into the fstab file.

    2) I had to include the a option in fstab to ignore any files in the /home/Pi/roms folder when mounting.

  • The problem now is I can't get mam4all to read the roms regardless if I do it from the desktop, or the startup menu
  • You may need to change ownership/access permissions via fstab. I had this problem with mine (I figured that it was just because I used ntfs format). To do this, You need to use dmask and users in the options column. This is my fstab entry for the drive containing my roms:

    UUID=6060A74A60A725AE /usb-drive ntfs users,defaults,dmask=000 0 0

    (you need to make sure that you add your user to the 'root' group: usermod -a -G )

    I also just recently came across this solution, which I have not yet tried, but may work without you needing to add your current user to any group

    UUID=6060A74A60A725AE /usb-drive extFat user,rw,dmask=000 0 0

    notice 'user', rather than 'users'. This allows ANY user to mount a drive, but implies noexec, nosuid, nodev, unless overridden. So we add the rw (to add read write privileges), then a directory-mask of 000 to give full rights.

    I hope that this helps!

  • I was able to get it to work by changing fstab entry to mount the drive to /media/usbhdd and then adjust the mame config file to have the roms location entry be to /media/usbhdd/mame4all.

    Thank you for all of your help!
  • Issue Solved

Howdy, Stranger!

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