1.典型的Linux文件系统组成
1.bootfs (boot file sysytem)
系统启动后,bootloader将引导加载kernel,当kernel被加载到内存后会umount bootfs。
2.rootfile (root file system)
包括/dev /proc /bin /etc /usr等标准目录和文件,对应不同的linux发行版本,如ubuntu、redhat centos等,bootfs基本一致,但rootfs会有不同。
2. Docker启动过程
1.Linux启动过程:
Linux系统启动后,首先将rootfs设置为readonly,经过系统检查后,将其切换为readwrite供用户使用。
2.Docker启动
初始化时将rootfs以readonly方式加载并检查,并利用union mount的方式将一个readwrite文件系统挂载在readonly;并允许再次将下层的fs (file system)