Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    How to stop tmp directory being cleared on reboot

    Recalbox General
    amiberry
    2
    2
    192
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • UncleChuckle
      UncleChuckle last edited by

      Hi. I'm fighting with Amiberry and learned the hard way that it doesn't keep saved configurations. I've tried multiple solutions to get Amiberry to do what I want. My last remaining hope is to STOP the tmp directory being emptied on reboot as that's where it inexplicably saves the configuration.

      I've trawled solutions online and found nothing that actually works. I just want to stop the tmp directory being emptied.

      poppadum 1 Reply Last reply Reply Quote 0
      • poppadum
        poppadum @UncleChuckle last edited by poppadum

        @UncleChuckle /tmp on Recalbox uses a ramdisk so its contents get lost when the power is turned off.

        I think the best approach would be to write simple scripts to save/restore the file(s) you want to keep to/from a location that is permanent e.g. /recalbox/share/. Use the Recalbox event system to trigger that script.

        Example:
        Create /recalbox/share/userscripts/amiberry[reboot,shutdown](sync).sh:

        #!/bin/sh
        
        cp /tmp/CONFIG_FILE_TO_KEEP /recalbox/share/CONFIG_FILE_TO_KEEP
        

        And /recalbox/share/userscripts/amiberry[start].sh:

        #!/bin/sh
        
        cp /recalbox/share/CONFIG_FILE_TO_KEEP /tmp/CONFIG_FILE_TO_KEEP 
        
        1 Reply Last reply Reply Quote 0
        • Locked by  admin admin 
        • First post
          Last post

        Want to support us ?

        110
        Online

        98.7k
        Users

        28.1k
        Topics

        187.1k
        Posts

        Copyright © 2021 recalbox.com