INSTALL NOTES FOR LINUX v0.95a Jim Winstead Jr. - March 17, 1992 This file contains basic instructions for installing Linux v0.95a. More detailed instructions are being written by others. Read alt.os.linux for details on this, and to see preliminary drafts. COPYRIGHT Linux 0.95a is NOT public domain software, but is copyrighted by Linus Torvalds (torvalds@cc.helsinki.fi). The copyright terms follow the GNU Copyleft. See the file COPYING from any GNU software package for the finer points. Note that the unistd library functions and all library functions written by Linus Torvalds are exempt from this copyright, and you may use them as you wish. INSTALLATION 1) First, and absolutely the most important step, MAKE BACKUPS OF YOUR SYSTEM! This system won't do anything nearly as nasty as coredump all over your harddrive (see 386BSD v0.0), but it is quite easy to accidently screw something up while installing. 2) Test out the Linux v0.95a boot disk with the Linux v0.95a root disk. If you are unable to get the boot disk to work properly on your system, try posting to alt.os.linux, or contacting Linus. Notice that Linux (as of v0.95) contains an init/getty/login suite, and this will start up 'login' on the first four virtual consoles, accessed by Left-Alt-F[1234]. If you experience problems on one virtual console, it should be possible to switch to another one. (There is a good chance the backspace key will not work with /bin/sh on your first virtual console, as this how it often behaves on my machine. I've noticed that it usually works in the other virtual consoles, however.) 3) Run the 'fdisk' program on the root floppy. This will tell you how each of your harddrives is partitioned. Note that the names of the hard drive partitions has changed from v0.12, and 'fdisk' now properly reports the new device names (unlike the fdisk with v0.95). If 'fdisk' tells you about any partitions at all, Linux can successfully read at least part of your harddisk, and you will most likely be able to install Linux on your harddrive. If you have used previous versions of Linux, you will notice that 'fdisk' now recognizes extended partitions. Support for this in the kernel, however, is largely untested. If you're feeling brave, go ahead and try, and report any problems to Linus. 4) Make sure you have a free (preferably primary) partition on your hard drive. If you want to repartition your harddrive, you can use the pfdisk program on the root floppy. See pfdisk.man in the /INSTALL directory for more details on using this program. (NOTE: you will need to know your hard drives disk geometry to use pfdisk. You can find this out by examining your CMOS setup on most computers.) 5) If you have used pfdisk to change your partition table, be sure to reboot Linux now, so the new partition table will be recognized by Linux. 6) Use 'fdisk' again to check the partitions on your hard drive, and use 'mkfs' to make a Linux (minix) filesystem on the partition you want to be using for Linux. The proper command is "mkfs /dev/hdX nnn" where X is the partition (i.e. a1, a2, b3, etc.) and nnn is the size in blocks (kilobytes) of the partition as reported by fdisk. You should be able to use the size of the partitions to tell them apart. 7) Mount the new filesystem. This can be done by using "mount /dev/hdX /mnt", which will mount the partition into the directory /mnt. 8) Run the script in /INSTALL called 'mktree'. This will create a bare directory tree built down from the specified directory. So, for a standard installation, you would use "mktree /mnt", which would build the bare directory tree starting from /mnt. 9) Run the script in /INSTALL called 'mkdev'. This will create the standard Linux devices in the directory 'dev' in the specified directory. For a standard installtion, this would mean typing 'mkdev /mnt' to create the devices in /mnt/dev. NOTE: This step is really optional, since the 'install' script (next step) will do this if it sees you haven't. 10) Run the script in /INSTALL called 'install'. This will copy over the binary programs from the root disk to the directory tree on the specified directory. This means typing 'install /mnt' for a standard installation. NOTE: (for those upgrading from previous versions of Linux) The 'install' script uses the +interactive switch for copying files from /etc, which means you can tell it whether or not to overwrite any of these files. 'install' will also go through your /usr/bin and /bin directories and ask you if it should remove any incorrectly placed files. (Such as /bin/update and /bin/init, which have both been moved to /etc.) 11) You should now have a complete (but very basic) root filesystem on your harddrive. To be able to boot from floppy with this as your root filesystem, you will have to edit the boot diskette. This is done by modifying the word at offset 508 (decimal) with a program such as Norton's Disk Editor, or use pboot.exe (available where you got this file, the boot disk and the root disk, hopefully.) This word is in 386-order (that is, least-significant byte first), which means it should look like one of the following: LSB MSB - device -------------------------- 01 03 - /dev/hda1 LSB = Least-Significant Byte 02 03 - /dev/hda2 MSB = Most-Significant Byte 03 03 - /dev/hda3 04 03 - /dev/hda4 41 03 - /dev/hdb1 42 03 - /dev/hdb2 43 03 - /dev/hdb3 44 03 - /dev/hdb4 The numbers are in hex, and if you're editing the boot diskette by hand, these two bytes should initially be 00 00 (and are followed by two non-zero bytes). Note that pboot.exe predates Linux 0.95a, so some of the information it presents is inaccurate (it refers to the old hd* naming scheme). The codes to use are as above, but with the most- significant byte first. (So /dev/hda1 = 0301, /dev/hda2 = 0302, etc.) 12) You should now be able to boot from this diskette and it will use your new Linux partition as the root partition. You'll notice, however, that you can't do a whole lot with just the programs on the root diskette. You'll need to get further packages from whereever you got the root and boot diskettes, and read these from a floppy using tar and compress. (Simple instructions: Download the file to DOS, use rawrite to write the tar file to diskette. Use 'tar zxvf /dev/' to read the file from floppy, where is the appropriate floppy device. (PS0 is a 1.44 meg 3.5" as A:, PS1 is a 1.44 meg as B:, at0 is a 1.2 meg as A:, at1 is a 1.2 meg as B:.) 13) Before you ever reboot your machine when it's running Linux, you should run 'sync'. This flushes Linux's disk buffers, making sure everything has been written to disk. Failing to do this could result in badly corrupted filesystems. ---------------------------------------------------------------------------- These instructions are not the best, but should be enough to get you going. If you have more questions, either post on alt.os.linux, or send mail to me (jwinstea@jarthur.Claremont.EDU), or to Linus (torvalds@cc.helsinki.fi). Remember, the only stupid questions are the ones that you don't ask.