Next: 18. UNIX Devices Up: rute Previous: 16. Pre-installed Documentation   Contents Subsections 17. Overview of the UNIX Directory LayoutHere is an overview of how UNIX directories are structured. This is a simplistic and theoretical overview and not a specification of the LINUX file system. Chapter 35 contains proper details of permitted directories and the kinds of files allowed within them.
17.1 PackagesLINUX systems are divided into hundreds of small packages, each performing some logical group of operations. On LINUX, many small, self-contained packages interoperate to give greater functionality than would large, aggregated pieces of software. There is also no clear distinction between what is part of the operating system and what is an application--every function is just a package. A software package on a RedHat type system is distributed in a single RedHat Package Manager (RPM) file that has a .rpm extension. On a Debian distribution, the equivalent is a .deb package file, and on the Slackware distribution there are Slackware .tgz files. Each package will unpack as many files, which are placed all over the system. Packages generally do not create major directories but unpack files into existing, well-known, major directories. Note that on a newly installed system there are no files anywhere that do not belong to some package.
17.2 UNIX Directory SuperstructureThe root directory on a UNIX system typically looks like this:
The /usr directory typically looks like this:
The /usr/local directory typically looks like this:
and the /usr/X11R6 directory also looks similar. What is apparent here is that all these directories contain a similar set of subdirectories. This set of subdirectories is called a directory superstructure or superstructure. [To my knowledge this is a new term not previously used by UNIX administrators.] The superstructure always contains a bin and lib subdirectory, but almost all others are optional. Each package will install under one of these superstructures, meaning that it will unpack many files into various subdirectories of the superstructure. A RedHat package would always install under the /usr or / superstructure, unless it is a graphical X Window System application, which installs under the /usr/X11R6/ superstructure. Some very large applications may install under a /opt/<package-name> superstructure, and homemade packages usually install under the /usr/local/ superstructure ( local means specific to this very machine). The directory superstructure under which a package installs is often called the installation prefix. Packages almost never install files across different superstructures. [Exceptions to this are configuration files which are mostly stored in /etc/.] Typically, most of the system is under /usr. This directory can be read-only, since packages should never need to write to this directory--any writing is done under /var or /tmp ( /usr/var and /usr/tmp are often just symlinked to /var or /tmp, respectively). The small amount under / that is not part of another superstructure (usually about 40 megabytes) performs essential system administration functions. These are commands needed to bring up or repair the system in the absence of /usr. The list of superstructure subdirectories and their descriptions is as follows:
17.3 LINUX on a Single 1.44 Megabyte Floppy DiskYou can get LINUX to run on a 1.44 megabyte floppy disk if you trim all unneeded files off an old Slackware distribution with a 2.0.3x kernel. You can compile a small 2.0.3x kernel to about 400 kilobytes (compressed) (see Chapter 42). A file system can be reduced to 2-3 megabytes of absolute essentials and when compressed will fit into 1 megabyte. If the total is under 1.44 megabytes, then you have your LINUX on one floppy. The file list might be as follows (includes all links):
Note that the etc directory differs from that of a RedHat distribution. The system startup files /etc/rc.d are greatly simplified under Slackware. The /lib/modules directory has been stripped for the creation of this floppy. /lib/modules/2.0.36 would contain dynamically loadable kernel drivers (modules). Instead, all needed drivers are compiled into the kernel for simplicity (explained in Chapter 42). At some point, try creating a single floppy distribution as an exercise. This task should be most instructive to a serious system administrator. At the very least, you should look through all of the commands in the bin directories and the sbin directories above and browse through the man pages of any that are unfamiliar. The preceding file system comes from the morecram-1.3 package available from http://rute.sourceforge.net/morecram-1.3.tar.gz. It can be downloaded to provide a useful rescue and setup disk. Note that there are many such rescue disks available which are more current than morecram.
Next: 18. UNIX Devices Up: rute Previous: 16. Pre-installed Documentation   Contents | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dies ist ein Mirror des RUTE-Projekts von Paul Sheer (RUTE = Rute User's Tutorial and Exposition). Die offizielle Projekt-Homepage findet sich im Web unter www.icon.co.za/~psheer/rute-home.html. Dieser Mirror wurde zuletzt aktualisiert auf die Version 1.0.0 am Samstag, 28 Januar 2006 22:06 +0100. Das RUTE-Tutorial kann auch zum Offline-Lesen in verschiedenen Dateiformaten heruntergeladen werden. |