%general-entities; ]> $LastChangedBy$ $Date$ Automate Mounting of File Systems Autofs Introduction to Autofs The autofs package contains userspace tools that work with the kernel to mount and un-mount removable file systems. The primary use is to mount external network file systems like nfs (see ) or Samba (see ) on demand. It may also be useful for allowing users to mount floppies, cdroms and other removable storage devices without requiring the system administrator to mount the devices although this capability is now generally provided by HAL (see ). This may not be ideal for all installations, so be aware of the risks before implementing this feature. Package Information Download (HTTP): Download (FTP): Download MD5 sum: &autofs-md5sum; Download size: &autofs-size; Estimated disk space required: &autofs-buildsize; Estimated build time: &autofs-time; Additional Downloads Recommended Patches: There are frequent patches issued for autofs. To get the current patches, start in the same directory as the main tar file and run: wget &autofs-patch-dir;/patch_order-&autofs-version; && sed 's;autofs;&autofs-patch-dir;/autofs;' patch_order-&autofs-version; > wget-list && wget -i wget-list User Notes: Kernel Configuration Automounter Verify that kernel support has been compiled in or built as modules in the following areas: File systems ⇒ Kernel automounter version 4 support Y or M Network File Systems ⇒ NFS file system support Y or M (optional) SMB file system support Y or M (optional) Recompile and install the new kernel, if necessary. Installation of Autofs Install autofs by running the following commands: for f in `cat ../patch_order-&autofs-version;`; do patch -Np1 -i ../$f done && ./configure --prefix=/ --mandir=/usr/share/man && make This package does not come with a test suite. Now, as the root user: make install && ln -sf ../init.d/autofs $(EXTDIR)/rc.d/rcsysinit.d/S52autofs Command Explanations for f in `cat ../patch_order-&autofs-version;`; do patch -Np1 -i ../$f; done: This command applies all the patches fetched earlier in the correct order. ln -sf ../init.d/autofs $(EXTDIR)/rc.d/rcsysinit.d/S52autofs: This command sets the link to properly start autofs upon boot. Configuring Autofs Config Files /etc/sysconfig/autofs.conf, /etc/auto.master, /etc/auto.misc, and /etc/auto.net /etc/sysconfig/autofs.conf /etc/auto.master /etc/auto.misc /etc/auto.net Configuration Information The installation process creates auto.master, auto.misc, auto.smb, and auto.net. You will replace the auto.master with the following commands: mv /etc/auto.master /etc/auto.master.bak && cat > /etc/auto.master << "EOF" # Begin /etc/auto.master /media/cdrom /etc/auto.misc # End /etc/auto.master EOF This file mounts a new media directory but is not visible until it is automounted by autofs. An alternative method would be to automount into another location such as /var/lib/autofs/cdrom and create a sysbolic link from /media/cdrom to the other location. While this package could be used to mount NFS shares and SMB shares, that feature is not configured in these instructions. NFS shares are covered on the next page. The auto.misc must be configured to your working hardware. The loaded configuration file should load your cdrom if /dev/cdrom is active or it can be edited to match your device setup and examples for floppies are available in the file and easily activated. Documentation for this file is available using the man 5 autofs command. Contents Installed Program Installed Libraries Installed Directories automount lookup_file.so, lookup_hosts.so, lookup_multi.so, lookup_nisplus.so, lookup_program.so, lookup_userhome.so, lookup_yp.so, mount_afs.so, mount_autofs.so, mount_bind.so, mount_changer.so, mount_ext2.so, mount_generic.so, mount_nfs.so, parse_sun.so /lib/autofs and /var/run/autofs Short Descriptions automount is the daemon that performs the mounting when a request is made for the device. automount