In this section you incorporate AFS into the IRIX kernel, choosing one of two methods: - Dynamic loading using the ml program distributed by Silicon Graphics, Incorporated (SGI). - Building a new static kernel. ## Prepare for incorporating AFS into the kernel by performing the following procedures. 1. 1. 1. Mount the AFS CD-ROM for IRIX on the /cdrom directory. For instructions on mounting CD-ROMs (either locally or remotely via NFS), see your IRIX documentation. Then change directory as indicated. # cd /cdrom/sgi_65/root.client 1. 1. 1. Copy the AFS initialization script to the local directory for initialization files (by convention, /etc/init.d on IRIX machines). Note the removal of the .rc extension as you copy the script. # cp -p usr/vice/etc/afs.rc /etc/init.d/afs 1. 1. 1. Issue the uname -m command to determine the machine's CPU board type. The IPxx value in the output must match one of the supported CPU board types listed in the IBM AFS Release Notes for the current version of AFS. # uname -m ## Incorporate AFS into the kernel, either using the ml program or by building AFS modifications into a static kernel. The ml program is the dynamic kernel loader provided by SGI for IRIX systems. If you use it rather than building AFS modifications into a static kernel, then for AFS to function correctly the ml program must run each time the machine reboots. Therefore, the AFS initialization script (included on the AFS CD-ROM) invokes it automatically when the afsml configuration variable is activated. In this section you activate the variable and run the script. In later sections you verify that the script correctly initializes all AFS components, then create the links that incorporate AFS into the IRIX startup and shutdown sequence. ## Using the ml program 1. Create the local /usr/vice/etc/sgiload directory to house the AFS kernel library file. # mkdir /usr/vice/etc/sgiload 1. Copy the appropriate AFS kernel library file to the /usr/vice/etc/sgiload directory. The IPxx portion of the library file name must match the value previously returned by the uname -m command. Also choose the file appropriate to whether the machine's kernel supports NFS server functionality (NFS must be supported for the machine to act as an NFS/AFS Translator). Single- and multiprocessor machines use the same library file. (You can choose to copy all of the kernel library files into the /usr/vice/etc/sgiload directory, but they require a significant amount of space.) If the machine's kernel supports NFS server functionality: # cp -p usr/vice/etc/sgiload/libafs.IPxx.o /usr/vice/etc/sgiload If the machine's kernel does not support NFS server functionality: # cp -p usr/vice/etc/sgiload/libafs.IPxx.nonfs.o \ /usr/vice/etc/sgiload 1. Issue the chkconfig command to activate the afsml configuration variable. # /etc/chkconfig -f afsml on If the machine is to function as an NFS/AFS Translator and the kernel supports NFS server functionality, activate the afsxnfs variable. # /etc/chkconfig -f afsxnfs on 1. Run the /etc/init.d/afs script to load AFS extensions into the kernel. The script invokes the ml command, automatically determining which kernel library file to use based on this machine's CPU type and the activation state of the afsxnfs variable. You can ignore any error messages about the inability to start the BOS Server or the Cache Manager or AFS client. # /etc/init.d/afs start ## Building a Kernel - If you prefer to build a kernel, and the machine's hardware and software configuration exactly matches another IRIX machine on which AFS is already built into the kernel, you can copy the kernel from that machine to this one. In general, however, it is better to build AFS modifications into the kernel on each machine according to the following instructions. 1. 1. 1. 1. 1. Copy the kernel initialization file afs.sm to the local /var/sysgen/system directory, and the kernel master file afs to the local /var/sysgen/master.d directory. # cp -p bin/afs.sm /var/sysgen/system # cp -p bin/afs /var/sysgen/master.d 1. 1. 1. 1. 1. Copy the appropriate AFS kernel library file to the local file /var/sysgen/boot/afs.a; the IPxx portion of the library file name must match the value previously returned by the uname -m command. Also choose the file appropriate to whether the machine's kernel supports NFS server functionality (NFS must be supported for the machine to act as an NFS/AFS Translator). Single- and multiprocessor machines use the same library file. If the machine's kernel supports NFS server functionality: # cp -p bin/libafs.IPxx.a /var/sysgen/boot/afs.a If the machine's kernel does not support NFS server functionality: # cp -p bin/libafs.IPxx.nonfs.a /var/sysgen/boot/afs.a 1. 1. 1. 1. 1. Issue the chkconfig command to deactivate the afsml configuration variable. # /etc/chkconfig -f afsml off If the machine is to function as an NFS/AFS Translator and the kernel supports NFS server functionality, activate the afsxnfs variable. # /etc/chkconfig -f afsxnfs on 1. 1. 1. 1. 1. Copy the existing kernel file, /unix, to a safe location. Compile the new kernel, which is created in the file /unix.install. It overwrites the existing /unix file when the machine reboots in the next step. # cp /unix /unix_noafs # autoconfig 1. 1. 1. 1. 1. Reboot the machine to start using the new kernel, and login again as the superuser root. # cd / # shutdown -i6 -g0 -y login: root Password: root_password