/run
é um tmpf catchall em RAM para o Debian, com os outros ( lock
, etc.) sendo symlinks. Por padrão, o tamanho do /run
tmpfs é definido para 50% da sua memória física .
/tmp
é feito um tmpfs somente se RAMTMP=yes
ou um sistema de arquivos raiz somente leitura for detectado.
De acordo com o wiki do Debian , estas são as etapas para montar /run
, /tmp
, etc., realizado por initscripts e initramfs-tools :
Stage #1: Initial package install
- /run is created on package installation
- /var/run is bind mounted to /run
- /var/lock is bind mounted to /run/lock
- /dev/shm is bind mounted to /run/shm
This ensures that the /run hierarchy is present, but /var/run and /var/lock are still used for storing the files and directories accessed via /run.
Stage #2: After system reboot
- A tmpfs is mounted on /run
- (Optional) A tmpfs is mounted on /run/lock if RAMLOCK is configured
- (Optional) A tmpfs is mounted on /run/shm if RAMSHM is configured
- (Optional) A tmpfs is mounted on /tmp if RAMTMP is configured
- A symlink /var/run → /run is created (falls back to bind mount if symlink failed)
- A symlink /var/lock → /run/lock is created (falls back to bind mount if symlink failed)
- A symlink /dev/shm → /run/shm is created (falls back to bind mount if symlink failed)