This is an old revision of the document!
Overlays
Batocera is like a firmware. It's a huge file named /boot/batocera which expands into the virtual file system root on boot. You cannot modify it directly, and for most use cases, you shouldn't need to modify it. All the user data is stored in /userdata/, which is writable.
That said, you can utilize overlays to “patch” certain files over batocera at boot.
/boot/ directory
This is the platform-specific boot partition, usually FAT32 but can depend on the device. This partition is physical and can be edited by any other system should you plug the drive into another machine.
If you need to modify anything in /boot/ while the system is running, run the following command (in either Xterm (F1 > Applications) or SSH):
mount -o remount,rw /boot
This will make the /boot/ partition writable until next boot. No need to do anything to change it back.
Other system files
For modifications to the regular Batocera virtual file system, you can directly edit the files in their directory (for example if you want to play with the configgen scripts in /usr/lib/python3.9/site-packages/configgen/generators/ or change the parameters in /usr/share/batocera/configgen/configgen-defaults-arch.yml). Once the modifications are done, you can save them with the command:
batocera-save-overlay
This script creates a patch file at /boot/boot/overlay which stores the differences between the current virtual file system and the one stored in /boot/batocera.
WARNING: This overlay file is automatically removed at the next upgrade.
If you don't use the batocera-save-overlay script, you can still edit the files in /usr/ but any modification will be lost on reboot.
If you want to remove all your customizations, just remove the /boot/boot/overlay file.
By default, Batocera overlay files are limited to 50MB. If your modifications are over 50MB, you can specify the size of the overlay with the command. Keep always a bit of margin, the overlay will embed a few more files than those you were expecting (some system files created on-the-fly at boot time). For example, if you need to save 120MB of data on the system, you can type batocera-save-overlay 120.
This cannot be done for the current (v31) Odroid XU4 version.
Cases when you don't need to modify the system
Some best practices here:
- You generally don't need to edit
/etc/fstab, use configure your external storage or configure your NAS instead. - You should not modify
/usr/share/emulationstation/es_systems.cfg. Instead, follow the instructions at the customize systems page.
- modify_the_system_while_it_s_running.1629713497.txt.gz
- Last modified: 5 years ago
- by atari