diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/00-INDEX | 2 | ||||
-rw-r--r-- | Documentation/Changes | 91 | ||||
-rw-r--r-- | Documentation/Configure.help | 230 | ||||
-rw-r--r-- | Documentation/binfmt_misc.txt | 83 | ||||
-rw-r--r-- | Documentation/transname.txt | 264 |
5 files changed, 586 insertions, 84 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 63466ffd5..86a2391ea 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX @@ -18,6 +18,8 @@ IO-mapping.txt - how to access I/O mapped memory from within device drivers. SMP.txt - notes, and "To Fix" list for multi-processor Linux. (see smp.tex) +binfmt_misc.txt + - info on the kernel support for extra binary formats. cdrom/ - directory with information on the CD-ROM drivers that Linux has. devices.tex diff --git a/Documentation/Changes b/Documentation/Changes index 0b840fee6..143d90eec 100644 --- a/Documentation/Changes +++ b/Documentation/Changes @@ -29,28 +29,30 @@ English-language HTML version. Also, don't forget http://www.linuxhq.com/ for all your Linux kernel needs. -Last updated: May 12, 1997. +Last updated: May 31, 1997. Current Author: Chris Ricker (gt1355b@prism.gatech.edu). Current Minimal Requirements **************************** Upgrade to at *least* these software revisions before thinking you've -encountered a bug! - -- Kernel modules modutils-2.1.34 -- Gnu C 2.7.2.1 -- Binutils 2.8.0.3 -- Linux C Library 5.4.23 -- Dynamic Linker (ld.so) 1.8.5 -- Linux C++ Library 2.7.2.1 -- Procps 1.01 -- Mount 2.6g -- Net-tools 1.41 +encountered a bug! If you're unsure what version you're currently +running, the suggested command should tell you. + +- Kernel modules modutils-2.1.34 ; insmod -v +- Gnu C 2.7.2.1 ; gcc --version +- Binutils 2.8.1.0.1 ; ld -v +- Linux C Library 5.4.23 ; ls -l /lib/libc.so.* +- Dynamic Linker (ld.so) 1.8.5 ; ldd -v +- Linux C++ Library 2.7.2.1 ; ls -l /usr/lib/libg++.so.* +- Procps 1.01 ; ps --version +- Procinfo 0.11 ; procinfo -v +- Mount 2.6g ; mount --version +- Net-tools 1.41 ; hostname -V - Loadlin 1.6a -- Sh-utils 1.16 -- Autofs 0.3.0 -- NFS 0.4.21 +- Sh-utils 1.16 ; expr --v +- Autofs 0.3.3 ; automount --version +- NFS 0.4.21 ; showmount --version Upgrade notes ************* @@ -86,6 +88,9 @@ available, so if you need to upgrade, use it. If you get a release later than 1.8.5, avoid 1.8.10 as it introduces a few bugs that are fixed in later releases. + If you upgrade to libc-5.4.x, you may also need to upgrade ypbind if +you're using NIS. + Modules ======= @@ -134,6 +139,15 @@ presence. For support for new features like IPv6, upgrade to the latest net-tools. +Memory +====== + + As of 2.1.41, the format of /proc/meminfo has changed. This broke +many memory utils, which have to be upgraded. Get the new procinfo and +procps (which, AFAIK, is not yet available) to fix this. Until you +upgrade, programs which read /proc/meminfo will seg-fault or give an +error. + Mount and network file systems ============================== @@ -178,37 +192,18 @@ parallel port may no longer be where you expect it; for example, LPT1 /dev/lp0 with the new Plug-and-Play driver. If printing breaks with the new driver, try checking your lpd configuration. -How to know the version of the installed programs -************************************************* - - There are some simple methods useful to know the version of the -installed programs and libraries. - -Binutils: ld -v -Gnu C: gcc -v or gcc --version -Kbd: dumpkeys -h -Ld.so: ldd -v -Libc: ls -l /lib/libc.so.* -Libc++: ls -l /usr/lib/libg++.so.* -Modutils: insmod -V -Mount: mount --version -Net-tools: hostname -V -Procps: ps --version -RPM: rpm --version -Sh-utils: expr --v - Where to get the files ********************** Binutils ======== -The 2.8.0.3 release: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.8.0.3.bin.tar.gz -ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.8.0.3.bin.tar.gz +The 2.8.1.0.1 release: +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/binutils-2.8.1.0.1.bin.tar.gz +ftp://sunsite.unc.edu/pub/Linux/GCC/binutils-2.8.1.0.1.bin.tar.gz Installation notes: -ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.binutils-2.8.0.3 -ftp://sunsite.unc.edu/pub/Linux/GCC/release.binutils-2.8.0.3 +ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.binutils-2.8.1.0.1 +ftp://sunsite.unc.edu/pub/Linux/GCC/release.binutils-2.8.1.0.1 Gnu C ===== @@ -258,9 +253,15 @@ Procps utilities ================ The 1.01 release: -ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/procps-1.01.tgz +ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/procps-1.01.tar.gz ftp://sunsite.unc.edu/pub/Linux/system/status/ps/procps-1.01.tgz +Procinfo utilities +================== + +The 0.11 release: +ftp://ftp.cistron.nl/pub/people/svm/procinfo-0.11.tar.gz + RPM utilities ============= @@ -304,8 +305,8 @@ ftp://ftp.win.tue.nl/pub/linux/util/mount-2.6g.tar.gz Autofs ====== -The 0.3.0 release: -ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-0.3.0.tar.gz +The 0.3.3 release: +ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-0.3.3.tar.gz NFS === @@ -321,6 +322,12 @@ The 0.41 release: ftp://ftp.london.uk.eu.org/pub/ipv6/net-tools-1.41.tar.gz ftp://ftp.cs-ipv6.lancs.ac.uk/pub/Code/Linux/Net_Tools/net-tools-1.41.tar.gz +Ypbind +====== + +The 3.2 release: +ftp://ftp.uni-paderborn.de/pub/linux/local/yp/ypbind-3.2.tar.gz + Other Info ========== diff --git a/Documentation/Configure.help b/Documentation/Configure.help index 669b645f1..863c1d3ac 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -795,6 +795,20 @@ CONFIG_BINFMT_JAVA will be called binfmt_java.o. If you don't know what to answer at this point then answer Y. +Kernel support for MISC binaries +CONFIG_BINFMT_MISC + This enables the possibility to plug wrapper-driven binary formats + into the kernel. You will like this especially when you use programs + that need an interpreter to run like Java, Python or Emacs-Lisp. And + you don't need CONFIG_BINFMT_JAVA or CONFIG_BINFMT_EM86, as this is + a more general feature. + You can do other nice things, too. Read Documentation/binfmt_misc.txt + to learn how to use this feature. + You must enable CONFIG_PROC_FS to use this part of the kernel. + You may answer M for module support and later load the module when + you have use for it. + If you don't know what to answer at this point, say Y. + Processor type CONFIG_M386 This is the processor type of your CPU. This information is used for @@ -2371,7 +2385,8 @@ CONFIG_SOUNDMODEM_SBC compatible cards. If you have a dual mode card (i.e. a WSS cards with a SoundBlaster emulation) you should say N here and Y to "Soundcard modem support for WSS and Crystal cards", below, because - this usually results in better performance. + this usually results in better performance. This option also supports + SB16/32/64 in full duplex mode. Soundcard modem support for WSS and Crystal cards CONFIG_SOUNDMODEM_WSS @@ -2389,26 +2404,27 @@ CONFIG_SOUNDMODEM_AFSK1200 compatible to popular modems using TCM3105 or AM7911. The demodulator requires about 12% of the CPU power of a Pentium 75 CPU per channel. -Soundmodem 1200 baud AFSK using floating point -CONFIG_SOUNDMODEM_AFSK1200_FP - This option enables floating point calculations to be used for the - AFSK1200 baud modem. The Intel Pentium is a perverted chip because - integer multiplications are, although easier to implement in silicon, - an order of magnitude slower than floating point calculations. - Enabling this option uses a highly optimized assembler routine for - correlations, modeled after the one published by Phil Karn, KA9Q. - This reduces the computing power needed on Intel Pentium chips to - about 50%. On the other hand, Pentium clones with faster integer - multiply and slower floating point multiply will probably take - longer with this option turned on. As a rule of thumb, enable it for - Intel Pentium and Pentium Pro processors, and disable it for - anything else. - I (sailer@ife.ee.ethz.ch) am very interested in figures. If you are - willing to give me a feedback, please compile the driver once with - this option enabled and once with it disabled, and send me the cycle - counter numbers obtained with both compilations, and your exact - chip. The cycle counter numbers can be obtained with a recent - sethdlc utility. +Soundcard modem support for 2400 baud AFSK modulation (7.3728MHz crystal) +CONFIG_SOUNDMODEM_AFSK2400_7 + This option enables the soundmodem driver 2400 baud AFSK modem, + compatible to TCM3105 modems (over-)clocked with a 7.3728MHz crystal. + Note that the availability of this driver does _not_ imply that I + recommend building such links. It is only here since users especially + in eastern europe have asked me to do so. In fact this modulation scheme + has many disadvantages, mainly its incompatibility with many transceiver + designs and the fact that the TCM3105 (if used) is operated widely outside + its specifications. + +Soundcard modem support for 2400 baud AFSK modulation (8MHz crystal) +CONFIG_SOUNDMODEM_AFSK2400_8 + This option enables the soundmodem driver 2400 baud AFSK modem, + compatible to TCM3105 modems (over-)clocked with an 8MHz crystal. + Note that the availability of this driver does _not_ imply that I + recommend building such links. It is only here since users especially + in eastern europe have asked me to do so. In fact this modulation scheme + has many disadvantages, mainly its incompatibility with many transceiver + designs and the fact that the TCM3105 (if used) is operated widely outside + its specifications. Soundcard modem support for 4800 baud HAPN-1 modulation CONFIG_SOUNDMODEM_HAPN4800 @@ -2426,27 +2442,6 @@ CONFIG_SOUNDMODEM_FSK9600 can only use one protocol at a time, depending on what the other end can understand). -Soundcard modem support using floating point arithmetic -CONFIG_SOUNDMODEM_FLOAT - This option enables floating point calculations to be used for the - AFSK1200 baud modem. The Intel Pentium is a perverted chip because - integer multiplications are, although easier to implement in silicon, - an order of a magnitude slower than floating point calculations. - Enabling this option uses a highly optimized assembler routine for - correlations, modeled after the one published by Phil Karn, KA9Q. - This reduces the computing power needed on Intel Pentium chips to - about 50%. On the other hand, Pentium clones with faster integer - multiply and slower floating point multiply will probably take - longer with this option turned on. As a rule of thumb, enable it for - Intel Pentium and Pentium Pro processors, and disable it for - anything else. - I (sailer@ife.ee.ethz.ch) am very interested in figures. If you are - willing to give me a feedback, please compile the driver once with - this option enabled and once with it disabled, and send me the cycle - counter numbers obtained with both compilations, and your exact - chip. The cycle counter numbers can be obtained by a recent sethdlc - utility. - Serial port KISS driver for AX.25 CONFIG_MKISS KISS is the protocol used to send IP traffic over AX.25 radio @@ -3617,6 +3612,14 @@ CONFIG_ISP16_CDI be called isp16.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. +Preload dcache +CONFIG_DCACHE_PRELOAD + Preloading will create dcache entries when a directory is scanned + (e.g. with ls) the *first* time. This should speed up successive + inode lookups, but also can consume large amounts of memory. + Please report speedups (or slowdowns due to the memory usage if they + occur) to schoebel@informatik.uni-stuttgart.de . + Quota support CONFIG_QUOTA If you say Y here, you will be able to set per user limits for disk @@ -3627,6 +3630,138 @@ CONFIG_QUOTA quota support is only useful for multi user systems. If unsure, say N. +Online mirror support +CONFIG_OMIRR + omirr is a package for _symmetric_ mirroring of files over the + internet. In contrast to rdist, the online mirror daemon (omirrd) + is running all the time and transfers any changes on the file system + as soon as possible to all other servers. Symmetric means that all + servers have equal rights in changing a file: the last changer of a + file will win. This is the same behaviour as multiple processes + operating on a global file system. In effect, omirr can do the same + as nfs mounts, but will have better performance since the data is + stored on local disks. In contrast to a cache filesystem which has a + dedicated master copy, broken connections and/or servers are no problem + for continuing work on the remaining ones, because there is no master + copy. You must say Y if you want to use omirrd, but you should (but + need not) say N if you don't (for performance reasons). + +Filename translation support +CONFIG_TRANS_NAMES + Normally used only when you want diskless clients to mount the root + filesystem of the server. If unsure, or if you don't have clients, select N. + When selected, filenames, directory names etc become context-sensitive. + If you have a file named "/etc/config#host=banana#", it will appear + (by default) as hardlinked to "/etc/config" on host "banana", while on host + "mango" another file "/etc/config#host=mango#" will appear as been + hardlinked to "/etc/config". The default behaviour can be changed + by setting the _first_ environment variable NAMETRANS to a colon-separated + list of suffixes which are tried in the specified order. For example, + in 'env - NAMETRANS=#host=mango#:#ktype=diskless# "`env`" command ...' the + command will see the same files as if it had been executed on host "mango" + with a diskless kernel. Using NAMETRANS supersedes _all_ default + translations. Thus translations can be generally switched off by an + empty list, e.g. 'env - NAMETRANS= "`env`" command ...'. + Note that some system utililies like tar, dump, restore should + be used with translation switched off, in order to avoid doubled + space in archive files and when extracting from them. Also, make sure + that nfsd, mountd (and similar ones like samba daemons) run without + translation, in order to avoid doubled (or even wrong) translation + at the server and at the client. You can automatically force the creation + of context-dependent filenames if there exists a template filename like + "/etc/mtab#host=CREATE#". As soon as a process running on "mango" tries + to create a file "/etc/mtab", the version "/etc/mtab#host=mango#" is + created instead (which appears in turn as hardlinked to "/etc/mtab"). + Note that if you want to make "/etc/fstab" context-dependend, you should + execute "touch /etc/mtab#host=CREATE#" and + "touch /etc/mtab.tmp#host=CREATE#", because mount, umount and others + running on different hosts would otherwise try to create one shared + /etc/mtab which would result in a clash. Also one should execute + "touch /etc/nologin#host=CREATE#" to prevent global side effects from + shutdown resp. runlevel. + +Restrict translation to gid +CONFIG_TRANS_RESTRICT + When selected, default translations are carried out only if the parent + directory of the context-sensitive file belongs to a specific group id + (gid). Trying to translate names everywhere will decrease performance of + file openings. Normally translations are used only in system configuration + files but not in ordinary user filespace. So you should change the gid of + directories containing context-dependent files to some special group like + "adm" (group id 4) and enable this option. As a result, users will not + notice any performance degradation resulting from filename translation. + Note that translations resulting from the first environment variable + "NAMETRANS=..." are always carried out regardless of the gid of directories. + Beware, before turning on this option make sure all directories containing + context-dependent files belong to the special group, or system + initialization may fail. In unsure, select N. + +Group id (gid) for translation restriction +CONFIG_TRANS_GID + Default name translations will be carried out only inside directories + belonging to the group id (gid) you can specify here. + Default is 4 (group "adm"). + +Nodename (hostname) translation +CONFIG_TR_NODENAME + Enables translation of name suffixes like in "/etc/config#host=banana#". + The syntax is <filename>#host=<hostname>#. The hostname can be queried + with the command "uname -n". Normally this option is used heavily when + translation is enabled. If unsure, say Y. + +Kernelname translation +CONFIG_TR_KERNNAME + Enables translation of name suffixes like in "/etc/config#kname=default#". + The string is hard compiled into the kernel by the following option. + Useful if your kernel does not know the hostname at boot time, and there + is no way to tell the hostname by lilo or bootp. Please avoid using this + option and prefer CONFIG_TR_NODENAME wherever possible. When mounting + the root over nfs, the own hostname must be known at boot time anyway; + this option is just for special use. + Note that the default translations are tried in the order as occuring + in the configuration, that is 1) host 2) kname 3) ktype 4) machine + 5) system. If unsure, say Y. + +String for kernelname translation +CONFIG_KERNNAME + Enter the string you want to compile into the kernel. The string + will be used as context in context-depenant file like + "/etc/config#kname=<hostname>#". + +Kerneltype translation +CONFIG_TR_KERNTYPE + Enables translation of name suffixes like in "/etc/config#ktype=default#". + The syntax is <filename>#ktype=<string>#. The string is hard compiled + in the kernel by the following option. Use if you want to create + different kernels with different behaviour. For example, use the string + "default" on your server, and use "diskless" on all your diskless clients + (and perhaps "dataless" on dataless clients). This way you can avoid + dozens of "config#host=<something># with same contents and you have no + effort when new machines are added. If unsure, say Y. + +String for kerneltype translation +CONFIG_KERNTYPE + Enter the string you want to compile into the kernel. The string + will be used as context in context-depenant file like + "/etc/config#ktype=default#". If your kernel is to be used on a server, + you probably can use "default" here. If your kernel is intended for + a diskless client, you probably should enter "diskless" here. + +Machine type translation +CONFIG_TR_MACHINE + Enables translation of name suffixes like in "/etc/config#machine=i486#". + The syntax is <filename>#machine=<id>#. The machine types can be queried + with the command "uname -m". Normally used only on multi-architecture + installations. If unsure, say Y. + +System name translation +CONFIG_TR_SYSNAME + Enables translation of name suffixes like in "/etc/config#system=Linux#". + The syntax is <filename>#system=<id>#. The system name can be queried + with the command "uname -s". Currently only supportet by Linux, but + hopefully other operating systems will pick up the idea of context-dependent + translations. If unsure, say Y. + Minix fs support CONFIG_MINIX_FS Minix is a simple operating system used in many classes about @@ -4702,6 +4837,17 @@ CONFIG_PROFILE_SHIFT said Y to "Kernel profiling support", you must be a kernel hacker and hence you know what this is about :-) +Magic System Request Key support +CONFIG_MAGIC_SYSRQ + This is for kernel hackers who want to have some control over the + system even if the system crashes during kernel debugging (e.g., to + flush the disks, reboot the system immediately or dump some status + information). This is accomplished by pressing various keys while + holding SysRq (Alt+PrintScreen). As you are expected to be a kernel + hacker to use this, the simple rule about learning what do the keys + mean is "Use the source, Luke!" -- read drivers/char/sysrq.c. + Don't say Y unless you really know what does this hack do. + ISDN subsystem CONFIG_ISDN ISDN ("Integrated Services Digital Networks", called RNIS in France) diff --git a/Documentation/binfmt_misc.txt b/Documentation/binfmt_misc.txt new file mode 100644 index 000000000..81d49b2bc --- /dev/null +++ b/Documentation/binfmt_misc.txt @@ -0,0 +1,83 @@ + Kernel Support for miscellaneous (your favourite) Binary Formats v1.1 + ==================================================================== + +This Kernel feature allows to invoke almost (for restrictions see below) every +program by simply typing it's name in the shell. +This includes for example compiled Java(TM), Python or Emacs programs. + +To achieve this you must tell binfmt_misc which interpreter has to be invoked with +which binary. Binfmt_misc recognises the binary-type by matching some bytes at the +beginning of the file with a magic byte sequence (masking out specified bits) you +have supplied. Binfmt_misc can also recognise a filename extension (aka .com) and +optionally strip it off. + +To actually register a new binary type, you have to set up a string looking like +:name:type:offset:magic:mask:interpreter: (where you can choose the ':' upon your +needs) and echo it to /proc/sys/fs/binfmt_misc/register. +Here is what the fields mean: + - 'name' is an identifier string. A new /proc file will be created with this + this name below /proc/sys/fs/binfmt_misc + - 'type' is the type of recognition. Give 'M' for magic and 'E' for extension. + Give the corresponding lowercase letter to let binfmt_misc strip of the + filename extension. + - 'offset' is the offset of the magic/mask in the file counted in bytes. This + defaults to 0 if you omit it (i.e. you write ':name:type::magic...') + - 'magic' is the byte sequence binfmt_misc is matching for. The magic string + may contain hex-encoded characters like \x0a or \xA4. In a shell environment + you will have to write \\x0a to prevent the shell from eating your \. + If you chose filename extension matching, this is the extension to be + recognised (the \x0a specials are not allowed). Extension matching is case + sensitive! + - 'mask' is an (optional, defaults to all 0xff) mask. You can mask out some bits + from matching by supplying a string like magic and as long as magic. The + mask is anded with the byte sequence of the file. + - 'interpreter' is the program that should be invoked with the binary as first + argument (specify the full path) +There are some restrictions: + - the whole register string may not exceed 255 characters + - the magic must resist in the first 128 bytes of the file, i.e. offset+size(magic) + has to be less than 128 + - the interpreter string may not exceed 127 characters +You may want to add the binary formats in one of your /etc/rc scripts during boot-up. +Read the manual of your init program to figure out how to do this right. + + +A few examples (assumed you are in /proc/sys/fs/binfmt_misc): + +- enable Java(TM)-support (like binfmt_java): + echo ":Java:M::\xca\xfe\xba\xbe::/usr/local/bin/java:" > register + echo :Applet:M::\<\!--applet::/usr/local/bin/appletviewer: > register +- enable support for em86 (like binfmt_em86, for Alpha AXP only): + echo ":i386:M::\x7fELF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff:/bin/em86:" > register + echo ":i486:M::\x7fELF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff:/bin/em86:" > register +- enable support for packed DOS applications (pre-configured dosemu hdimages): + echo ":DEXE:M::\x0eDEX::/usr/bin/dosexec:" > register +- enable support for DOS/Windows executables (using mzloader and dosemu/wine): + echo ":DOSWin:M::MZ::/usr/sbin/mzloader:" > register + echo ":DOS:E::com::/usr/sbin/mzloader:" > register + + +You can enable/disable binfmt_misc or one binary type by echoing 0 (to disable) +or 1 (to enable) to /proc/sys/fs/binfmt_misc/status or /proc/.../the_name. +Catting the file tells you the current status of binfmt_misc/the entry. + +You can remove one entry or all entries by echoing -1 to /proc/.../the_name +or /proc/sys/fs/binfmt_misc/status. + + +HINTS: +====== + +If your interpreter does not look at the PATH to determine the full name of the +program, you need to invoke a wrapper-script (like the following for java) first: + +#!/bin/sh +FOO=`which $1` || exit 1 +shift +/usr/local/bin/java $FOO ${1+$@} + + +There is a web page about binfmt_misc at +http://www.anatom.uni-tuebingen.de/~richi/linux/binfmt_misc.html + +Richard Günther, richard.guenther@student.uni-tuebingen.de diff --git a/Documentation/transname.txt b/Documentation/transname.txt new file mode 100644 index 000000000..ed0a82177 --- /dev/null +++ b/Documentation/transname.txt @@ -0,0 +1,264 @@ +Transname version 1.9 (C) 1997 Thomas Schoebel-Theuer + +transname enables diskless clients, X-terminals etc to mount the +*root filesystem* of the server. This make administration of +large pools a lot easier. + +Wherefore is linux-2.0.21-transname.patch? + +Currently different diskless clients must have their root / on different +directories on the server, beause each client has _some_ different +configuration files. However, most files (typically about 99%) have the same +contents on the clients and on the server, but have to be replicated +(and maintained separately) just because of the 1% differences. +This duplication causes very large efforts in practise, since at least +the /etc directory has to be duplicated for every client. Even in /etc +many files are identical, for example sendmail.cf, initrc scripts and +others. Maintaining a large pool means to ensure coherence amoung the +duplicates. Classical methods like symlinks are unconvenient +for this task because they have to be valid in the view of mounted +filesystems at all clients, not at the server. + +Linux transname overcomes this problem by allowing filenames +to be context-dependend. For example, if you have a file /etc/config +that should differ on the hosts "myserver" and "myclient", you just +create two different files named /etc/config#host=myserver# and +/etc/config#host=myclient# . On host "myserver", the file +/etc/config#host=myserver# will appear as if it were hardlinked to +file /etc/config (without the #...=...# suffix). On host "myclient", +the corresponding other file will appear as /etc/config. So you +can access the right file contents under the _same_ name, depending +on which host you are working. + +A similar concept can be found in elder HP-UX versions, but with +so-called "hidden directories" which don't allow contemporary viewing +all versions by default. In contrast, transname shows all context-dependent +files in the dir listing and they can be edited using the +fully qualified name. + +Transname was developped for and is used at our Linux pool at the +University of Stuttgart with good results. Maintainance of the pool is +at a minimum, and adding new clients is a child's play. No worry with +keeping up mail configurations, newly installed tools, changed /etc/services, +/etc/shells, /etc/resolv.conf and many, many others. In contrast to a +sophisticated symlink solution, adding a new file to the /etc directory +is seen immediately by all clients. + +An example for the use of linux-2.0-transname.patch: + +For example, you can make your /etc/fstab context-dependend. If you want +to do that, you should create an /etc/fstab#ktype=default# for the +server and an /etc/fstab#ktype=diskless# for all clients. This is because +your clients may not yet know their own hostname when they attempt to mount +the root filesystem. You can compile in the kerneltypes "default" and +"diskless" into different kernels for servers and clients. Of course, +if your clients boot via bootp and know their names when mounting the root, +you can use /etc/fstab#host=myclient# instead. But at least servers +booting from disk normally dont know their hostname at root mount time, +so you can mix methods and use /etc/fstab#ktype=default# for the server, +/etc/fstab#ktype=diskless# for the majority of the clients and +/etc/fstab#host=myclient# for some specific client, because translation +of #host=...# is given precedence over #ktype=...# by default. + +This sort of name translation works with any underlying file system +and with any inode type (i.e. with directories, symlinks, devices etc), +because it is implemented in the VFS layer of the kernel. Currently, +five types of default translations are supported: + + * <name>#host=<hostname># depends on the hostname, see "uname -n" + * <name>#kname=<string># works with a hard compiled-in string + * <name>#ktype=<string># works with a hard compiled-in string + * <name>#machine=<id># depends on architecture, see "uname -m" + * <name>#system=<id># currently only supported by Linux, see "uname -s" + +Others may be added in future. + +The current translation are displayed at boot time in the kernel messages +for easier debugging, and can be retrieved by reading +/proc/sys/kernel/nametrans which is a special file containing the currently +valid translations. + +The default translations change whenever the hostname(1) is set or changed. +Thus, the hostname is not set (or set to the name "(none)") at boot time +before init(8) sets it. So, if you want to use the hostname before that +moment, there are three ways: + + a) set the hostname before via bootp or similar. + b) use the compiled-in translations kname and ktype solely. + c) set all translations by lilo (or on the boot command line) with + kernel parameter nametrans=#host=banana#:#ktype=diskless# , + thus overriding and hiding the default (built-in) translations. + +Note that by supplying the colon-separated list of at most 16 suffixes, you +can also use other translation types that are not defined in the default +translations. However, you must ensure that the syntax #...=...# is correct. +The specified contexts will be tried in the specified order *instead* of the +default translations. + +You can override the default (or parameter-supplied) translations at runtime +by executing +echo "#host=$HOST#:#ktype=diskless#:#myconfig=something#" > /proc/sys/kernel/nametrans +However, after doing this (or setting as kernel parameter) the built-in +default translations have no effect any more, thus changing the hostname +will not be reflected in the overridden translations. You can switch +back to the default translations by executing +echo "" > /proc/sys/kernel/nametrans + +Another drawback is that administration tools currently are not aware of +context-dependend files, so you cannot switch between contexts inside +one tool session. However, you can simulate administration sessions +on the server as if they were running on some client. To do this, +you have to set an environment variable NAMETRANS which has to be the +*first* environment variable in the list. For example, you can execute +'env - NAMETRANS=#host=mango#:#ktype=diskless# "`env`" command ...' +where the command will see the same files as if it had been executed on host +"mango" with a "diskless" kernel. To switch off translations entirely, use +an empty list, e.g. 'env - NAMETRANS= "`env`" command ...'. + +Hopefully the creators of administration tools and maintainers of Linux +distributions will support changing environments in future, so that +maintaining different views will be very easy. + +Some hints: + +Archivers like tar, dump, restore should be used with translation +switched off, in order to avoid doubled space in archive files and when +extracting from them. Also, make sure that nfsd, mountd (and similar ones +like samba daemons) run without translation, in order to avoid doubled +(or even wrong) translation at the server and at the client. You can +automatically force the creation of context-dependent filenames if there +exists a template filename like /etc/mtab#host=CREATE#. As soon as a +process running on "mango" tries to create a file /etc/mtab, the version +/etc/mtab#host=mango# is created instead (which appears in turn as +hardlinked to /etc/mtab). Note that if you want to make /etc/fstab +context-dependend, you should execute "touch /etc/mtab#host=CREATE#" and +"touch /etc/mtab.tmp#host=CREATE#", because mount, umount and others +running on different hosts would otherwise try to create one shared +/etc/mtab which would result in a clash. Also one should execute +"touch /etc/nologin#host=CREATE#" to prevent global side effects from +shutdown resp. runlevel. + +Which files you have to make context-dependent will differ for different +needs and different applications. Hopefully some day a standard will +cover the most common cases and the mist common Linux distributions. +A HOWTO on this subject is in preparation. + +How to install linux-2.0.21-transname.patch? + +First of all, keep a backup of your kernel on your disk. Second, keep a +floppy with a miniroot handy, so you can boot from the floppy, mount +your harddisk root filesystem and change the names of your configuration +files back to their old names in case of emergency. + +Then, make a kernel with transname support enabled. With "make config" +or "make xconfig", just go to the section "filesystems". Take a look at +the help texts that are associated with the transname options, they tell +you further hints not mentioned in this README. Then build your kernel as +usual, install it with a *new* kernel-filename, add a *new* entry to +/etc/lilo.conf and run lilo. **DONT CHANGE** any configuration files for the +first reboot! + +Just reboot the new kernel and play a little bit around with +creating context-dependend filenames in your home directory. +Try all modes including setting NAMETRANS to different values. + +As an example for the changes necessary on our LST-1.8-based Linux pool, +here is the output of the command +find / /tmp -xdev -name "*#*#" -print | sort -u | xargs ls -ld + +-r--r--r-- 1 root root 1725 Dec 21 1995 /etc/X11R6/xdm/xdm-config#host=eiche# +-r--r--r-- 3 root root 9509 Feb 15 17:35 /etc/XF86Config#host=balsa# +-r--r--r-- 1 root root 9401 Feb 15 17:34 /etc/XF86Config#host=eiche# +-rw-r--r-- 1 root root 9820 Feb 21 17:00 /etc/XF86Config#host=fichte# +-rw-r--r-- 1 root root 9822 Feb 14 15:45 /etc/XF86Config#host=laerche# +-r--r--r-- 3 root root 9509 Feb 15 17:35 /etc/XF86Config#host=mahagoni# +-r--r--r-- 3 root root 9509 Feb 15 17:35 /etc/XF86Config#host=palisander# +-r--r--r-- 2 root root 9509 Feb 15 17:41 /etc/XF86Config#host=pcbs10# +-r--r--r-- 2 root root 9509 Feb 15 17:41 /etc/XF86Config#host=pcbs11# +-rw-r--r-- 1 root root 586 Jun 11 23:13 /etc/fstab#ktype=default# +-rw-r--r-- 1 root root 242 May 29 17:35 /etc/fstab#ktype=diskless# +-rw------- 1 root root 338 Jun 14 16:37 /etc/lilo.conf#host=eiche# +-rw------- 1 root root 5236 Dec 16 1995 /etc/lst.cnf#host=balsa# +-rw------- 1 root root 5254 Dec 16 1995 /etc/lst.cnf#host=eiche# +-rw------- 1 root root 5236 Dec 19 1995 /etc/lst.cnf#host=fichte# +-rw------- 1 root root 5236 Jan 11 13:47 /etc/lst.cnf#host=laerche# +-rw------- 1 root root 5236 Feb 14 16:57 /etc/lst.cnf#host=mahagoni# +-rw------- 1 root root 5236 Jan 4 1996 /etc/lst.cnf#host=palisander# +-rw------- 1 root root 5236 Feb 15 13:57 /etc/lst.cnf#host=pcbs10# +-rw------- 1 root root 5236 Feb 14 17:06 /etc/lst.cnf#host=pcbs11# +-rw-r--r-- 1 root root 0 Dec 18 1995 /etc/mtab#host=CREATE# +-rw-r--r-- 1 root root 157 Jun 23 21:16 /etc/mtab#host=balsa# +-rw-r--r-- 1 root root 466 Jul 1 16:15 /etc/mtab#host=eiche# +-rw-r--r-- 1 root root 239 Jul 4 11:10 /etc/mtab#host=fichte# +-rw-r--r-- 1 root root 239 Jun 18 14:17 /etc/mtab#host=laerche# +-rw-r--r-- 1 root root 239 May 23 10:50 /etc/mtab#host=mahagoni# +-rw-r--r-- 1 root root 239 Jul 3 10:36 /etc/mtab#host=palisander# +-rw-r--r-- 1 root root 47 Feb 15 14:57 /etc/mtab#host=pcbs10# +-rw-r--r-- 1 root root 47 Feb 14 20:04 /etc/mtab#host=pcbs11# +-rw-r--r-- 1 root root 0 Dec 18 1995 /etc/mtab.tmp#host=CREATE# +-rw-r--r-- 1 root root 0 Dec 19 1995 /etc/nologin#host=CREATE# +---------- 1 root root 115 Feb 15 14:57 /etc/nologin#host=pcbs10# +---------- 1 root root 115 Feb 14 20:04 /etc/nologin#host=pcbs11# +-rw-r--r-- 1 root root 4818 Dec 16 1995 /etc/system.cnf#host=balsa# +lrwxrwxrwx 1 root root 25 Dec 22 1995 /etc/system.cnf#host=eiche# -> system.cnf#ktype=default# +-rw-r--r-- 1 root root 4821 Dec 19 1995 /etc/system.cnf#host=fichte# +-rw-r--r-- 1 root root 4824 Jan 11 13:47 /etc/system.cnf#host=laerche# +-rw-r--r-- 1 root root 4827 Feb 14 16:57 /etc/system.cnf#host=mahagoni# +-rw-r--r-- 1 root root 4833 Jan 4 1996 /etc/system.cnf#host=palisander# +-rw-r--r-- 1 root root 4840 Feb 15 14:10 /etc/system.cnf#host=pcbs10# +-rw-r--r-- 1 root root 4846 Feb 14 18:23 /etc/system.cnf#host=pcbs11# +-rw-r--r-- 1 root root 4818 Dec 13 1995 /etc/system.cnf#ktype=default# +drwxrwxrwt 16 root root 3072 Jul 4 14:29 /tmp#ktype=default# +lrwxrwxrwx 1 root root 26 Jul 4 14:22 /tmp#ktype=diskless# -> /tmp#ktype=default#/client +-rw-rw-rw- 1 root root 0 Feb 15 14:57 /tmp/client#host=CREATE# +drwxrwxrwx 4 root root 1024 Jun 28 12:15 /tmp/client#host=balsa# +drwxrwxrwx 3 root root 1024 Jul 4 11:10 /tmp/client#host=fichte# +drwxrwxrwx 3 root root 1024 Jun 18 14:18 /tmp/client#host=laerche# +drwxrwxrwx 3 root root 1024 May 24 13:06 /tmp/client#host=mahagoni# +drwxrwxrwx 3 root root 1024 Jul 3 10:37 /tmp/client#host=palisander# +drwxrwxrwx 4 root root 1024 Feb 15 14:57 /tmp/client#host=pcbs10# +drwxrwxrwx 3 root root 1024 Feb 20 06:43 /tmp/client#host=pcbs11# +lrwxrwxrwx 1 root root 9 Feb 15 13:58 /usr/X11R6/bin/X#host=pcbs10# -> XF86_SVGA +lrwxrwxrwx 1 root root 9 Feb 14 17:37 /usr/X11R6/bin/X#host=pcbs11# -> XF86_SVGA +lrwxrwxrwx 1 root root 7 Feb 14 17:15 /usr/X11R6/bin/X#ktype=diskless# -> XF86_S3 +drwxr-xr-x 22 root root 1024 Dec 13 1995 /var#host=balsa# +drwxr-xr-x 23 root root 1024 Jan 12 14:22 /var#host=eiche# +drwxr-xr-x 22 root root 1024 Dec 13 1995 /var#host=fichte# +drwxr-xr-x 22 root root 1024 Dec 13 1995 /var#host=laerche# +drwxr-xr-x 22 root root 1024 Dec 13 1995 /var#host=mahagoni# +drwxr-xr-x 22 root root 1024 Dec 13 1995 /var#host=palisander# +drwxr-xr-x 22 root root 1024 Dec 13 1995 /var#host=pcbs10# +drwxr-xr-x 22 root root 1024 Dec 13 1995 /var#host=pcbs11# + +Notes: The /tmp directory has an own filesystem on server "eiche", +in order to prevent users from filling the whole filestore (we dont use +quotas). Each client needs a different /tmp because of possible name clashes. +Also, the whole /var hierarchy is kept differently to prevent any risk, but +that could be optimized perhaps. Note that nfsd and mountd have been +replaced by a script which switches off translations, in the style + +-rwxr-xr-x 2 root root 70 Mar 22 12:54 /usr/sbin/rpc.mountd +-rwxr-xr-x 1 root root 32772 Jun 11 1995 /usr/sbin/rpc.mountd.notrans +-rwxr-xr-x 2 root root 70 Mar 22 12:54 /usr/sbin/rpc.nfsd +-rwxr-xr-x 1 root root 45060 Jun 11 1995 /usr/sbin/rpc.nfsd.notrans + +where /usr/sbin/rpc.mountd has the contents + +#!/bin/sh +exec /usr/bin/env - NAMETRANS= "`/usr/bin/env`" $0.notrans $* + +Of course, that could be improved, but is a quick hack to get things work. + +Enjoy, + +-- Thomas + + +The author can be contacted under + schoebel@informatik.uni-stuttgart.de +or snailmail + Thomas Schoebel-Theuer + Institut fuer Informatik + Breitwiesenstr. 20-22 + D-70565 Stuttgart + |