ROMS on CIFS SAMBA shares - EmuELEC/EmuELEC GitHub Wiki

EmuELEC can mount your ROMS from a Windows Shared Folder or a Network-attached storage (NAS) that implements the Common Internet File System (CIFS).

To mount CIFS/SAMBA shares permanently on EmuELEC follow the below steps:

  1. SSH to your EmuELEC system and go to /storage/.config/system.d folder
  2. If you want to mount a remote folder containing amiga roms, make sure the local folder /storage/roms/amiga exists and it's empty.
  3. For this specific case for amiga, you should create in /storage/.config/system.d a text file named storage-roms-amiga.mount (as it's going to be mounted in /storage/roms/amiga)
  4. The contents of this file are as follows (in the example, the NAS or Windows sharing the roms has the following address: //MYWINDOWS/roms/amiga )
[Unit]
Description=Mounting Amiga folder on samba
Requires=network-online.service
After=network-online.service
Before=emustation.service

[Mount]
What=//MYWINDOWS/roms/amiga
Where=/storage/roms/amiga
#The following option might not be required if your CIFS/SAMBA share is shared publicly without requiring any credentials) 
Options=username=YOURUSERNAME,password=YOURPASSWORD
Type=cifs

[Install]
WantedBy=multi-user.target

NOTE: if you are using windows 10 and have problems accessing your shares try adding ,vers=3.0 after the password in Options

There is a sample file in /storage/.config/system.d/cifs.mount.sample explaining the meaning of each line.

  1. To enable the CIFS/SAMBA share, type the following command: systemctl enable storage-roms-amiga.mount and systemctl start storage-roms-amiga.mount

You can check the status of this mounted shared with systemctl status storage-roms-amiga.mount

If the share is not mounted (is inactive), you can try restarting it with systemctl restart storage-roms-amiga.mount or restarting EmuELEC.

Once the share is mounted, you can see all the roms shared on //MYWINDOWS/roms/amiga available in /storage/roms/amiga

  1. EmulationStation (ES) and Retroarch (RA) will see and treat /storage/roms/amiga like a local folder. After updating the game list (MAIN MENU->GAME SETTINGS->UPDATE GAME LISTS), all the roms on the CIFS/SAMBA share //MYWINDOWS/roms/amiga will show up on ES or RA.

If you comfortable with Ansible you can automate this process using this role: https://galaxy.ansible.com/inverse/emuelec_smb