Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
store_games_on_a_second_usb_sata_drive [2021/04/25 14:15] – [Store Game On A Second USB SATA Drive] joinskistore_games_on_a_second_usb_sata_drive [2024/02/23 01:30] (current) – fix broken link cs
Line 1: Line 1:
-~~NOTOC~~+====== Using External Storage with Batocera ======
  
-In most cases, using a second USB hard drive to host your ROMs separately from the Batocera system should be totally transparent when you [[storage_device|use the dedicated menu item]] to enable it. +To change the storage device from INTERNAL (the drive Batocera has been flashed to) to EXTERNAL (another drive connected to the machine), follow these steps:
  
-However, when tinkering with the systems, things can go wrongThis page is here to help you troubleshoot and fix those cases.+  - Open the **Main Menu** with ''[START]'' and navigate to **SYSTEM SETTINGS** -> **STORAGE DEVICE**.\\ {{install2.jpg?nolink&500}} {{external-storage1.jpg?nolink&500}} 
 +  - Select the storage deviceSelecting "AnyExternal" will use the first external storage device that connects. How does your system decide what the first external storage device is when there is more than one connected? [[https://access.redhat.com/solutions/67778|I'd like]] to [[https://tldp.org/HOWTO/Partition-Mass-Storage-Definitions-Naming-HOWTO/x99.html|know too]].\\ {{external-storage2.jpg?nolink&500}}
  
-===== Store Game On A Second USB SATA Drive =====+In most cases, using a second USB hard drive to host your ROMs separately from the Batocera system should be completely transparent when this method is used to enable it. According to Batocera, it will just appear as if though the ''roms'' folder on your external drive is actually on your ''/userdata'' partition.
  
-Say you are running Batocera off a USB pendrive (or SD card) but want to host your ROM files on a different hard drive. In that case, you need to  edit ''/boot/batocera-boot.conf'' and provide the information of the hard drive that hosts your ROMs. In order to do that, you can list the UUID of the drive that hosts the ROMs by typing the ''blkid'' command:+<WRAP center round info> 
 +Batocera will automatically create the folder structure it needs on the drive you select after rebooting. 
 +</WRAP>
  
-  +Batocera will only show drives it supports reading the filesystem of (with that said, [[batocera.linux_architecture#user_data_file_system|it supports a lot of them]]). 
 + 
 +===== Manual configuration with batocera-boot.conf (advanced) ===== 
 + 
 +In case the above isn't sufficient, or you'd like to use individual folders for each part of userdata, the "DEVICES" storage type can offer extended functionality. 
 + 
 +<WRAP center round tip> 
 +The [[:store_games_on_a_nas|NAS]] page contains more information on the syntax. 
 +</WRAP> 
 + 
 +  - [[:edit_boot_partition|Open]] ''/boot/batocera-boot.conf'' 
 +  - Set ''sharedevice'' to ''DEVICES'' 
 +  - Add a new line containing ''sharedevice_part1='' 
 +  - Add the appropriate keyword followed by an @ character (eg. ''SHARE@'' or ''ROMS@'', [[:store_games_on_a_nas#syntax|full list of keywords here]]) 
 +  - Add the UUID of the drive containing the folder (eg. ''sharedevice_part1=SHARE@12e46ca9-xxxx-xxxx-xxxx-xxxxxxxxxx''
 +  - If not using the root of the drive, append a : and then add the folder path (eg. ''sharedevice_part1=ROMS@2efa1068-yyyy-yyyy-yyyy-yyyyyyyyyy:/Documents/roms''
 +  - Add up to ten parts as needed. 
 + 
 +These can also be combined to have individual keywords bound to individual folders. For example: 
 + 
 +<code> 
 +sharedevice=DEVICES 
 +sharedevice_part1=SHARE@12e46ca9-xxxx-xxxx-xxxx-xxxxxxxxxx 
 +sharedevice_part2=ROMS@2efa1068-yyyy-yyyy-yyyy-yyyyyyyyyy:/Documents/roms 
 +</code> 
 + 
 +===== DEV MODE ===== 
 + 
 +If the above steps aren't sufficient for your purposes, you can set up the external drive manually. This will be done by editing the ''/boot/batocera-boot.conf'' file in the [[:edit_boot_partition|boot partition]] and providing the information of the partition that hosts the ROMs. 
 + 
 +The list of UUIDs of all drives connected to the system can be printed with the ''blkid'' [[:access_the_batocera_via_ssh|command]]. It will output something similar to the following: 
 + 
 +<code>
   /dev/sdb2: LABEL="SHARE" UUID="12e46ca9-xxxx-xxxx-xxxx-xxxxxxxxxx" TYPE="ext4"   /dev/sdb2: LABEL="SHARE" UUID="12e46ca9-xxxx-xxxx-xxxx-xxxxxxxxxx" TYPE="ext4"
   /dev/sdb1: LABEL="BATOCERA" UUID="zzzz-zzzz" TYPE="vfat"   /dev/sdb1: LABEL="BATOCERA" UUID="zzzz-zzzz" TYPE="vfat"
   /dev/sda1: LABEL="SHARE" UUID="2efa1068-yyyy-yyyy-yyyy-yyyyyyyyyy" TYPE="ext4"   /dev/sda1: LABEL="SHARE" UUID="2efa1068-yyyy-yyyy-yyyy-yyyyyyyyyy" TYPE="ext4"
 +</code>
 +
 +In this example, ''/dev/sda1'' is the partition on the drive hosting my ROM files. ''/dev/sdb1'' is the Batocera boot partition and ''/dev/sdb2'' is the rest of the Batocera USB pendrive (that I don't want to use).
 +
 +Open the ''/boot/batocera-boot.conf'' file. Change the ''sharedevice'' to ''DEV [UUID of the desired partition]''. For example:
 +
 +<code>
 +sharedevice=INTERNAL
 +</code>
 +
 +would be replaced with
 +
 +<code>
 +sharedevice=DEV 2efa1068-yyyy-yyyy-yyyy-yyyyyyyyyy
 +</code>
  
-In that example, ''/dev/sdb1'' is my Batocera boot partition''/dev/sdb2'' is the rest of my Batocera USB pendrive (that I don't want to use) and ''/dev/sda1'' if the partition hosting my ROM files. In order to use that partition, I need to edit ''/boot/batocera-boot.conf'' and put:+If the drive is empty, the folder structure for the ROM files will be created on next reboot.
  
-  # device to the share data (userdata) +If you are using an external hard drive and it is not recognized correctly after doing this, then it might be that your external hard drive needs more time to spin up while Batocera boots. In those cases you have to edit the ''/boot/batocera-boot.conf'' file and add the line: ''sharewait=15'' underneath the aforementioned line (if it still does not work, try with a higher number like ''sharewait=20'' for example).
-  sharedevice=DEV 2efa1068-yyyy-yyyy-yyyy-yyyyyyyyyy +
-   +
-  # disable the splashsound (remove the # to disable sound) +
-  #splashsound=false +
-   +
-  # enable the nvidia driver (remove the # to enable it) +
-  #nvidia-driver=true+
  
-Otherwise you can also choose the drive, where you want your ROM files to be located, directly in Batocera EmulationStation Menu, by going to ''System Settings'' and select the drive you want to use under ''Storage Device'' and then reboot. The file structure for the ROM files will then (during the reboot) be created automatically (if not already present) on this drive. 
-If you are using an external hard drive and it is not recognized correctly after doing this, then it might be, that your external hard drive needs more time to spin up, than the boot time of batocera is. 
-In those cases you have to edit the ''/boot/batocera-boot.conf'' file and add the line: ''sharewait=15'' 
  • store_games_on_a_second_usb_sata_drive.1619352951.txt.gz
  • Last modified: 3 years ago
  • by joinski