2014-04-15 20:53:12 -04:00
|
|
|
page_title: File Systems
|
|
|
|
page_description: How Linux organizes its persistent storage
|
|
|
|
page_keywords: containers, files, linux
|
|
|
|
|
|
|
|
# File System
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
2014-04-24 08:12:21 -04:00
|
|
|
![](/terms/images/docker-filesystems-generic.png)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
In order for a Linux system to run, it typically needs two [file
|
|
|
|
systems](http://en.wikipedia.org/wiki/Filesystem):
|
|
|
|
|
2014-04-23 16:48:28 -04:00
|
|
|
1. boot file system (bootfs)
|
|
|
|
2. root file system (rootfs)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
The **boot file system** contains the bootloader and the kernel. The
|
|
|
|
user never makes any changes to the boot file system. In fact, soon
|
|
|
|
after the boot process is complete, the entire kernel is in memory, and
|
|
|
|
the boot file system is unmounted to free up the RAM associated with the
|
|
|
|
initrd disk image.
|
|
|
|
|
|
|
|
The **root file system** includes the typical directory structure we
|
|
|
|
associate with Unix-like operating systems:
|
2014-04-23 16:48:28 -04:00
|
|
|
`/dev, /proc, /bin, /etc, /lib, /usr,` and `/tmp` plus all the configuration
|
|
|
|
files, binaries and libraries required to run user applications (like bash,
|
|
|
|
ls, and so forth).
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
While there can be important kernel differences between different Linux
|
|
|
|
distributions, the contents and organization of the root file system are
|
|
|
|
usually what make your software packages dependent on one distribution
|
|
|
|
versus another. Docker can help solve this problem by running multiple
|
|
|
|
distributions at the same time.
|
|
|
|
|
2014-04-24 08:12:21 -04:00
|
|
|
![](/terms/images/docker-filesystems-multiroot.png)
|