This is an attempt to describe the installation of Linux using the latest MCC interim release (0.99p8). By 'installation' I mean either installing this on a completely new system, or upgrading an existing system. This version is available by anonymous ftp from ftp.mcc.ac.uk in /pub/linux/mcc-interim/0.99p8 and in its subdirectories. You need to get the boot and utilities disk images, ftp-ing them in binary mode. For the moment, images are available only with the UK keyboard compiled. Since the kernels are compressed, the fixkbd utility does not work with them, but you should be able to recompile the kernel with little difficulty. After reading the file README.package, ftp (in binary mode) the packages you want, and copy them to DOS disks (or minix format disks). The boot and utilities images need to be gunzipped; you can do this under DOS using GZIP.EXE (which is in the directory mcc-interim/dos-utils). Then you need to copy them in raw mode to high density floppy disks. You can do this from MS-DOS using RAWRITE or RAWRITE3, which are also available in the mcc-interim/dos-utils directory. The disks need to have been low-level formatted first; you may use the DOS FORMAT command. On a UNIX system with a floppy drive, uncompress with gunzip. Low-level format the diskette, if necessary; under Linux this can be done as follows: fdformat /dev/fd0H1440 (or /dev/fd0h1200) (You can use /dev/fd0 if you have set the floppy disk parameters using setfdprm.) To copy an image to the floppy under a UNIX-like system, use 'dd': dd if=boot-UK of=/dev/fd0 bs=8192 Under MS-DOS a disk can be copied to a floppy by using RAWRITE: C:\>rawrite Enter source file name: util-xx Enter destination drive: a: Please insert a formatted diskette into drive A: and press -ENTER- : After rawrite has finished, remove the disk and continue. The MCC boot and utilities disks must be prepared in such a fashion. After you have written the images and packages to diskettes, put the boot disk in the 0 drive (the A: drive for MS-DOS) of the machine on which you want to install Linux. After rebooting the system, you should see something like this: Uncompressing Linux: check - work - done. Booting from floppy disk... Now booting the kernel Loading.......................... At this point a number of messages appear. If you have only one hard disk, you may see the message hard disk I/O error dev 0340, sector 0 unable to read partition table of device 0340 This can be ignored; it means that the kernel cannot access your second hard disk, which of course does not exist. Among the other messages which appear is this: Loading 921600 bytes into ram disk. ........................................... done Linux version 0.99.pl8-1 04/12/93 12:00:52 Remove the boot disk and put the utilities disk in. The utilities disk should be in the drive in which you will place all install disks. AFTER you do this, enter the number for the drive you will use to install Linux: 1 drive A: 5.25 inch HD floppies 2 drive A: 3.5 inch HD floppies 3 drive B: 5.25 inch HD floppies 4 drive B: 3.5 inch HD floppies Drive? _ The utilities disk is mounted in read-only mode, as are all other floppy disks during installation. After you put the utilities disk in the appropriate drive and give the correct answer, you will see the message: For further information, type 'more /mnt/README'. # _ At this point you have available a small number of commands in addition to the usual bash internals: chmod gunzip lsf mkfs.minix sh chown install mccinstall mkswap swapon cp ll mkdir more sync dir ln mkfs mount umount fdisk ls mkfs.ext2 rm vdir (To list the available commands, type , i.e., press the key twice. To list commands beginning with a letter or string, type the letter or string, then . You may need to type 'y' and if there are many commands.) If you do not have a version of Linux on the machine already, you probably need to run 'fdisk' and reboot; please see README.fdisk. NOTE that you may not need to reboot after using fdisk, but is is safer to do so. If you have already run 'fdisk' and rebooted, you should create any swap partitions and file systems using 'mkswap' and 'mkfs' respectively. You may now have more than one swap partition, but the limit on the size of any swap partition is 16mb. The syntax for 'mkswap' and 'mkfs' is mkswap [-c] /dev/xdxxx nnnn mkfs [-t fstype] [options] /dev/xdxxx nnnnn Here the option '-c' is optional; it is a good idea to use it, because it checks the disk for bad sectors. The device /dev/xdxxx MUST be a partition, NOT /dev/hda or /dev/sda, for example, but /dev/hda1 or /dev/sdb3. Otherwise you may make a mess of your drive and lose any data already on it. The size nnnn is the number of blocks available in that partition. This is the number printed by fdisk, and the command 'fdisk -l' will print these sizes most simply: Device Boot Begin Start End Blocks Id System /dev/hda3 472 472 589 15045 81 Linux/MINIX means that the partition /dev/hda3 contains 15045 blocks. The fstype on the mkfs command may be either 'minix', the default, or 'ext2', for long filenames and better disk management. The options for mkfs are -c both Check blocks as for mkswap. -nxx minix Specify maximum filename length. Must be 14 or 30. -i xx ext2 Specify the number of bytes per inode. -m xx ext2 What % of the partition is reserved for superuser. -v ext2 Give extra messages. For your first installation, just accept the defaults, except that I recommend -c in all cases, and perhaps '-n30' for minix filesystems. After creating swap space, you can make it available to the operating system by using the command 'swapon': swapon /dev/hda5 for example, makes partition /dev/hda5 available as swap space. This is particularly necessary if you have only a small amount of RAM. You should not mount hard disk partitions before installing, as was required in previous MCC interim releases. At this point you should type 'install' to install or update Linux. The former warnings have been omitted, but you can stop by pressing CTRL-C, though this may leave things in an odd state. Here is part of a sample installation, with comments. # install Which device contains the file system you wish to be mounted on '/'? Give a name in the form '/dev/hda5', or type 'quit' to quit: /dev/hda2 Does /dev/hda2 contain a Minix file system? (Y or N): n Does /dev/hda2 contain an extended(2) file system? (Y or N): y [Ext II FS 0.2d, 93/03/30, bs=1024, fs=1024, gc=5, bpg=8192, pg=2016] This message describes the extended(2) file system. If you choose the minix file system, no message appears. No other types are supported. Do you wish to have a regular swap device? (Y or N): y What device will be used for swap? /dev/hda6 This message does two things: it gets the name of the swap device to put in your fstab, and it checks to see whether you have already enabled swap on that device, and enables it if you have not. You should already have done a 'mkswap' for this partition, as described above. Is there another partition you wish to mount? If so, give its name in the form '/usr/src', with a slash at the front and no slash at the end. If not, press : /usr/src This loop allows you to install onto a system in which several partitions are mounted. You must give the pathname which the partition is going to have after the system is installed. You may not give the names '/mnt' or '/proc'. You ought not give the names '/dev', '/etc', '/lib', or '/bin' either, as this will make your system unbootable. Which device contains the file system you wish to be mounted on '/usr/src'? Give a name in the form '/dev/hda5', or type 'quit' to quit: /dev/hda3 and so forth, with the question about minix or ext2 file system types. The file systems are actually mounted at this point, so you should already have file systems on them. Eventually you press . Shall I install each package without prompting? (Y or N): n MCC interim used to prompt always, as I prefer, but some people have asked (quite sensibly) that this be optional, as it is in the SLS distribution. Baseb contains basic binaries for Linux. Install Baseb.tgz? (Y or N): y Installing Baseb.tgz ............................................................... 3351 blocks Verifying Baseb.crc Filesystem 1024-blocks Used Available Capacity Mounted on /dev/hda2 xxxxx 2952 xxxxx 10% You will probably have quite a mess if you don't install Baseb, as the installation has already overwritten some of your existing files (if any), but may not have created the binaries you need to install other packages. The dots are a nuisance on fast systems with much memory, but on slow systems they let you know things haven't died. Verifying is done using brik (which is installed from Baseb). If there is a bad file, a message appears saying 'BAD usr/bin/groff'; this probably means you have had a small corruption somewhere, but it is unlikely that you will have just one. After verification, the crc files are placed in the new /tmp directory, where you may later delete or save them. All binary executables are verified, but not the kernel /etc/Image, which is modified during the installation. The output from 'df' after each package is intended to allow you to stop if your disk is getting too full. Other messages you will see are: Baset contains basic text files for Linux. Bison contains the GNU yacc-compatible parser generator. Flex contains the GNU clone of lex, the lexical analyser generator. Gawk contains the GNU version of the awk programming language. Gcc contains the GNU C compiler, release 2.3.3, excluding g++ and gprof. Gdb contains the GNU debugger. Gpp contains the GNU C++ compiler, release 2.3.3, except for those files contained in the gcc package. Gprof contains the GNU profiler gprof and its associated library files. Groff contains the GNU clone of the nroff/troff text formatter. Kermit contains the Kermit file transfer and serial comms program. Linux contains the kernel source files for Linux. Patches contains all patches used to compile the binaries included in the current MCC interim distribution. Tar contains the GNU version of tar, the tape archive program. Tcpip contains networking programs, daemons, and configuration files. These will not work unless you recompile the kernel to include tcpip. As with Baseb, omitting the package Baset may have unpredictable consequences. The files include man pages and configuration files needed for the basic binaries to work properly. Every now and again during installation, you will see this message: You may now remove the disk from the drive. If you wish to install from another disk, then put it in the drive and press when ready; or type 'q' to stop. With hindsight, it would have been better to ask for 'c' or another character; during testing I accidentally pressed and, well... you have to go through the old disk again, or get a lot of error messages. If your disks are DOS disks, you should have no other messages at mount time except 'VFS: Disk change detected on device 2/28' or some such, you will get some extra messages which I allowed to remain in case they might contain useful information. After you install the last disk and type 'q' to stop, the following appears: LILO can be used to boot Linux from your hard disk. It can also give you the choice of booting one or more versions of Linux or some other operating system. LILO can install itself in any partition, or in the Master Boot Record, or on a floppy disk, if you wish to be safe. Would you like to install LILO now? (Y or N): y Where should the boot code go? You may override this later to write a test floppy before installing LILO on the hard disk. Possible choices include /dev/hda (the master boot record on your hard disk), /dev/hda2 (the partition you are installing Linux on), or /dev/fd0H1440 (a floppy disk). Give me the name of a block device. The default is /dev/hda: _ The choices are (1) the first eight characters of your root device, (2) the root device itself, and (3) the floppy you installed from. In general, you should find the default acceptable unless you are running OS/2, and I believe that will be supported before long. If you choose the second choice (the root device), you must be installing in a primary partition, it must be marked as active, and you must have some other loader in the Master Boot Record. Note that (unless you choose to do so later) this installation will not actually write the code where you tell it here; instead it will write to a floppy (as described below). I prefer to test things before taking plunges! LILO will boot by default the first system you specify. Others must be selected by taking special action at boot time. Is the first system you wish to add a version of Linux or not? Answer 'n' for other operating systems, or 'q' to quit: (Y, N, Q): y The special action at boot time consists of (1) holding down CTRL or ALT or SHIFT before LILO starts to work, or (2) pressing CAPS LOCK or SCROLL LOCK and getting the LED to light before LILO starts. You should have about 5 seconds; this is configurable. We continue with the 'y' case: The default Linux image in this installation is /etc/Image. Press if you are using this image, or if you have a different image somewhere else which is currently mounted, give its pathname: _ Later you may prefer to tailor LILO's configuration to suit your taste, but that is not easily possible at the moment. This option allows you to use an existing image (not in /etc/Image) as an option; for example, I often mount another Linux root partition as /old and answer /old/etc/Image to this question. What would you like to call this option? The default is 'linux'. Remember, you may not give the same name to two options: _ Obviously, it is hard to differentiate between two choices with the same name. Is the next system you wish to add a version of Linux or not? Answer 'n' for other operating systems or 'q' to quit: (Y, N, Q): n In what partition does this other system live? Press if you do not wish to add this option. Otherwise give an answer like /dev/hda1: /dev/hda1 What is the name of the device where this partition lives? I want the block device which is the whole of the disk. Press to accept the default '/dev/hda'. You cannot give your second hard disk as an answer. Type 'q' to give up: _ The current limitations mean that only /dev/hda and /dev/sda are acceptable answers. The installation chooses the default from your previous answer. What would you like to call this option? The default is 'dos'. Remember, you may not give the same name to two options: _ Eventually you type 'q', and then see the following question: Where would you like to install LILO at this time? You may put it on /dev/fd0H1440 to be safe; be sure you have a formatted floppy disk in this drive NOW, and that it is a device you can boot from, not your DOS B: drive. Or you may install it in /dev/hda. Give me the name of a block device. The default is /dev/fd0H1440: _ At this point (having inserted a formatted floppy in the drive as instructed) press to accept the default, or type /dev/hda if you wish to be daring. You should then see the messages: Added linux Added dos This release of MCC interim Linux has now been installed. Reboot your system and login as root. Before this last message appears, the installation procedure does a sync and unmounts all the disks (except the ramdisk, of course). Leaving your safe test floppy in the drive, reboot and see what happens. If the boot (and the test of DOS) is a success, login as root, and type '/etc/lilo/install' to install LILO wherever you selected as its permanent home (/dev/hda above). If you choose not to install LILO during the above process, you will be invited to put a formatted high density floppy in your A: drive, so that a bootable copy of Linux can be written to it. You can, of course, refuse this option as well, in which case you must boot Linux in your own fashion. If you use MCC interim Linux as an upgrade, you should be aware that the directories /root/bin and /root/usr/bin are included in your PATH variable BEFORE the directory /mnt/bin. This should not cause problems unless you have your old root disk mounted on /root, which is not now necessary. Remember to unmount all hard disk partitions before typing 'install'. If you use MCC interim Linux as a recovery system after installing it, you may wish to modify the distributed utilities disk, perhaps deleting the big Base?.tgz files and putting other commands in the directory which will be /mnt/bin after booting. After booting, you may wish to remove /tmp and give the command 'ln -s /root/tmp /'. This will allow you to use vi to edit large files. If you use MCC interim Linux as an upgrade instead of as an installation, a number of important files from your previous system will be saved in a special directory named /backupdirs; for example, /etc/passwd from your old system will be in /backupdirs/etc/passwd. It is not possible -- or desirable -- to leave such files where they are, since this might mean the new Linux would not boot. Be careful before replacing the MCC interim configuration files with older versions. Personal files belonging to root and user will not be overwritten, but files such as .profile and .bashrc might be. For this reason, the .profile, .bashrc, and other files of these two users may also be saved in /backupdirs/home/user, etc. If you have installed gcc and the kernel sources, you may wish to recompile and reinstall the kernel. To do this, cd to /usr/src/linux-mcc and edit the Makefile to choose your national keyboard, default SVGA mode, etc, as described in the README file in that directory. Then type make config make dep make ./install This last command installs the newly compiled kernel in /etc and uses LILO to prepare to boot from it. At this time, reboot, and type the command 'psupdate' immediately after logging in as root. This 'install' script also saves the old /etc/Image as /etc/Image.old; if you wish, you may edit the file /etc/lilo/config to include this as another option so that you may test the new kernel safely before discarding the old.