I’m not sure if this differs from other custom images but I’ve used the following setup/tutorial on Project HyperPie.
HUGE Thanks to Forrest aka “Eazy Hax” for developing this tool. We have added it run directly from the pi. Go grab his retropie toolkit, lots of good stuff in there and give his video a like, a comment and dont forget to subscribe.
Step 1. VERY IMPORTANT: You must make sure your RetroPie/HyperPie/Bartop Arcade/EmulationStation is connected to the internet via Wifi or direct ethernet cable. If you are not connected this will not work. (It downloads a file to your RetroPie before running the script).
Step 2. VERY IMPORTANT: Use a PC to format your USB drive, whether it is a HDD or just a USB stick, to NTFS. It will not work as any other File System format. (Most HDD’s are already formatted to NTFS).
Step 3. Create a folder in the root of your USB drive called “piroms.”
Step 4. Plug the USB drive into your pi and turn it on, or reboot it.
Step 5. Go to emulationstation by either quitting AttractMode and typing “emulationstation” in the command line (without the “”) or by the attract mode menu choosing to boot to emulationstation.
Step 6. Go to the RetroPie menu inside EmulationStation and scroll to “HDD expansion” and press this option.
Step 7. When it is done you can unplug your USB drive and plug it back into your PC to add your ROMs to the newly created system folders within “piroms/roms/“.
Step 8. Once you are done transferring plug the USB drive into your Pi and reboot or turn back on.
Step 9. Congratulations, your Expanded Rom Storage is now complete. Your roms are now available to play directly from your drive. no other configuration is needed.
**Note** If you ever wish to use a different drive, you must use the option to remove the HDD from the Retropie Menu. Then start the process over again. The script only allows for one (specific) drive to be connected at a time.