Tailoring MCC Interim Linux to Your Taste
*****************************************

There are several changes which you might make to your newly
installed Linux system, whether to make it run better on your machine,
or to adapt it to suit your personal taste.  Some of these changes are
discussed in the following sections of this document.

* Contents:

* Recompiling the kernel.
* Setting up Ethernet cards.
* Configuring the tcpip package.
* Editing the system configuration files.


Recompiling the kernel
======================

There are many good reasons why you might wish, or even need, to
recompile the kernel.  You may wish to remove or include drivers or
file systems, to add some of the available patches, to remove features
you may not need, such as maths coprocessor emulation, or to add
support for more than 16 Mb of RAM.

To recompile the kernel, you should install the gcc and linux
packages from the MCC distribution.  Then `cd' to `/usr/src/linux-mcc'.
Edit the Makefile to choose the default SVGA mode, etc, as described in
the `README' file in that directory.  Then type

     make config
     make dep
     make
     ./install

The last command installs the newly compiled kernel in /etc and uses
LILO to prepare to boot from it.  Reboot, login as root, and type the
command `psupdate' immediately.  This changes the file `/etc/psdatabase'
so that the `ps' commands work with the new kernel.  The `install'
script also saves the old `/etc/Image' as `/etc/Image.old'.  This
should allow you to boot using LILO with the option `linux.old' if you
have any difficulty booting with the new kernel.

*Note*: Several people have commented on the fact that this release
puts the include files in `/usr/include/asm' and `/usr/include/linux'
in the directory `/usr/include' rather than in `/usr/src/linux(-mcc)'.
This is actually more convenient if you are not recompiling the kernel
repeatedly.  It means that (1) the C compiler works without installing
the kernel sources, and (2) it continues to work after you delete the
kernel sources.  Nevertheless, if you are doing a lot of work with
different kernels, you may find it more convenient to move these two
directories and their contents to `/usr/src/linux/include', and put
symbolic links to them in the `/usr/include' directory:

     mkdir -p -m 755 /usr/src/linux /usr/src/linux/include
     (cd /usr/include;tar cf - asm include)|(cd /usr/src/linux/include; \
      tar xvfp -)
     rm -rf /usr/include/asm /usr/include/linux
     ln -s /usr/src/linux/include/* /usr/include


Setting up Ethernet cards
=========================

The `standard' kernel as distributed by Linus Torvalds currently
contains support only for the 3c503, DE-600, HP-LAN, NE2000, and
Western Digital 8003 and 8013 Ethernet cards.  Western Digital cards
should be installed with the two jumpers set to `soft'.  It is a good
idea to have the DOS program `EZSETUP' to hand, so that you can
configure the card that way in case `wdsetup' doesn't work.  The manual
page for `wdsetup' is installed as part of the tcpip package, and
contains more information about this program.

Login as root, then `cd /etc/inet'.  You should configure the card
before starting the networking software; otherwise you must (after
issuing `shutdown -h', of course) press the `RESET' button or switch
the power off and on before the changes take effect.  Give the command

     ./wdsetup -a 280

to set the card's address to an appropriate value.  If this doesn't
work, you need to read the file `README.wdsetup' for more information.

Besides changing the cards themselves, the new net-2 software allows
you to configure the drivers in the kernel to work with your card.  You
need to do this only if the kernel fails to recognise your ethernet
card at boot time, and writes the message `No ethernet device found' on
your screen and in the file `/usr/adm/messages'.  In this case, after
running `/etc/install.net', read the manpages for the commands
`ifsetup' and `iflink'.  As I understand it, you will need to use
`ifsetup' to reconfigure the driver, and then user `iflink' to link the
driver to `/dev/inet'.  Unfortunately, the net-2 FAQ contains no
information about these commands, and I do not find the man pages
clear.  Once you determine the correct form of these commands for your
machine, edit `/etc/rc.net' and insert them where the note about
`ifsetup' appears.


Configuring the tcpip package
=============================

The TCP/IP programs included in this release of MCC interim Linux
will not work unless you use a version of the kernel which includes
TCP/IP and, if you wish, NFS.  The default kernel on the boot disk does
include both TCP/IP and NFS.  This software should work even if you
have no Ethernet card, though you will need to comment out the last line
beginning with `$CONFIG' in `/etc/rc.net'.  In that case, of course,
you cannot contact other machines.

The kernel source supplied, like the compiled kernels, contains only
the Ethernet drivers contained in Linus Torvald's official release of
the kernel.  If you want support for one of the other Ethernet cards,
you must get patches from somewhere else and install them before
recompiling the kernel.  A recent version of these patches is available
by anonymous ftp from `ftp.mcc.ac.uk' in the directory
`/pub/linux/newether'.

After installing the tcpip package, give the command
`/etc/install.net'.  The following dialogue ensues:

     # /etc/install.net
     If you really want your hostname to be 'linux', type 'Y'.
     Otherwise type your hostname: avl0
     HOSTNAME: "avl0"
     Enter IP Address for avl0 (aaa.bbb.ccc.ddd): 130.88.201.62
     Enter Gateway Address for avl0 (aaa.bbb.ccc.ddd): 130.88.201.250
     Enter Domain Name for avl0: mcc.ac.uk
     130.88.201.62	avl0.mcc.ac.uk avl0
     Name Server for Domain mcc.ac.uk (aaa.bbb.ccc.ddd): 130.88.13.7
     You may add more nameservers by editing /etc/resolv.conf
     Networking software is now installed.  To start networking,
     type '/etc/rc.net'.  This will be done automatically whenever
     you reboot your machine.

Here instead of `avl0' your hostname should appear, and you must
give your own addresses instead of `130.88.x.x', and your own domain
instead of `mcc.ac.uk'.  Before you try to run any TCP/IP software, you
might need to run `wdsetup' or `ifsetup'.

After installing tcpip, you should edit the file `/etc/inetd.conf' to
comment out any services you wish not to allow.  To remove a service,
insert an initial `#'.  If `inetd' is already running, you must send it
SIGHUP or reboot after changing this file; otherwise the changes have
no effect.  Some services, particularly `tftp', may expose your machine
to crackers if you have a network connection.  Read the man pages and
be cautious!

If you have no local domain name server, you may wish to delete the
file `/etc/resolv.conf' and to remove `bind' from the file
`/etc/host.conf'.

Other networking programs are available from the various Linux ftp
sites.  They should compile and fit into the MCC installation with
little difficulty.  Note that MCC does not use shadow passwords, so any
programs which have the option of shadow password support must be
compiled without it.

*Note*: These programs are compiled from the most recent source I
could find.  I have fixed several bugs, but there may still be more.
The source I actually compiled can be found (with no patches needed) in
the file `netsrc23m' in the directory `source_files' in the current MCC
interim distribution.


Editing the system configuration files
======================================

After installing this version of MCC interim Linux, you may wish to
customise it.  The following files should probably be edited:

`/etc/rc.local'
     This contains the command which sets your host name.  Change
     `linux' to the actual hostname of your machine.  This is important
     if you intend to use TCP/IP.

`/etc/mtools'
     See the section on mtools in README.linux.

`/etc/passwd'
     If you wish to add a new user, edit this file.  The format is
          pw_name:pw_passwd:pw_uid:pw_gid:pw_gecos:pw_dir:pw_shell
     where the fields have the meanings defined in the file
     `/usr/include/pwd.h': user name, encrypted password, user ID
     number, group ID number, real name, login directory, login shell.

`/etc/lilo/config'
     This contains the command which controls what happens whenever
     LILO is reinstalled.  You must give the command
     `/etc/lilo/install' whenever the system file (`/etc/Image' by
     default) is modified (for example, by the `rdev' command) or
     moved: LILO does not use the directory structure to find the file.

`/etc/lilo/disktab'
     If you have one of the SCSI disks for which Linux cannot get the
     geometry, you must edit this file before installing LILO;
     otherwise the installation will fail.

`/etc/inetd.conf'
     Some services for inetd are commented out.

`/etc/kbmap'
     This file contains the key definitions for your keyboard.  By
     default the British (UK) keyboard map is installed.  The keymap
     for US keyboards is also supplied by default, and other available
     keymaps can be found in the maps package.  To install any of
     these, give a command such as `mv -f /etc/us.map /etc/kbmap' or
     `mv -f /maps/dk.map /etc/kbmap' as appropriate.  If your keyboard
     diverges slightly from the models used to create these files, you
     may need to edit `/etc/kbmap' slightly.

No other files should *need* to be changed.
