The Linux System Administrator's Guide: Version 0.7 | ||
---|---|---|
Prev | Chapter 4. Overview of the Directory Tree | Next |
The root filesystem should generally be small, since it contains very critical files and a small, infrequently modified filesystem has a better chance of not getting corrupted. A corrupted root filesystem will generally mean that the system becomes unbootable except with special measures (e.g., from a floppy), so you don't want to risk it.
The root directory generally doesn't contain any files, except perhaps the standard boot image for the system, usually called /vmlinuz. All other files are in subdirectories in the root filesystems:
Commands needed during bootup that might be used by normal users (probably after bootup).
Like /bin, but the commands are not intended for normal users, although they may use them if necessary and allowed. /sbin is not usually in the default path of normal users, but will be in root's default path.
Configuration files specific to the machine.
The home directory for user root. This is usually not accessible to other users on the system
Shared libraries needed by the programs on the root filesystem.
Loadable kernel modules, especially those that are needed to boot the system when recovering from disasters (e.g., network and filesystem drivers).
Device files. Some of the more commonly used device files are examined in Chapter 5
Temporary files. Programs running after bootup should use /var/tmp, not /tmp, since the former is probably on a disk with more space. Often /tmp will be a symbolic link to /var/tmp.
Files used by the bootstrap loader, e.g., LILO. Kernel images are often kept here instead of in the root directory. If there are many kernel images, the directory can easily grow rather big, and it might be better to keep it in a separate filesystem. Another reason would be to make sure the kernel images are within the first 1024 cylinders of an IDE disk. [1]
Mount point for temporary mounts by the system administrator. Programs aren't supposed to mount on /mnt automatically. /mnt might be divided into subdirectories (e.g., /mnt/dosa might be the floppy drive using an MS-DOS filesystem, and /mnt/exta might be the same with an ext2 filesystem).
Mount points for the other filesystems. [2]
[1] |
This 1024 cylinder limit is no longer true in most cases. With modern BIOSes and later versions of LILO (the LInux LOader) the 1024 cylinder limit can be passed with logical block addressing (LBA). See the lilo manual page for more details. |
[2] |
Although /proc does not reside on any disk in reality. See the section about /proc later in the chapter. |