= Alpine Linux Storage = Alpine Linux is designed to run as a 'read-only' operating system. All data is written to memory at boot, and continues to run on memory alone. <> ---- == Diskless Mode == The default behavior of Alpine Linux as described above is called '''diskless mode'''. Because the operating system is running on memory, changes (such as editting a file) do not persist. To make a change persist, the change must actually be committed to a boot overlay file. The `lbu` utility is provided for this. {{{ lbu commit -d }}} To show what would be committed without commiting, try one of: * `lbu commit -n` * `lbu status` * include the `-a` flag to list all items that would be commited, not just what has changed since the last commit * `lbu list` * `lbu diff` By default, `lbu` only tracks `/etc` except for `/etc/init.d/`. To track other files, try: {{{ lbu include /path/to/file }}} And to untrack a file, try: {{{ lbu exclude /path/to/file }}} ---- == Data Disk Mode == Persistent storage can be mounted [[Linux/FileSystems#Usage|through normal processes]]. The primary use case is preserving `/var` (e.g. backtraces and panics that are captured in logs, but will be lost on reboot), or providing [[Linux/Swap|swap space]] to augment the amount of memory available on a machine. Backup commits made by `lbu` are saved to `/var` in this mode of operation. ---- == System Disk Mode == A normal operating system installation. ---- CategoryRicottone