您的位置:首页 > 运维架构 > Linux

where does root (/) mount point exist — linux

2015-12-30 17:56 429 查看
There are actually two root filesystems in most normal Linux boot processes.

The real root filesystem is located in a partition or logical volume on a physical disk - it is not loaded into RAM as a filesystem, though blocks of it will exist in cache in RAM when they have been
accessed recently. Updates to this filesystem are written to disk as they happen. The root filesystem may also be on a network resource, though in this case it is usually held in a partition/volume/file on a physical disk somewhere too.

The initial root filesystem is loaded into RAM along with the kernel very early in the boot process. This is a small filesystem found in a file under 
/boot
 containing
just the kernel modules/drivers, scripts, and other utilities that might be required to find, verify and mount the real root filesystem (RAID and LVM modules for instance, or NFS modules/tools if you mount root over the network). Once the real root filesystem
is mounted this special "initial" one is thrown away. The 
initrd
 (which
stands for INITial Ram Disk) will be rebuilt when significant changes are made, such as installing a new kernel package. It is not (usually) updated by other actions.

The above is true for most Linux installs, though it can be quite different for special cases such as some live systems on writeable CDs/DVDs or USB drives.
but where does directory / exist.. ?


It doesn't physically. Unlike other mount points which are directories in other filesystems (such as directories under 
/mnt
 or 
/media
,
though they can be practically anywhere) the mount point for 
/
has
no physical presence and is a virtual object held only in the kernel's internals. The filesystem mounted as 
/
 on
the other hand is one of the two listed above - an 
initrd
 file
in memory during the early boot process or a filesystem on a physical disk or network resource at other times (except, as mentioned above, in some special cases).
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux