Successfully upgraded to Vanilla Forums v2.6. Please report any issue you may find.

USE HDD FOR ROMS OR USE A SAMBA SHARE

========================================================================
If you have ordered the indieGO! with an HDD, you will get it preinstalled. /home/odroid/Roms is located on the HDD. So you can store all the ROMS on the HD.
========================================================================


For everyone else (on the prebuild indieGO! I use variant 2):
There are multiple ways to use an HDD instead of the SD-card for storing roms:

=========================First way:=========================

To create a Symlink to a connected HDD you can:
Copy over the folder /home/odroid/ROMS to a connected harddrive
-------------------------------------------------------------------
cp -av /home/odroid/ROMS /media/odroid/MyHDD/
-------------------------------------------------------------------
delete or rename the folder on your SD/eMMC card
-------------------------------------------------------------------
mv /home/odroid/ROMS{,.bak}
-------------------------------------------------------------------
create a symlink from your HDD to where the original folder was located.
-------------------------------------------------------------------
ln -sf /media/odroid/MyHDD/ROMS /home/odroid/ROMS
-------------------------------------------------------------------


=========================Second way:=========================
mount a partition on an HDD as the ROMS folder
-------------------------------------------------------------------
mount the partition somewhere so you can copy files over
-------------------------------------------------------------------
mount /dev/sdb1 /mnt
-------------------------------------------------------------------
copy the CONTENT of ROMS folder on the partition
-------------------------------------------------------------------
cp -av /home/odroid/ROMS/* /mnt/
-------------------------------------------------------------------
unmount the partition from where you put it to copy the files over
-------------------------------------------------------------------
umount /mnt
create a fstab entry for the new partion
-> Edit /etc/fstab with your favorite editor as ROOT and add an entry for the partition:
-------------------------------------------------------------------
/dev/sda1 /home/odroid/ROMS ext4 defaults,nofail 0 0
mount the partition
-------------------------------------------------------------------
mount -a
-------------------------------------------------------------------
make sure the folder and it's content belongs to user odroid
-------------------------------------------------------------------
chown -R odroid:odroid /home/odroid/ROMS


=========================3rd way:=========================
Mount a samba share
make sure cifs-utils are installed (next update will include it if it is missing)
-------------------------------------------------------------------
apt-get install gifs-utils
-------------------------------------------------------------------
edit /etc/fstab as ROOT with your favorite editor and add an entry for your samba share
For example:
-------------------------------------------------------------------
//10.0.0.1/ROMS /home/odroid/ROMS cifs credentials=/home/odroid/.smbcredentials,uid=odroid,gid=odroid 0 0
-------------------------------------------------------------------
as user ODROID create a file .smbcredentials in the homefolder of odroid (/home/odroid) with the following content:
-------------------------------------------------------------------
username=
password=
domain= (mostly WORKGROUP)
-------------------------------------------------------------------
The preferred one is the Samba option since it allows to mount the same ROMS on different devices/odroids and share them over different machines.
«1

Comments

  • Hallo Pascal,

    Ich benötige noch einen Tipp: Ich habe eine Festplatte mit ca. 800 GB Roms bereits in die Indigo eingebaut und habe wenig Lust, das alles wieder auszubauen. Wie gehe ich da am besten vor? Kann ich eine 2. Festplatte per USB anschließen, alles von der eingebauten auf diese transferieren und dann die eingebaute Platte zu partitionieren und danach die Roms wieder zurück kopieren?
  • edited December 2016
    Hi,
    Im Grunde muss man die fstab anpassen.

    /etc/fstab


    /dev/sdb1 /home/odroid/ROMS ext4 defaults 0 0


    Siehe oben.. Second way
    Aber in deinem Fall ist es halt nicht "ext4" sondern:
    ntfs

    Ausserdem wollen wir verhindern, das die Konsole nicht bootet wenn was mit der Platte nicht stimmt und ergänzen "nofail" in der Zeile die wir in der fstab ergänzen.

    /dev/sdb1 /home/odroid/ROMS ntfs defaults,nofail 0 0

    Die Daten auf der Platte musst du dann so organisieren wie bisher ubter /home/odroid/roms bisher

    Also Verzeichnisse nach Systemen benannt.

    Unter gparted kannst du mal prüfen ob deine Platte auch als "sdb" und nicht "sda" eingebunden ist.
  • Eine zweite Platte ginge auch .. aber oben genanntes erledigt es auch.
  • Danke, ich werde berichten :smiley:
  • Das sollte funktionieren ..
    Das Automatik Script erwartet halt ext4..
  • Hallo, die SD Karte funktioniert, aber ich bekomme einfach die Befehle u.s.w. zum einbinden nicht hin. Ich werde alle Roms auf eine andere Platte kopieren, dann, die eingebaute Platte auf ex Fat formatieren und dann partitionieren, danach dann das automatische Script laufen lassen und wieder die Roms zurück kopieren...nix für Windows Kinder hier ;)
  • edited December 2016
    nööö!
    Das ist linux.. und da gibt es ein Zauberwort namens "sudo"

    Das muss vor die Befehle!
    Ansonsten geht das System davon aus das du "doofer normal user" bist und nicht an Systemdaten darfst ; )
    Ohne sudo bist du kein Admin.

    um die fstab bearbeiten zu können, musst du
    "sudo nano /etc/fstab" eintippen (im Terminal)

    oder wenn du es grafisch magst:
    sudo pcmanfm

    und dann nach /etc/ navigieren und dann die Datei fstab mit leafpad "editor" öffnen.

  • exFAT ist böse! EXT4 ist nicht Exfat!
  • Ahhh...wieder was gelernt. Ich versuch's noch mal - Danke für den Hinweis!
  • Does this method also work for external hdd's?
  • Hi,
    Yes, the internal one is also connected via USB.
    It is technically and external hdd just mounted inside the case : )
  • Hi,

    I created a partition on a new HDD (that I built in the IndieGO) following exactly the steps described in the video from the 'release notes 1.5.x' post and everything seems fine as it looks exactly on my screen like it is in the video.

    I then tried the second way described here to copy to ROM content from SD to HDD and I get the following error message:
    'Failed to preserve ownership for '/mnt/every_folder_and_file': operation not permitted'

    I get exactly the same error message when I use the script in the SETTINGS.

    So what is the problem why it is not permitted?
    I tried the copy comand with and without SUDO.
    I deleted the new partition and create the new one again. Then restarted the system -> same result...

    How can I solve it?
    Cheers,
    Oliver


  • The problem may be that your hdd is not named sdb but sda.. this is somewhat randomly.

    To come around this, you must edit the fstab file in home odroid and replace sdb by the UUID or your hdd.

    In a few hours I can post a how to.
  • If you follow the second step as written here, there is a typo in the description.

    In one line it says sdb1 and in one line sda1 ..
    It can only be one of it. You need to check how you hdd is labeled after boot..
    It can be sdb1 or sdb2.

    You can open Gparted and see how it is labeled
    Than adapt sdb or sda in the description of the second way.

    Than it should work.


    If you did this, take a rest and check the lines below to prevent problems if you attach another USB device


    -----------------------

    Here we go..

    First of all the script in the setting menu assumes that your HDD is labeled as sdb..

    Problem:
    Meanwhile we have learned that this label is set randomly at boot... so it can change any time, for example if you add another USB-Stick which will be labeled sdb and so the HDD becomes sda.

    Now we need to use something "unique" and never changing as identifier for your HDD.

    The best thing is to use the UUID.
    ---------------------------------------------------------------------------------------
    How to get the UUID of my HDD?

    Answer:
    Type "sudo blkid" (without "") in the terminal.

    You should get a list of the 3 partitions. 2 of them are from the main micro-sd (boot partition and root partition). The one which is named sdb or sda is what we are looking for.

    Copy the UUID without the "" (using a mouse and the right click copy and paste menu)
    ---------------------------------------------------------------------------------------
    Now type "sudo leafpad /etc/fstab

    This opens the fstab file in the text editor.
    Attention!!! Don't risk a typo!!!! Copy and paste the UUID and double check if you copied all numbers and signs!!!!!!!!! A typo in this file can cause a read only Filesystem which can't be repaired if you don't have an linux PC to access the fstab file!!!!!

    So.. relax.. breath in and out.. drink a tea and look at the last line of the fstab file..
    It should look like this:

    /dev/sdb1 /home/odroid/ROMS ext4 defaults,nofail 0 0


    As you can see the script assumes that the HDD is called sdb1 ...

    We need to change the identifier to the UUID

    If your output from "sudo blkid" was:
    /dev/sda1: LABEL="NAME" UUID="5e2f35bf-4894-4586-ad64-8da2ca9c61bd" TYPE="ext4"

    Than we need to copy and paste "5e2f35bf-4894-4586-ad64-8da2ca9c61bd" without the " ".

    Not the replace "/dev/sdb1/ with "UUID=5e2f35bf-4894-4586-ad64-8da2ca9c61bd" without the " ".

    So the last line in the fstab will read as:
    UUID=5e2f35bf-4894-4586-ad64-8da2ca9c61bd /home/odroid/ROMS ext4 defaults,nofail 0 0

    ---------------------------------------------------------------------------------------------------------------------------------
    Don't delete a space and don't forget a sign of the UUID or it will cause trouble.
    Don't type.. just copy and paste to reduce failures.

    If you double checked, save the file in the editor.
    Than reboot.

    If you open now the Home icon on the desktop and than check the "Bookmark" called "ROMS" it should show a free space, matching your HDD.

  • edited April 2017
    A great tool to prepare a HDD under Windows: MiniTool Partition Wizard (it's free).

    Another thing to prevent trouble adding a HD, connect the power part of the Y cable directly to the charger (which I now have inside of the console) instead of using a usb extension cable to connect it outside of the console. Using a usb extension cable will somehow cause your HDD to appear/disappear/appear etc. and probably drive you ***ing nuts.
  • **ing nut : ) .. Kids could read this ; )
  • Hi,

    Another stupid question from me I'm afraid, but keep in mind I'm not overly familiar with Linux...

    How do I log in as ROOT? I've been able to get to the desktop, and have created the .smbcredentials file, but I can't do the fstab editing that's required as I'm logged in as ODROID.

    I'm also not certain if I have cifs installed, and I get privilige errors when I run "apt-get install gifs-utils" (again presumably as I'm logged in as ODROID).
  • use "sudo apt-get install gifs-utils" sudo runs your command as root.
  • edited April 2017
    Thanks MarkB. I've tried that command. Now it's saying "[sudo] password for odroid:" instead. Any ideas?

    Also obviously this still doesn't help me edit fstab...?

    Sorry, I really do need hand-holding through these steps. Hoping once I have my ROMs mapped, everything else will be a bit simpler for a novice like me :)
  • The password is the same as username, after that the command is executed as root. For the rest follow the steps outlined by @Phoenixkonsole
  • I have only used the default setup so I cannot help you with the rest unfortunatly but I have some linux knowledge and the steps appear to be correct ;)
  • edited April 2017
    Thanks Mark. Getting somewhere now - the password 'odroid' works. However the package gifs-utils can't be located. I tried changing it to cifs-utils in case this is a typo and a lot more happened, although failed to fetch a load of files from denebian.org

    Trying to post a photo of the screen but it's failing to upload here.
  • Meanwhile, I've been trying to edit etc/fstab.

    I open up the file by double clicking it while on desktop mode
    I add the new line to the bottom (I assume this is what I'm meant to do)
    I close it and get a save prompt
    I select etc/fstab
    I get the error "can't open file to write"

    Pascal, desperately in need of a proper manual here. I was kinda hoping it would be ready out of the box - and while I'm open to rolling my sleeves up and doing some manual stuff, im working absolutely blind here.
  • Hi Matt,

    I am using a trick to open the file manager with root access.

    Open a terminal and type:
    sudo pcmanfm

    it will open a filemanager.

    Now you can navigate and open the /etc/fstab file as root.

    Attention!!!!
    Make sure to enter the correct UUID (every HDD can have another one!)

    You can check the UUID with a tool called Gparted.
    It can be found on dock (hidden on the top of the desktop).
    Applications -> System-> Gpated

    It will also ask for the password. "odroid"

    Now change on the top right Flyout-button from mmcllblabla0 (which is the SD-card) to the "sdb" which is the HDD.

    Do a right click on the Patriotion naming (one is called boot) -> choose Information
    A window will pop- up with some infos about the device as like the UUID.
    Mark and copy it with the mouse.

    In the text-editor make sure that you enter the correct UUID by copying it (right click -> paste)

    UUID=5e2f35bf-4894-4586-ad64-8da2ca9c61bd /home/odroid/ROMS ext4 defaults,nofail 0 0

    Attention:
    Did you run the Script in the indieGO! -Setting menu already?
    If not, do it in advance before edititing the fstab file.

    The script will copy the ROMS folder and all content to the HDD

    Check in desktop mode if copying worked by clicking on the HDD icon.
    Does it show the roms folder?
  • Great, thanks - getting there! Been able to edit the fstab file. I haven't done anything with the UUID etc as I'm using a Samba share for my ROMs.

    Not sure what happens next though? How do I now access the ROMs when I go into EmulationStation?

    Apologies for the dumb questions. Once I'm through this next step I think I'll be able to take care of myself and start enjoying some classic games :)
  • EmualtionStation will show a emulated system as soon you placed ROMS for it to /home/odroid/ROMS

    Lets say you put SFC files (super famicom) to /home/odroid/ROMS, than the SNES will appear in EmulationsStation. If you open the SNES Menu in ES, it will list all files and you can launch the game you wish.
    Same for all other systems. As long you don't place a ROM to a System folder inside the ROM folder, the SYTEM will not be listed in EmulationStation. As soon you copy some ROMS, bam -> the system will pop up in EmulationStation as well.
  • edited May 2017
    Hi - that's fine, but the ROMs aren't in /home/odroid/ROMS. They're on my NAS. I'm looking for a way to keep them on the NAS and map the drive across. I don't want to copy my ROMs onto the internal drive.

    Attached images - any idea what I'm doing wrong?
  • edited May 2017
    Ahh.. I will think about a solution
  • Ok.. basically it should be possible as mentioned in the 3rd way of post number one.
    You have also to edit the fstab + you need to create a file containing the password to access the NAS.

    Attention!
    Files starting with a "." in the filename are invisible.
    To see them in the file manager you need to enable them in the View menu or press ctrl+H (Hidden) to make them visible or invisible.
Sign In or Register to comment.