July 1992 Release 0.1 Installation Notes for 386BSD Release 0.1 William Jolitz Lynne Jolitz 386BSD Release 0.1: Welcome to 386BSD Release 0.1, the second edition of the 386BSD operating system created by William and Lynne Jolitz. Like its predecessor, 386BSD Release 0.0, Release 0.1 comprises an entire and complete UNIX-like operating system for the 80386/80486-based AT Personal Computer. 386BSD Release 0.1 is an enhanced version of the origi- nal release done by William F. Jolitz, the developer of 386BSD. 386BSD Release 0.0 was based on the Networking Software, Release 2 from the University of California at Berkeley EECS Department, and included much of the 386BSD work done earlier by Bill and contributed by us to the University. The latest release, 386BSD Release 0.1, con- tains new work by the developer and many new items which have been freely contributed by other software developers for incorporation into 386BSD (see the file CONTRIB.LIST). These contributions have increased the functionality and made it more robust. As a courtesy to the developer and the many people who have generously contributed these software enhancements, we request that users abide by and properly maintain all attributions, copyrights, and copylefts con- tained within this release. 386BSD is intended to foster new research and develop- ment in operating systems and networking technology by pro- viding this base technology in a broadly accessible manner. As such, like its predecessor, 386BSD Release 0.1 is freely redistributable and modifiable. Features of 386BSD Release 0.1 386BSD Release 0.1 is intended to be widely used by those interested in "pushing the envelope" towards the for- mation and development of innovative ideas in computer tech- nology. As such, we have spent considerable time developing a system which is simple to partition and install and emphasizes stability and completeness. The objective of this release is to allow anyone interested to quickly obtain and install 386BSD, so that the time is spent using the system and not on arcane system administrative details. 386BSD INSTALLATION NOTES 1 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 Among the many new features of 386BSD: * New "Tiny 386BSD" System Installation Floppy * Simplified installation procedures. * 386BSD partitioning for use on an MS-DOS system. * Compressed, multivolume CPIO dump format binary/source/other distribution sets on MS-DOS flop- pies. * 387 emulation. * SCSI support. * CD-ROM support. * NFS, TCP/IP and full networking. * New 386BSD "Fix-It" System Maintenance Floppy. * New "Additional User Software" MS-DOS floppy dump. We hope that while you browse through 386BSD Release 0.1, you will take a moment to look at the CONTRIB.LIST file to see the many people who have made this release possible. 386BSD Documentation and Sources of Information 386BSD is intended for research, development, educa- tion, and just plain exploration. Source, Binary, Installa- tion, and Fix-It floppies are available at a large number of sites. There are many user groups, support groups, computer societies and individuals who are supplying and running 386BSD and they are good sources of information and support. Installation procedures, release-specific items, and simple trouble-shooting are contained in the following sec- tions. For users who wish to understand the internals of the 386BSD system developed by William F. Jolitz from 1989 to the present, the most immediate and available reference is our feature series entitled "Porting UNIX to the 386", appearing in Dr. Dobbs Journal, USA (January 1991 to July 1992) and UNIX Magazine, Germany (June 1991 to present). For inquiries on the article series (including reprints), con- tact the magazines for information. A book discussing the internals of 386BSD, entitled 386BSD From the Inside-Out, will be available late 1992. 386BSD INSTALLATION NOTES 2 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 For information and questions on 386BSD seminars, tutorials, and materials, contact: Jim Joyce The Gawain Group 139 Noe Street San Francisco, California 94114 USA 1-415-626-7581 In the meantime, we can recommend some other books on the UNIX system that we have found useful. 1. For a good general presentation on UNIX system design, we recommend Maurice J. Bach's The Design of the UNIX Operating System (Prentice-Hall Software Series, 1986, 471pp). Although it is now obsolete in some areas, it still provides the best discussion of key system areas such as the buffer cache. 2. For a more theoretical viewpoint of operating systems design, we suggest Per Brinch Hansen's Operating System Principles (Prentice-Hall Series in Automatic Computa- tion, 1973, 366pp). 3. For an understanding of the roots of all UNIX-like operating systems, one should obtain Elliot I. Organick's The Multics System: An Examination of Its Structure (MIT Press, 1972, 392 pp). 4. Of course, every serious student of computer science should have Donald E. Knuth's three-volume set The Art of Computer Programming (Addison-Wesley Series in Com- puter Science and Information Processing, 1975). 5. The UNIX Time-Sharing System by D.M. Ritchie and K. Thompson, Communications of the ACM, 17, No. 7 (July 1974). This is the classic paper on the UNIX system which (we feel) set the tone for all future work with UNIX-like systems: The success of UNIX lies not so much in new in- ventions but rather in the full exploitation of a carefully selected set of fertile ideas, and especially in showing that they can be keys to the implementation of a small yet powerful operating system 6. On the 386-side, it's best to go to the source, with John H. Crawford and Patrick P. Gelsinger's book Pro- gramming the 80386 (Sybex, 1987, 773pp). There are many other 386/486 books available as well. 386BSD INSTALLATION NOTES 3 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 For general information on how-to-use UNIX-like sys- tems, C++, GNU software, and so forth, there are a number of good books available from any technical bookstore, with more arriving daily. In addition, an on-line manual is available (in the binary distribution set). It contains specific information on the use of UNIX utilities and commands. Type "man man" for information on the online manual. There are many newsgroups forming which discuss 386BSD. One should check out M&T Online (the DDJ newsgroup), Com- puserve, and BIX for 386BSD discussion forums. On the INTERNET/USENET, we are hoping to establish our own newsgroup called "comp.os.386bsd". This newsgroup would reside alongside the "comp.os.mach" and "comp.os.linux" newsgroups. Already there are over 100,000 copies of Release 0.0, and we hope to add to this number with the new and improved Release 0.1. Please help us to establish this newsgroup devoted to the "freely available" 386BSD system, by asking your news coordinator to subscribe to it. We do not recommend using comp.unix.bsd, since 386BSD, like linux and mach, is not a "comp.unix" system. There are a number of 386BSD special interest groups forming, including those interested in discussing shared libraries, filesystems, networking, windowing systems, giga- bit networking, and so forth. Also, a number of projects are getting underway focussing on improvements in the kernel and utilities. If you are interested in learning about any of these groups, please fill out and send in the REGISTRATION form and we will put you on the SIG mailing list (along with the general 386BSD mailing list). We can be contacted via Compuserve email (CIS 76703,4266 or 76703.4266@compuserve.com), BIX (wjolitz), or via the internet at ljolitz@cardio.ucsf.edu, and through DDJ and UNIX Magazin (Europe). Please be patient with responses, as the 386BSD user group base is growing daily, and some- times responses are a bit delayed. However, we do want to hear from you. 386BSD Release 0.1 Contents: 386BSD Release 0.1 consists of: Tiny 386BSD: System Installation Floppy Tiny 386BSD is a single floppy 386BSD system on a high-density diskette. This completely standalone sys- tem manages to allow a potential 386/486 based PC to be qualified for use with 386BSD, simply by attempting to boot it as an ordinary floppy. It also can be used to simply partition, install, and load 386BSD on the hard disk. It contains complete installation information and 386BSD INSTALLATION NOTES 4 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 networking facilities for obtaining the release via floppies, tape, CD-ROM, SLIP, and Ethernet. You can obtain the latest labeled copy of Tiny 386BSD directly from DDJ as part of their Careware Program. To obtain one from DDJ, just send a 1.2 MByte formatted and error-free high-density diskette and a self- addressed stamped diskette mailer to: Tiny 386BSD, Dr. Dobbs Journal, 411 Borel Avenue, San Mateo, CA. 94402 USA and they will send you the latest copy with a great label. There is no charge for this service, but it would be great if you slip a dollar or two into the mailer for the kids helped by the Children's Support League of the East Bay as part of DDJ's Careware char- ity drive. We know the children will appreciate it. (See the CAREWARE.INFO file for more information on the Careware Program and the Children's Support League.) Binary Distribution A collection of high-density MS-DOS floppy disks (10 3.5-inch floppies or 12 5.25-inch floppies), also in compressed multi-volume CPIO form, containing the exe- cutable, data, and documentation files of a working 386BSD system, including C and C++ compilers and libraries. When extracted, the files occupy approxi- mately 30 MBytes of disk space. Note that at least 5 MBytes of swap space, plus an operating reserve of another 10% of the total accumulated disk space men- tioned should be considered as minimum to operate this system. An additional 14 MBytes is necessary to hold the distribution prior to extraction. While 386BSD does not require MS-DOS for operation, MS-DOS floppies are used to simplify distribution of the release. Source Distribution A collection of high-density MS-DOS floppy disks (11 3.5-inch floppies or 13 5.25-inch floppies), which is a multi-volume compressed CPIO format archive of the source language files with which to recreate the sys- tem. When extracted, the files consume approximately 37 MBytes of space. In addition, at least 25 MBytes of space is taken up by the binary files created when recompiling. Please note that an additional 20 MBytes is necessary to hold the interim distribution to be loaded prior to release extraction. As mentioned above, 386BSD does not require MS-DOS for operation -- MS-DOS floppies are used to simplify distribution of the release. Additional User Software Distribution A collection of high-density MSDOS floppy disks (17 3.5-inch floppies or 20 5.25-inch floppies), again in compressed multi-volume CPIO format, containing various 386BSD INSTALLATION NOTES 5 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 public software packages that have been integrated into 386BSD, and are present both in source and binary in this distribution set. When extracted, the files con- sume approximately 51 MBytes of space. In addition, other files not necessary for system operation but con- venient for use with the system are present in this set. This distribution set is the fastest growing por- tion of 386BSD, and represents a considerable amount of work done by many dedicated contributors to 386BSD. 386BSD Fix-It System Maintenance Floppy This single high-density floppy contains the standalone system and the utilities required to diagnose, fix, and return to operation the system running on the hard disk. This floppy can also be used by experienced sys- tem administrators to manually partition and install 386BSD Release 0.1. A variety of online information notes regarding 386BSD is available and can be examined at any time. The INSTALL.NOTES file (this file) contains installation infor- mation. The REGISTRATION file contains the 386BSD user group registration form. Please complete and return it to receive updates and mailings about 386BSD. The list of major 386BSD contributors is contained in the CONTRIB.LIST file. The CAREWARE.INFO file in the base system contains information on the DDJ Careware program and Tiny 386BSD. The COPYRIGHT file contains the 386BSD copyright and condi- tions for use. In addition, complete checksum MANIFESTS for each category are also included. Software bugs and fixes should be reported using the BUGNFIX.FORM. Software contributors should refer to the SOFTWARE.FORM for information on how to contribute software for inclusion in future 386BSD releases. All distributions can be downloaded onto floppies. The Tiny 386BSD installation floppy should be obtained first, via a friend, DDJ, or by using kermit to snag the file dist.fs (a binary image 1.2 MByte floppy for either 3.5-inch or 5.25-inch high-density diskettes) and rawrite.exe (an MS-DOS utility to write the image on the high-density floppy). You can also use rawrite.exe to write the Fix-It floppy to a high-density floppy. The distribution sets (binary, source, additional software) are already set up for high-density MS-DOS floppies, and should not be used with rawrite.exe. Manifests The manifest files are extremely important to validate file and system integrity. These manifest files contain the checksum of every 386BSD file. Each file should have the 386BSD INSTALLATION NOTES 6 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 same checksum number as listed in the manifest. If a file is corrupted or altered, the checksum number will not match the checksum number recorded in the manifest. If there is any difference whatsoever, or you suspect that a file and/or the manifest on a machine has been altered or corrupted, cross- check any discrepancies with the standard manifests and files on Compuserve for confirmation. DO NOT USE ANY 386BSD SOFTWARE WHICH DOES NOT CHECKSUM CORRECTLY WITH THE STANDARD MANIFESTS AND FILES. 386BSD should only be obtained from sites which provide the complete system as distributed. Incomplete or partial versions of 386BSD (such as source sans binary and documen- tation) are not recommended, since they cannot be satisfac- torily correlated with system checksum manifests to com- pletely validate file and system integrity. OBTAIN 386BSD ONLY FROM SITES WHICH OFFER THE COMPLETE AND VALIDATED BINARY, SOURCE, INSTALLATION FLOPPY AND ON-LINE DOCUMENTA- TION. If you find corrupted and/or altered 386BSD software, or incomplete or inaccurate representations of this system on a ftp or BBS site, please snapshot a copy for later exam- ination, notify the Sysop, send email to our address at Com- puserve, and use only the files on Compuserve until the problem is corrected. We do not recommend that any 386BSD software be obtained off of UUNET. Scope and Goals of 386BSD Releases: 386BSD Release 0.0 was made available via the network in March of 1992, and the response was overwhelming -- an estimated 100,000 copies were obtained by users in one month through the "grassroots" efforts of a large number of peo- ple. Dedicated network volunteers got it out to as many people as desired it. Systems programmers and software enthusiasts got it running on a variety of PC's and confi- gurations, and spent time and energy aiding others via user group meetings, postings and email. Finally, a large number of software contributions were made available for the next release. After four years of work, 386BSD finally became the generic research and educational platform we envisioned when we wrote "386BSD: A Modest Proposal", the software specifi- cation for 386BSD, back in mid-1989. Better still, our goals for doing 386BSD Release 0.0 were accomplished. 386BSD Release 0.0 was a minimalist version which demonstrated feasibility, provided accessibility, and assured our readers and supporters that this project would be finished and available to all, and not just appropriated by private 386BSD INSTALLATION NOTES 7 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 concerns. 386BSD Release 0.1, in the tradition of odd-numbered releases, is essentially a new-and-improved version of Release 0.0. It is far more robust and well-rounded than Release 0.0 and supports more functionality, such as SCSI support and 387 emulation. In sum, 386BSD Release 0.1 is now a comfortable system for those used to working with Berkeley UNIX. While 386BSD still contains some experimental software, it is satisfactory for the experienced programmer or dedicated student. Devices Supported in this Release: This release supports a 386/486 SX/DX ISA (ATBUS) sys- tem, with the traditional hard and floppy disk controller (MFM, ESDI, IDE, SCSI - Adaptec 1542, RLL). Also, the usual display adapters (MDA/CGA/VGA/HGC) are supported, along with the serial communications ports (COM1 and COM2) and parallel port (LPT1). Ethernet controllers supported are the Western Digital/SMC 8000/Elite series, Novell NE1000/NE2000, 3COM 3C503, and the ISOLAN ISOLINK. Clones also appear to work quite well. Tape drive support is available for QIC-02 and SCSI (Adaptec 1542) controllers as well, allowing use of 3M cartridges of QIC-60 through QIC-150 format (no QIC-40 or QIC-80 supported at this time). SCSI (Adaptec 1542) CD-ROM drives and CD-ROM ISO 9660 filesystem format is also sup- ported. The system supports either 287 or 387 coprocessor, but does not require one for operation. As configured on the binary distribution, the system minimally requires a hard disk and controller, floppy disk drive (either 5.25 or 3.5 high-density only), and display adapter. If the serial port or a Western Digital Ethernet card (port 0x280, IRQ 2, iomem 0xd000) is present, the sys- tem can make use of it as well. (See TABLE 1 for configura- tion information for adaptec scsi controller, serial ports, ethernet controllers and QIC-02). It is recommended that the system possess at least 2 MBytes of memory, but more is definitely preferred. A 4 MByte RAM system with a 200 MByte plus SCSI hard disk is a comfortable configuration, although by sharing the sources via NFS, networked systems with 40 MByte drives are quite useful. A Tour through the Tiny 386BSD Installation Floppy The Tiny 386BSD Installation floppy contains a complete 386BSD kernel with drivers and networking facilities to allow 386BSD to run on a broad number of PC platforms and facilitate loading of the rest of the system. By the clever use of space-saving techniques, approximately 1.6 MBytes of 386BSD INSTALLATION NOTES 8 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 ____________________________________________________________ Adaptec 1542 SCSI Controller Configuration Information: as0 at isa? port 0x330 bio irq 11 drq 5 vector asintr Serial Port Configuration Information: com1 at isa? port "IO_COM1" tty irq 4 vector comintr com2 at isa? port "IO_COM2" tty irq 3 vector comintr Ethernet Controller Configuration Information: Western Digital/SMC 8000/Elite series: we0 at isa? port 0x280 net irq 2 iomem 0xd0000 iosiz 8192 vector weintr Novell NE1000/NE2000: ne0 at isa? port 0x300 net irq 2 vector neintr 3COM 3C503: ec0 at isa? port 0x250 net irq 2 iomem 0xd8000 iosiz 8192 vector ecintr ISOLAN ISOLINK: is0 at isa? port 0x280 net irq 10 drq 7 vector isintr QIC-02 Configuration Information: wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr ____________________________________________________________ TABLE 1: Device Configuration Information ____________________________________________________________ software are contained on a 1.2 MByte floppy. The 386BSD kernel itself is only 400 KBytes -- consid- erably smaller than commercial UNIX-like system kernels with comparable abilities, yet it is a complete POSIX-compatible system with Internet protocols, NFS and multiple other filesystems, and numerous device drivers. The Tiny 386BSD floppy can be explored prior to proceeding with any further steps. You can insert it into any 386/486 AT PC and try to boot it up. (The floppy is read-only until the install procedure is actually run). You can then explore this mini-386BSD system at your own pace, by looking at files and running commands such as ls, pwd, and cd. If you decide you would rather run Tiny 386BSD off of a fast hard disk instead of a slow floppy, you can setup a new partition (using the MS-DOS fdisk command) and install the base system at any time. (You can also easily deinstall the base system by simply deleting the partition). Tiny 386BSD contains automated facilities to qualify, partition, install, download, and extract the rest of the 386BSD INSTALLATION NOTES 9 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 system easily. Among the downloading facilities supported on Tiny 386BSD are via Ethernet, slip, modems, CD-ROM (SCSI only), QIC-02 and SCSI interface tape, and floppies. The downloading facilities have been compressed to save space and are uncompressed upon installation of the base system onto the hard disk. Tiny 386BSD has squeezed onto it a remarkable number of items, but due to space limitations, it contains only a very tiny fraction of what appears in 386BSD Release 0.1. The real 386BSD release is a complete development environment. You can do real OOP, leverage the software control manage- ment (RCS) utilities, use a plethera of editors, compilers, and huge number of utilities and related facilities, includ- ing networking -- and this doesn't even include the popular publicly available packages that have been ported by others. We cannot emphasize enough how much 386BSD actually contains -- and it is still growing! Finally, in addition to the binary, you can also obtain the publicly-available source code to work on areas which, until recently, required a working association with a research facility. 386BSD groups are working on shared libraries, windowing systems, high-speed networking, filesystems, operating systems -- and a whole lot more. Everyone with a good idea can become a part of this process. Booting Up Tiny 386BSD To boot up Tiny 386BSD, simply insert it in the floppy drive and type "CNTL/ALT/DEL". Be patient -- it takes a lit- tle time (approximately 1.5 minutes). Finally, a banner mes- sage should appear: 386BSD Release 0.1 by William and Lynne Jolitz. Copyright (c) 1989,1990,1991,1992 William F. Jolitz. All rights reserved. Based in part on work by the 386BSD User Community and the BSD Networking Software, Release 2 from UCB EECS Department. After this banner message, the devices that the system finds are listed: terminal devices, mass storage devices, and net- work devices. After the monitor and serial port are found, the next devices discovered should be the disk controller(s) (AT and/or Adaptec SCSI controllers). Then the system should attempt to locate (if present) any Ethernet controllers, floppy drives (1.2 MByte indicates a 5.25-inch floppy drive and 1.44 MByte indicates a 3.5-inch floppy drive), floating-point coprocessor, and QIC-02 (wt0) drive. 386BSD INSTALLATION NOTES 10 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 After it finds these devices (if present), it then probes for the hard disk(s). However, if the geometry of the drive has not yet been installed (via the install or diskla- bel command), it will state "wd0 (or as0): cannot find label (no disk label)". (If this message is absent, no drive was found. In this case, the drive connections should be rechecked). When the "#" prompt appears, you are now ready to explore Tiny 386BSD. (To install the base system, consult the "Installation Procedures" further on in these notes). If any devices in the machine are not found, the PC should be examined for proper cabling and jumpering of drives. You should also check to make sure that the devices not found are ones which are actually documented here as supported on 386BSD systems. In the case of Ethernet con- trollers, the default case (using IRQ3) cannot be used. To use the controllers, they must be rejumpered (old boards) or reconfigured (using software supplied by the manufacturer) to use IRQ2 8-bit (translated to IRQ9 16-bit on the ISA bus and system software). See Table 1 in the "Devices Sup- ported" section for further information. Elements of Tiny 386BSD Before embarking on the installation procedures, it helps to understand how the Tiny 386BSD floppy is put- together. Basically, Tiny 386BSD contains the following major elements: 1. The operational 386BSD kernel itself, with networking and driver support. 2. The documentation files discussing installation and registration. Also, manifests, copyright, and other relevant items. 3. The device interfaces to the drivers (console, wd, as, etc.) 4 The install command, which facilitates automatic crea- tion of a 386BSD partition (if desired) and installa- tion of the base system onto the hard disk. It also places on the disk the facilities for loading the rest of the system on the disk. 5. Facilities for loading the rest of the system on the disk, via floppy, tape, networks or Compuserve (BBS) download (compressed). 6. The extract command, used with the base system on the hard disk once Tiny 386BSD has been installed, checks 386BSD INSTALLATION NOTES 11 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 for the presence and correctness of all elements of the 386BSD system distribution (informing you of any discrepancies). If there are no discrepancies, it con- tinues and extracts the distribution and places it on the hard disk. Files of Tiny 386BSD Tiny 386BSD contains the following key files: / The main or "root" directory. 386BSD (the kernel itself), documentation files, and other directories are located here. The install utility, used only for installing the base system on the hard disk, also resides here. /bin stty sets the characteristics of the the console, baud rates for serial ports, and other parameters. sh is the shell command processor. Among the shell commands avail- able are the often used set, (set charac- teristics) echo, (obvious) pwd, (print work- ing directory and cd (change directory). ls lists the files in a directory. /dev Device interface files for all devices. /etc baselist.Z is a compressed file containing a list of the files copied onto the hard disk by install. To view this list, type: zmore baselist.Z baseutils.cpio.Z is a compressed file con- taining all the necessary downloading facil- ities used after the base system is installed on the hard disk. profile is the master configuration file for the shell (loaded before all others). In this case, it is used to specify the patch level of this floppy, and is consulted by all related pro- grams. /mnt Directory used to mount devices as files. /sbin init, the very first process run, is used to bootstrap the system after 386BSD is loaded and run. newfs is used by install to do the high-level formatting of the disk drive. /usr/bin More utilities relating to loading the dis- tribution. The distribution is in 386BSD INSTALLATION NOTES 12 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 multivolume compressed CPIO format. cpio is the AT&T archive command, contributed to BSD, and consolidates the files of the dis- tribution (in CPIO format). The compress utilities: zcat, compress, and uncompress are based on the modified Lempel-Ziv compression algorithm. They reduce the size and hence the transfer or loading time of the distribution. more filename allows one to view a pagenated file. /usr/distbin This directory contains most of the commands for "doing" things. The mount and umount commands gain and terminate access to dev- ices as filesystems, for example mount /dev/wd01 /mnt (used by the install command). Mounting filestructures correspond to accessing "A:, ..." device directories in MS-DOS. 386BSD always operates relative to the device on which it operates. Therefor, if currently operating off the hard disk, one must type mount /dev/fd0a /mnt ls /mnt umount /mnt to list files on a floppy and then remove the association. The -i option of mount allows mounting of a CD-ROM device via SCSI. The -u option turns the default "read-only" root filesystem to "read-write". 386BSD improves filesystem access over MS-DOS by caching writes until necessary. The shutdown command (with no arguments) cleanly shuts down the system, so that the PC can be turned off without incident. The command shutdown -todos will cleanly shutdown 386BSD and make the MS-DOS partition "active". After shutdown completes, wait for a prompt to hit a return, and then the PC will boot up MS-DOS. To return from MS-DOS to 386BSD, simply run fdisk to make the 386BSD partition "active" and reset. Optionally, one can also make the 386BSD partition active by rebooting the Tiny 386BSD floppy and typing: shutdown -to386bsd 386BSD INSTALLATION NOTES 13 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 removing the floppy, and hitting a return. Other typical utilities (reduced due to size constraints) include: mkdir (creates a directory, i.e. mkdir directoryname), rm (deletes a file, i.e. rm filename), mv (moves a file to a new location or renames it, i.e. mv oldfilename newfilename), cp (replicates a file, i.e. cp filename1 filename2), and cat (catenate files, cat file1 file2 ..., or view a file, cat file). /usr/mdec Bootstraps for 386BSD (SCSI or AT/IDE/ESDI/MFM/RLL devices). The initial block bootstraps (asboot, wdboot) and the remaining bootstrap (bootas, bootwd) are invoked by install, which in turn load 386BSD itself. The baseutils.cpio.Z file The baseutils.cpio.Z file in the /etc directory is a compressed file containing all the necessary utilities required after the install command is run. It contains all facilities for downloading and completing the extraction of 386BSD Release 0.1. Since these items cannot be run on this floppy, they have been compressed to save space. When the base system is installed on the hard disk, these facilities are uncompressed and ready-for-use. To see a table-of-contents listing of what is contained within this file, type: zcpio -itv < baseutils.cpio.Z Some key items of interest include: / The extract utility, used only for validat- ing and extracting the release on the hard disk. /bin chmod changes the mode (read-write-execute permissions) of a file. /etc Configuration files used for network opera- tion; protocols and services. protocols determines which protocol is associated with with the number in the internet packet header (used by ftp). services contains the binding for well-known name services (also used by ftp). 386BSD INSTALLATION NOTES 14 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 /sbin slattach associates a serial port (COM1 or COM2) with a SLIP packet driver (i.e. sl0) built into the system, turning it into a link-level interface to another system (i.e. slattach com1 2400 ). ifconfig initializes a network level address to a packet device For SLIP, both source and des- tination must be specified for a point-to- point connection. (i.e. ifconfig sl0 192.108.246.100 192.108.246.200, ifconfig we0 192.108.246.40). route manipulates the routing table (i.e. route add default 192.108.245.11). /usr/bin ftp (file transfer protocol) is used to retrieve the distribution via the network. /usr/distbin mknod creates device files for communica- tions. sync forces an immediate write to the disk. tip is used to connect via a modem to a remote system (i.e. tip /dev/com1). usr/local/bin Versions of rz (receive ZMODEM protocol com- mand) and mread (part of the mtools set; reads a MS-DOS floppy). The mread command should never be run off of the floppy -- only off the hard disk (after the install procedure). /usr/sbin update syncs out filesystem every 30 seconds automatically. bad144 maps out bad sectors on the disk. See "Bad Sector Mapping" for more information. 386BSD Installation Procedures Now that you have had a tour of the Tiny 386BSD floppy, you can embark on the installation procedures for the rest of the system. We have considerably simplified the 386BSD installation procedures since the previous release, so you can get underway more quickly. However, if you feel uncom- fortable with the procedures outlined below, please look before you leap and ask your local PC-UNIX user group, elec- tronic discussion forum, or newsgroup for help. Already, there are people with experience on more machines than we can list. Leverage other people's knowledge and experience, but don't forget to share yours as well. That's how 386BSD gets better. While 386BSD does not require MS-DOS to run, it can now coexist with MS-DOS on the same disk in a separate partition (although you can also use the entire disk if you prefer). In any case, IF YOU WISH TO SAVE THE CONTENTS ON YOUR DISK 386BSD INSTALLATION NOTES 15 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 FOR LATER USE, YOU MUST MAKE A BACKUP. (This is true no matter what system is used). You should also make a backup copy of the system and several copies of Tiny 386BSD and the Fix-It floppy and save them away. You should always have a working spare if system recovery procedures ever have to be implemented. Resizing MS-DOS and Creating a Partition Typically, a PC is purchased with MS-DOS on the entire drive. If you would like MS-DOS to remain on the system, you must first reduce the MS-DOS partition size so that free space will be made available to 386BSD. NOTE: If you intend to use the entire drive for 386BSD, you can ignore the following steps and proceed to the install procedure. If you intend to install the system manu- ally, using disklabel, newfs, etc., you must obtain these utilities from the "Fix-It" floppy and follow standard BSD installation procedures as documented in BSD administration references. Manual installation procedures are no longer discussed in these notes. First, backup any files you wish to save. MS-DOS stores information randomly all over the partition, so you will destroy your files if you resize. Then grab your MS-DOS floppy and boot it up. Next, using the MS-DOS fdisk command, delete the old partition, create a new smaller partition (saving at least 40 MBytes for 386BSD), and make it active. Then, you must high-level format the disk, using the MS-DOS format c:/s command. Finally, you must copy MS-DOS back into this parti- tion from the floppy, restoring any backup files. You are now ready to install 386BSD. If you are already using a fancy partitioning program such as "diskmanager", you should setup the 386BSD partition as type 0xa5 (decimal 165), with a minimum partition size of 40 MBytes to load and run the binary distribution set. (The complete source, binary, and other distribution sets are 120 MBytes uncompressed and hence require at least a 200 MByte drive if you want to recompile the system and use the larger source/binary public packages.) The install program will then detect this dedicated partition and automatically install 386BSD within it. THIS IS INTENDED FOR SPECIAL APPLICATIONS, AND IS NOT INTENDED AS THE GENERAL PURPOSE WAY TO BRING UP 386BSD. Installing the 386BSD Base System Next, boot up the Tiny 386BSD distribution installation floppy and type 386BSD INSTALLATION NOTES 16 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 install It will first query you as to how much space you wish to allocate to 386BSD. You should allocate at least 40 MBytes for the binary distribution. Once you have determined how much space you wish to dedicate to 386BSD, it will then query if you wish it to create a 386BSD partition. If you say no, it will query whether you want to place 386BSD on the entire drive. (Warn- ing: putting 386BSD on the entire drive will destroy all data currently on the disk.) Once you agree to either creating a new 386BSD parti- tion (if you did not create a 386BSD partition earlier) or putting it on the entire disk, a bootable image of the dis- tribution installation floppy will be installed. The system will then reboot and continue operation on the hard disk, freeing up the floppy for installation of the remainder of the distribution (if desired). If you wish to resize the partition after install has been run (but before continuing further), simply go back to MS-DOS (5.0 and later) and run the fdisk utility again to delete the old 386BSD partition. Then, return to Tiny 386BSD and run install again. If you wish to install 386BSD over the entire disk after install has been run (but before continuing further), simply run install again. If you wish to deinstall 386BSD after installation, go back to MS-DOS (5.0 and later) and run the fdisk utility again to delete the partition. To switch bootable systems (say, 386BSD to MS-DOS), use either a partition switcher bootstrap, the MS-DOS fdisk com- mand to make the partition active, or the shutdown command (see "Files of Tiny 386BSD" for more information on the shutdown command). To erase 386BSD from the dedicated disk, simply refor- mat the system. Some versions of MS-DOS require the master boot record to be rewritten as well, using the MS-DOS "fdisk /mbr" command. Other versions of MS-DOS require that the boot record lose its validity before being rewritten by fdisk. This is accomplished by cat'ing a file to the "raw" partition 'd' of the drive, "cat /386bsd >/dev/rwd0d", and then reformatting under MS-DOS. If you are using an old version of MS-DOS, you can use this technique to delete the 386BSD partition as well. This technique usually works (not always, however). As 386BSD INSTALLATION NOTES 17 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 such, we strongly recommend that you obtain the most up-to- date version of MS-DOS (5.0 or better) and save yourself the headache. Bad Sector Mapping Sometimes, during the installation procedure, bad sec- tors are found on a ST-506 (MFM), RLL, or ESDI drive: "wd0: hard read error writing fsbn XXXXX (wd0 bn YYYYY; cn ZZZ, tn A, sn B) This message indicates that it is a wise idea to map out bad sectors before continuing further, using the bad144 utility. To initialize, type: bad144 wd0 0 To map out a bad sector (the "bn" number YYYYY cited above) found by install, type: bad144 -a wd0 YYYYY WARNING: bad144 is NEVER used with SCSI or IDE disks, since they have their own bad sector mapping functions. Since ESDI and IDE drives appear very similar, make sure before running this command that you have an ESDI drive and not an IDE drive. SCSI and IDE drives should never have "hard read error" messages. If you get these messages, the drive may be misconfigured, or you may require special assistance. Loading the 386BSD Binary Distribution Now that you have the 386BSD base system running on the hard disk, you can download the rest of the distribution sets, and then extract and install them. Each distribution set consists of a multivolume, compressed, CPIO format dump. All files must be present before extraction, and after suc- cessful extraction they should be removed to reclaim space. The distribution media range from floppies, 3M data cartridge tapes, 8MM Exabyte tape, to CDROM. You can down- load the distribution via the INTERNET network (via Ethernet or SLIP), or by using serial download using ZMODEM from ser- vices like M&T Online, Compuserve, and BIX. (Please note that the instructions for downloading from Internet sites assumes familiarity with the use of ftp) The complete distribution (binary, source, and addi- tional packages) is very large (greater than 40 MBytes compressed), so you should obtain it in increments (binary first, then source, then additional packages) and only from 386BSD INSTALLATION NOTES 18 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 a large bandwidth network or a dense distribution medium. (The size and growth rate of 386BSD is bringing the spector of 100+ compressed floppy dumps closer every day). A. Loading the System From Floppies To load the 386BSD binary distribution, first change to the /tmp directory, where the files will be held. Type cd /tmp Now you are ready to download the distribution. To load the a set of 386BSD binary distribution flop- pies, insert one of the floppies in drive unit A (or 0) and type: loadfd Insert others until the entire distribution is loaded. Hit a CNTRL-C when all the floppies are loaded. (Dis- tribution floppies are kept in MS-DOS format floppies for ease of disk replication and the convenience of the PC user). The floppies can be loaded in any order. If an error occurs during loading (such as a bad spot on a floppy), only the floppy with the error need be reloaded (not necessarily from the same source). For example, if a single file fails to load from a floppy, that floppy can be obtained via serial download over a modem or the INTERNET network. You can then reload it by typing: mread "a:*.*" . B. Loading the System From Tape To load the 386BSD binary distribution from 3M cartridge tape, insert a QIC Cartridge (or 8mm tape) in the tape drive interfaced to either SCSI or QIC-02 (no QIC-40 or QIC-80 supported at this time). For a SCSI-interfaced tape drive, select the appropriate target device corresponding to the tape drive (example: target 2. dev- ice /dev/ras2a). Then type the command: cpio -iadm < /dev/ras2a For QIC-02 tape drives, select device /dev/rwt0, and type: cpio -iadm < /dev/rwt0 In each case the files will be read in as with the flop- pies. If any of the files read in off the tape are 386BSD INSTALLATION NOTES 19 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 corrupted or did not load correctly, extract will refuse to work until you correct the problem, possibly by a serial download of the affected file later, or by a floppy containing the affected file. C. Loading the System From CDROM To load the 386BSD binary distribution from SCSI CDROM, insert a ISO-9660 CDROM into the SCSI drive, and mount the CDROM by selecting the appropriate target device (example target 6 is /dev/as6c): mount -i /dev/as6c /mnt Then, locate the 386BSD release directory and execute the extract program from that directory. (Refer to the CDROM installation instructions for more information.) D. Loading the System via SLIP (Serial Line IP) To load the 386BSD binary distribution via a SLIP con- nection, attach a SLIP connection to the COM1 serial port. Use the slattach program at the desired baud rate to create a link layer connection to 386BSD and then enable the net- work layer with the ifconfig program (for example): slattach /dev/com1 2400 ifconfig sl0 <386bsd hostnumber> Use the route command to install the default route to the local gateway if you wish to download from one of the master distribution hosts on the INTERNET. (Note that you can only use numeric (e.g. 192.108.24.5) network addresses, not names). route add default Then use the ftp utility to copy files down from a distribu- tion host, using binary mode ("bin") and the "mget" com- mand. ftp D. Loading the System via Ethernet To load the 386BSD binary distribution via an Ethernet connection, attach the Ethernet to a local network. (Note, if the system does not find the Ethernet card in the bootstrap manifest, this will not work). Enable the network (ifconfig <386bsdhost>), and then follow the same procedures for ftp and routing as used in SLIP downloading. 386BSD INSTALLATION NOTES 20 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 D. Loading the System via Modem To download the 386BSD binary distribution from Com- puserve or BBS services which feature serial download- ing, attach a modem to COM1. Using the tip program, type: tip com1 (begin tip session via com1) ~CNTL-Z (suspend tip program) You should now have back your "#" prompt. Set the appropriate baud rate and other parameters for your modem, using the stty command and then fg (foreground) back to your serial session: stty 2400 (type in phone number of remote host) CONNECTED Your remote system site banner message and login procedures Once you login to your download site, intitiate a ZMODEM file download. Then suspend tip as before to return to your host, and use the rz program to receive ZMODEM files that are pending on the wire. rz /dev/com1 After downloading is completed, tip can be "unsuspended" to logoff the remote system, and break connection by hanging up the modem: +++ (get the modem's attention) OK ATH0 (hang up the line) OK ~. (terminate tip session) Once a distribution set is loaded into the /tmp direc- tory by any of these mechanisms, it can then be extracted and loaded on the hard disk. Extracting and Loading the 386BSD Binary on the Disk Once the files are in place in the /tmp directory, the extract command is run. This command specifies which 386BSD INSTALLATION NOTES 21 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 distribution set is being extracted: binary (bin01), source (src01), or the additional software set (etc01). extract For example, the command extract bin01 first checks the binary files. If all the elements of the set are present and verified, it then extracts and loads the final system onto the hard disk. DO NOT INTERRUPT THE EXTRACT PROCEDURE ONCE IT HAS BEGUN. If extract finds files missing or corrupted, it will list the problem files: "File bin01.XX is corrupt" "File bin01.YY is missing" stop the extraction procedure, and return with a "#" prompt. If you wish to stop your work at this point of the extrac- tion procedure to retrieve new copies of the problem files, you can use the shutdown command to safely shut down the system, saving your work. Once you reload the missing files (via any of the methods outlined above), run the extract command again. If the set is complete and valid, extract announces it is extracting the distribution, extracts the files, and loads them into final position. This procedure takes approx- imately 15-20 minutes. ONCE THE EXTRACT PROCEDURE IS BEGUN, IT MUST NOT BE INTERRUPTED OR BAD THINGS WILL HAPPEN! REALLY! DO NOT INTERRUPT HAPPY EXTRACT COMMAND. DO NOT TAUNT HAPPY EXTRACT COMMAND. Should the impossible happen and you trip over your power cord (for example) while the extract command is extracting the system on the hard disk, boot the Tiny 386BSD Installation floppy and start the installation procedure over from the beginning. We do not advise attempting BSD system recovery procedures at this point, as the filesystem may be inconsistent. At the end of the extract procedure, you will be prompted for your computer system name. If you have a fully-qualified Internet domain name assigned to your PC, you must type it here. If you do not have an Internet domain name (the common case), type a name which you wish to call your computer (i.e. "havoc", "daisy", "gremlin", etc. -- the name is only limited by your imagination). 386BSD INSTALLATION NOTES 22 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 When the extraction process is complete, it will say "extraction successful" and return with a "#" prompt. At this point, you may also download and extract the source and/or other software distribution sets (src01, etc01). How- ever, please be aware that these sets are very large and require an additional 200-300 MBytes to recompile and use comfortably. Once you have completed the extraction process and obtained the distribution sets you desire, you can now run the complete 386BSD Release 0.1 binary system off of your hard disk. Type shutdown Note: once you reboot the system, anything saved in /tmp is wiped away. To save any files, you must save them in another directory or off the disk to other media. Congratulations! You now have a complete 386BSD binary release. Login as "root" and get to work! Now that we've gotten through all this, please remember to join the 386BSD User Community and send us your REGISTRA- TION form! DES Encryption 386BSD incorporates software (such as NFS) which has been done by researchers in other countries. As a conse- quence, DES encryption and Kerberos have purposely been left off all 386BSD releases to allow for international use. This precludes password encryption for accounts. 386BSD is not a secure system, and should not be used as configured when a secure system is required. A Personal Perspective Life often goes in cycles, so they say. Ten years or so ago, another system developed Bill (also unfunded, by the way) went out the door -- the 2.8 BSD release for the PDP- 11. (At that time, the PDP-11 was the "inexpensive" com- puter of choice for universities and research groups). 2.8 BSD was the first complete BSD operating system and utili- ties release for the PDP-11, and it was very successful. However, the PDP-11 architecture was eventually superceded by other faster machines such as the VAX. By choosing such a popular platform as the 386/486 PC, we had hoped that 386BSD would go even further than 2.8 BSD ever could. We have already seen how a "populist" system on an inexpensive platform could excite interest and new work, and we hoped that 386BSD would reignite a new era of 386BSD INSTALLATION NOTES 23 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 innovation. As we look back over the last two decades, we feel it is important to remind everyone of some of the history of BSD development, so you can understand why we feel that mak- ing 386BSD available and accessible, and evolving it in new directions, is so very important. Perhaps Dennis Ritchie and Ken Thompson expressed it best when they discussed their perspective on UNIX in their now-classic The UNIX Time- Sharing System paper presented to the ACM in 1974. It is perhaps fitting that words written over 18 years ago by the Developers of UNIX should still be relevant to us using 386BSD today: Perhaps paradoxically, the success of the UNIX sys- tem is largely due to the fact that it was not designed to meet any predefined objectives. The first version was written when one of us (Thompson), dissatisfied with the available computer facilities, discovered a little-used PDP-7 and set out to create a more hospitable environment. This (essentially personal) effort was sufficiently successful to gain the interest of the other author and several col- leagues, and later to justify the acquisition of the PDP-11/20, specifically to support a text editing and formatting system. When in turn the 11/20 was outgrown, the system had proved useful enough to persuade management to invest in the PDP-11/45, and later in the PDP-11/70 and Interdata 8/32 machines, upon which it developed to its present form. Our goals throughout this effort, when articulated at all, have always been to build a comfortable rela- tionship with the machine and to explore ideas and inventions in operating systems and other software. We have not been faced with the needs to satisfy someone else's requirements, and for this freedom we are thankful. We hope that the existence and growth of 386BSD will quash the cynical notion, cultivated over the last decade, that the individual is irrelevant to progress. That was, and has always been, nonsense. It is only through the creativity of unencumbered minds that new ideas will develop and flourish. We realize that Release 0.1 still has far to go. How- ever, we are very proud of what we, with the aid of our dedicated user base, have accomplished so far. The Future of 386BSD: It's up to You 386BSD Release 0.0 has met with tremendous enthusiasm and support, and we hope that 386BSD Release 0.1, a stable robust version of 386BSD with enhanced functionality, will 386BSD INSTALLATION NOTES 24 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 allow more people to try 386BSD. But ironically, the very success of 386BSD has made it impossible for us to continue doing out-of-pocket personal releases. Complete releases such as we are doing are demanding, time-consuming, and expensive. It has been most frustrating to us that while the vision, the will, the experience, and the leadership are all present, the practi- cal constraints have become too great for us to ignore. Over the course of these releases, many people have become confused as to what 386BSD actually is. As such, we feel is important to underscore the basic differences between a commercial release and a research release such as 386BSD. While both are extremely costly to develop, engineer, and release, they actually have very different agendas. Commercial releases efforts are defined by well- established customer demands, prior product releases, and (occasionally) strategic marketing directions. In addition, if something needs to be added, it can be "tossed in" to satisfy immediate needs (the old "give the customer what he thinks he wants" mentality). Long-term objectives are gen- erally given short shrift. Unlike commercial releases, releases targeted to the research and educational communities are much more demanding in that the developer must possess a broad understanding of long-term technological trends and objectives and incor- porate them into each release, while still maintaining func- tionality. As a consequence, research releases and new work are generally done only under the appropriate supervision and auspices of a well-funded University project. However, we have discovered that any group selected to shape these releases must demonstrate leadership, vision, good judgment, and a devotion to ethical behavior in all their dealings. A development group chosen merely on the basis of convenience and cynicism (i.e. a "political" solu- tion) will result in the immediate desecration of these goals. If new research directions are to be fully explored and developed using 386BSD, then 386BSD itself must evolve. These first two releases, historic though they may be, are just the beginning of this process, and not an end in them- selves. Over the course of our 386BSD series in DDJ, we have occasionally touched upon many areas of new technology with which 386BSD and other UNIX-like operating systems must con- tend, such as symmetric multiprocessing, multimedia 386BSD INSTALLATION NOTES 25 Copyright (C) 1992 TeleMuse July 1992 Release 0.1 applications, and gigabit networks. We are fully aware of how to focus 386BSD to head in these directions, and we have spoken to many others in the research community who want to work on and share in this vision. However, if the benefits which 386BSD offers are to be "claimed" by the entire research and educational community, the costs must be borne by all of us as well. Quite frankly, if 386BSD is to have any future, it will require considerable resources and assistance, as well as the continued goodwill and enthusiasm of its user base. Your interest, involvement, and support of 386BSD and its goals will ultimately determine the future of 386BSD and succes- sive releases. 386BSD INSTALLATION NOTES 26 Copyright (C) 1992 TeleMuse