home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / mach / doc / unpublished / i386_install.doc.Z / i386_install.doc
Encoding:
Text File  |  1993-01-19  |  74.3 KB  |  1,508 lines

  1.                        MACH I486/I386 INSTALLATION NOTES
  2.  
  3.                           Carnegie Mellon University
  4.                              Pittsburgh, PA 15213
  5.                                 19 January 1993
  6.  
  7. 1. Introduction
  8.   The  Mach i486/i386 release is a complete system that is compatible with both
  9. the Mach 2.5 monolithic kernel and the Mach 3.0  micro  kernel  and  UX  single
  10. server  combination.  On  IBM PS/2 machines with the microchannel architecture,
  11. only Mach 3.0 is supported. For the duration of this document,  any  references
  12. to  IBM  PS/2  machines  refer  specifically  to  PS/2's  with the microchannel
  13. architecture.  This system has an application environment that is close to  BSD
  14. 4.3-Tahoe.  It  has  been  distributed  since  1990.   Most of the applications
  15. provided in this release will run with either the Mach 2.5 or Mach 3.0  kernel.
  16. There  are  a  few  programs where different versions must be used depending on
  17. which kernel you are using.  This system can be used  to  build  the  Mach  3.0
  18. micro-kernel and Unix server.
  19.  
  20.   The programs and libraries come from the 4.3BSD-TAHOE release.  Additionally,
  21. we provide the Mach specific programs, include files,  and  libraries  (libmach
  22. and  libthreads).    The  CMUCS  library  and  some of the CMUCS programs (most
  23. notably rfs and sup) are also included with this  release.  Lastly,  since  the
  24. Mach  I486/I386  2.5  kernel does not support BSD file system labels, most file
  25. system tools are CMU tools derived from 4.3BSD.
  26.  
  27.   This release requires the recipient to have a Mach 2.5 or  Mach  3.0  license
  28. from  CMU  and  BSD4.3  license  from  University  of  California which in turn
  29. requires either a UNIX/32V, SYSTEM III or SYSTEM V source  license  from  AT&T.
  30. Further,  we  are  only  allowed  to  distribute  Sun NFS to sites with Sun NFS
  31. educational licenses.
  32.  
  33.   All the releases that are made by CMU are done only by an  Internet  transfer
  34. protocol  called  SUP  (Software  Update  Protocol). If your site is not on the
  35. internet or you prefer a tape distribution for any reason, the 2.6 MSD  release
  36. is  available  on  tape from Mt Xinu. For information about that release please
  37. send e-mail to mtxinu-mach@mtxinu.com or phone (510) 644-0146.
  38.  
  39.   Two additional Mach components can be uploaded with this system:    Mach  3.0
  40. and  MDOS.    Mach  3.0  divides the traditional monolithic kernel into a micro
  41. kernel and a server program.  The latter provides a "personality" to  make  the
  42. whole  behave  like  a  particular  operating  system.  MDOS is a DOS emulation
  43. package for use under Mach 3.0.  It uses the i486/i386  hardware  Virtual  8086
  44. mode to run an emulated DOS as a Mach 3.0 task. For information about Mach 3.0,
  45. read the documents mach3_sup, mach3_build.{ps,doc} and mach3_setup.{ps,doc}  in
  46. the Mach public FTP area, mach.cs.cmu.edu, /usr/mach/public/doc/notes.  To find
  47. out about MDOS, read the file mdos_info.{ps,doc} in the same directory.
  48.  
  49.   This document assumes a working knowledge of the installation and maintenance
  50. of  a  4.3BSD  system. If you are unfamiliar with the 4.3BSD system, you should
  51. read the system maintainers documentation for 4.3BSD.
  52. 2. Hardware Requirements for Mach on i386 Machines
  53.   We only support machines with:
  54.    - either an i386 or i486 processor
  55.    - at least 5 Meg of memory.  We typically use 8Meg - 16Meg.
  56.    - an AT/ISA compatible bus, or IBM PS/2 microchannel bus.
  57.    - an approved disk controller: (You should get at least 100Meg of disk.
  58.      We typically use 300Meg drives.)
  59.         * WD 1007 compatible disk controllers.
  60.         * IDE disks (these are WD 1007 compatible).
  61.         * Adaptec 1542B compatible SCSI controller.
  62.         * SCSI  controllers  that  make  disks appear to the kernel as IDE
  63.           disks, such as on IBM PS/2's.
  64.         * ST506 controller [Note: they are awfully slow.]
  65.    - displays:
  66.         * simple displays in 25 x 80 character mode.
  67.         * B&W X11R4 for VGA at 640x480 resolution.
  68.         * Color X11R5 for SVGA from Thomas Roell.
  69.    - high density 3 1/2" and/or 5 1/4" floppies  at  1.44Meg  and  1.2Meg,
  70.      respectively.
  71.  
  72.   We support but do not require:
  73.    - Intel 80387 hardware floating point. (recommended)
  74.    - The built-in serial line: COMi
  75.    - The built-in parallel port: LPTi
  76.    - ethernet controller boards (non-IBM PS/2):
  77.         * 3COM's  EtherLink  I  and EtherLink II (sometimes known as 3c501
  78.           and 3c503),
  79.         * Western Digital's WD8003E and WD8013E ethernet boards.
  80.         * SMC's WD8003E Elite and WD8013E  Elite  ethernet  boards(Western
  81.           Digital  sold  its  WD8003 ethernet product to SMC shortly after
  82.           reengineering the board.  This board is called the WD8003 Elite.
  83.           A recently sampled board seems to work fine, but there have been
  84.           problems with some early units.  (They would  stop  transmitting
  85.           after a while.))
  86.         * Intel's iMX586 or PC586/ENET586 ethernet board (Now obsolete)
  87.    - The IBM token ring adapter (IBM PS/2)
  88.    - Wangtek 1/4" standard 3M streamer.
  89.  
  90.   WE DO NOT SUPPORT:
  91.    - NFS for commercial licensees of NFS
  92.  
  93.   NOTE:  While  Mach does not require a network interface for normal operation,
  94. our method of installation assumes that you can get the files from CMU  to  the
  95. target machine over the internet.
  96.  
  97.   Mach is being used at CMU on numerous i486, i386 and i386sx clones.
  98.  
  99. 3. The Bootstrap Disks
  100.   This  distribution  is  intended to be loaded onto an empty disk; it contains
  101. all the binaries and sources that are needed.  The Mach bootstrap kit  consists
  102. of a pair of High Density (HD) floppy disks.  We can provide either 3 1/2" or 5
  103. 1/4" disks; the data contained are the same independent of floppy capacity.
  104.  
  105.   The first disk contains a bootstrap program and a copy of the "Mach  Kernel".
  106. The  second  disk  contains  a file system with Unix binaries.  These disks are
  107. intended to be used not only during the boot process, but also to recover  from
  108. problems that might prevent you from being able to boot off the hard disk.
  109.  
  110.   The second disk contains (approximately):
  111.       PORTFILE
  112.  
  113.       bin:
  114.       [               dd              ls              setup
  115.       cat             echo            mkdir           sh
  116.       chmod           ed              mv              stty
  117.       cp              hostname        pwd             sync
  118.       date            ln              rm              tar
  119.  
  120.       dev:
  121.       MAKEDEV and devices
  122.  
  123.       etc:
  124.       badblocks       fdisk           ifconfig        passwd          route
  125.       badsect         fsck            init            rc              services
  126.       clri            group           mkfs            reboot          termcap
  127.       diskutil        halt            mknod           restore         umount
  128.       dump            hosts           mount           rfshost         vtoc
  129.  
  130.       mnt:
  131.       tmp:
  132.  
  133.       usr/bin:
  134.               rfs     sup
  135.  
  136.       usr/games:
  137.               rain
  138.  
  139.       usr/ucb:
  140.               ftp     telnet
  141.  
  142.   The  installation  process  presumes  that  you are going to boot your target
  143. i486/i386 machine from the floppy disks that we have provided and then transfer
  144. the  files from CMU onto the target machine.  In this document, we presume that
  145. you are going to access the Mach binaries and sources via the  internet.    tar
  146. and dump/restore are also provided, here, to allow you to copy the sources into
  147. some other local machine and then to transfer them to the PC by tape,  floppies
  148. or lan access.
  149.  
  150.   You  will  be  requesting binaries and sources from a database machine at CMU
  151. using the sup database update program/protocol.  (See  the  sup  manual  page).
  152. Your  machine  will  authenticate  to  the database machine; it must explicitly
  153. supply an encryption key (CRYPT) in the protocol negotiations.
  154.  
  155.   The first steps in preparing for a internet distribution are:
  156.    - Verify that you have a Mach 2.5 license.
  157.    - Verify that your site has internet access.
  158.    - Verify that your machine has an acceptable network interface.
  159.    - Register your machine name, internet address,  and  CRYPT  with  CMU.
  160.      Send  this information to mach@cs.cmu.edu.  You should chose your own
  161.      CRYPT, a character string at least  6  characters  long  or  we  will
  162.      assign a random one.
  163.    - Specify what size floppy disks you need. You will be asked to send us
  164.      two blank floppies of the required size (double-sided, high-density).
  165.  
  166.   When you contact CMU to record your CRYPT, your  name  will  be  added  to  a
  167. general  discussion list for Mach 2.5 I386 related problems and questions.  You
  168. send mail to machi386@cs.cmu.edu to write to this discussion list.
  169.  
  170. 4. Before You SUP
  171.  
  172.  
  173.  
  174. 4.1. Low Level Disk Formatting
  175.   You might need to perform a "low level format"  of  your  hard  disk.    This
  176. procedure  partitions the disk into sectors and then looks for bad areas on the
  177. disk.  It usually takes several hours.  Some manufacturers (HP,  Toshiba,  ...)
  178. ship  the  disks preformatted.  Also, some computer stores will format the disk
  179. for you before they ship the system.  In our experience, ESDI  disks  generally
  180. need  to be formatted, IDE disk should never be formatted, and while SCSI disks
  181. can be formatted, this seems unnecessary.
  182.  
  183.   The documentation you got with your disk controller or machine  or  DOS  will
  184. tell  you  how  to format your disk.  The procedures vary widely and are beyond
  185. the scope of this discussion.  PLEASE DO NOT CALL US IF YOU ARE HAVING PROBLEMS
  186. WITH THIS STEP.
  187.  
  188.  
  189.  
  190. 4.2. Manual Pages
  191.   You should acquaint yourself with the attached manual pages for the programs:
  192. diskutil, fdisk, vtoc, badblocks and sup.
  193.  
  194.  
  195.  
  196. 4.3. Booting to Single User mode
  197.   In the guide  below,  we  presume  that  nothing  will  go  wrong.    In  our
  198. experience,  80%  -  90%  of the installations proceed smoothly, but there is a
  199. common set of pitfalls.  We annotate problem  areas  with  superscripts;  these
  200. numbers refer to comments in Appendix I.
  201.  
  202.   We  will  presume for the discussion below that you are performing a "simple"
  203. installation.  In particular, that you do not want to preserve part of the disk
  204. for  other  systems  (like  DOS,  MDOS, or OS/2), you do not have excessive bad
  205. blocks in inopportune places (where the system would put the bad  block  table)
  206. and  that  you  do  not  have to override the disk geometry parameters that are
  207. maintained internal to BIOS.  We will discuss all these matters in the  section
  208. DONT CLOBBER MY DISK.
  209.  
  210.   You  use  the  floppies  to  bring up Mach in "single user" mode.  Insert the
  211. "Mach Kernel" disk and reset (or power toggle) the machine.  The system  should
  212. soon print out
  213.                      1
  214.                 boot: 
  215. At  this  prompt,  you  either type a carriage return (or enter), or wait for a
  216. "timeout".  Then you will see a number printed out, a pause, a "+", etc.    The
  217. bootstrap is reading in the kernel.
  218.  
  219.   Shortly,  you will be instructed to "insert file system".  At this point, you
  220. remove the "Mach Kernel" disk and insert the "Mach file system" disk.  Once you
  221. have  switched floppies, you proceed with the boot process by typing a carriage
  222.                   2
  223. return (or enter)  .  Next, you will see several lines of  printout;  the  Mach
  224.                                                  3
  225. kernel  describes  the  hardware  that  it finds  .  Then you will see a lot of
  226. activity on the floppy as fsck is run.  And  finally,  you  will  get  the  "#"
  227. prompt,  indicating  that  you are executing at "single user" level and may now
  228. type commands.  You might want to do an
  229.                 ls -R
  230. at this point and play with the system a bit.    Note:  operating/loading  from
  231. floppies is rather slow and not indicative of the true system performance.
  232.  
  233.  
  234.  
  235. 4.4. Disk Types
  236.   The  kernel  prints  out  many lines of hardware description.  If you have an
  237. IDE/ESDI/ST506 disk subsystem, or a SCSI subsystem emulating  IDE,  you  should
  238. see:
  239.         hdc0: port = 1f0, spl = 5, pic = 14.
  240.         hd0:  stat = 104, spl = 5, pic = 14. (controller 0, slave 0)
  241. and maybe a line for one more slave
  242.         hd1:  stat = 118, spl = 5, pic = 14. (controller 0, slave 1)
  243. And if you have a SCSI disk subsystem, you may see:
  244.         ahac0:port = 300, spl = 5, pic = 11.
  245.         aha0: stat = 104, spl = 5, pic = 11. (controller 0, slave 0)
  246. and maybe lines for several additional slaves
  247.         aha1: stat = 118, spl = 5, pic = 11. (controller 0, slave 1)
  248.  
  249.   You might even have both types of disk.
  250.  
  251.   Many SCSI controllers, such as those on PS/2's, make SCSI disks appear to the
  252. kernel as IDE disks. In this case, your SCSI disk will appear to the kernel  as
  253. hd0  rather  than  aha0. If your SCSI disk is called hd0, you must follow these
  254. instructions as if it were an IDE disk.  Mach on the PS/2's supports SCSI, only
  255. through  this  IDE  interface, when the disk controller makes this possible. On
  256. non-PS/2's, the kernel may support SCSI directly.
  257.  
  258.   Several of the installation procedures in the rest of this document  need  to
  259. have  the  disk  device  indicated.    For  all of these instances, we supply a
  260. "magic" argument {**D*I*S*K**}.  If  you  have  one  IDE/ESDI  disk,  you  type
  261. nothing whenever {**D*I*S*K**} is indicated.  The default is /dev/rhd0c. If you
  262. want to install  on  the  second  IDE/ESDI  drive,  you  must  manually  supply
  263. /dev/rhd1c  for  {**D*I*S*K**}.    Finally,  if  you  have a SCSI disk, you use
  264. /dev/rsd0c in place of {**D*I*S*K**}.  For those with only one  SCSI  disk  and
  265. who  are  generally  lucky,  you  might  just  "rm"  /dev/rhd0c  and link it to
  266. /dev/rsd0c.  I do this.
  267.  
  268.  
  269.  
  270. 4.5. Initializing your Disk
  271.   Now you use the Mach procedures on the installation floppy to initialize your
  272. hard disk.
  273. type
  274.                 diskutil clobber_my_disk {**D*I*S*K**}
  275. This  initializes  a  disk for use under Mach.  It will destroy all/any data on
  276. the disk.  If you do not wish to trash all the data  on  your  disk,  read  the
  277. section  "DONT  CLOBBER MY DISK".  On most disks, this procedure takes about 15
  278. minutes per 100Meg.  On an ST506 disk, it is much longer.  Note: IDE/SCSI disks
  279. do not typically report bad blocks; these are handled in the controller.  Note:
  280. when this operation completes you do not have file systems; you  must  run  the
  281. setup program (below).
  282.  
  283. 5. Installation and System Setup
  284.  
  285.  
  286.  
  287. 5.1. Supping files
  288.   Installing  Mach  is a simple cook book process.  You follow the recipe below
  289. to bootstrap over the internet.
  290.  
  291.    1. Using ed, edit /PORTFILE and set the crypt= value to  be  the  CRYPT
  292.                   4
  293.       you told CMU .  /PORTFILE is a sup control file.
  294.  
  295.    2. If  you  have a SCSI disk, you must edit the /bin/setup program used
  296.       below.  Using ed, edit /bin/setup and search for
  297.                               disk=hd0
  298.       and change it to
  299.                               disk=sd0
  300.       You are done editing.
  301.  
  302.    3. type
  303.                       setup
  304.       Called with NO arguments "setup" creates a "root"  file  system  and
  305.       mounts  it  under  /mnt.    It  then creates a "usr" file system and
  306.       mounts   it   under   /mnt/RFS/.LOCALROOT/usr.       The    pathname
  307.       RFS/.LOCALROOT is explained further in the section "Root, Super-root
  308.       and RFS".
  309.  
  310.    4. type
  311.               setup <machine name> <internet address> [<internet gateway>]
  312.       Now you should be on the network.  You might try  to  telnet  by  IP
  313.       address somewhere, to verify that your network connection is active.
  314.       The <internet gateway> is necessary for your machine/site to find  a
  315.       path to CMU; it is not necessary at CMU.
  316.  
  317.    5. type
  318.                       setup sup
  319.                                                         4,5
  320.       This  invokes  sup  on the control file /PORTFILE    .  Your machine
  321.       will  be  requesting  from  CMU  all  the  binaries  for  the   i386
  322.       distribution.    On  our  local ethernet, this takes about 1/2 hour;
  323.       over the internet, we have seen times in the 2 to 3 hour range.   If
  324.       there are failures, just restart this step by
  325.       retyping
  326.                                6
  327.                       setup sup 
  328.       Repeat  this  until  everything completes.  The sup protocol records
  329.       what it has successfully  transferred  from  previous  attempts  and
  330.       transfers  any  files  still  required.    When sup has successfully
  331.       completed  the   /mnt/RFS/.LOCALROOT   and   /mnt/RFS/.LOCALROOT/usr
  332.       partitions  on  the  hard disk will be populated with all the system
  333.       binaries and there will be the following  three  directories  first,
  334.       bin.root,  and  bin.usr in /mnt/RFS/.LOCALROOT/sup. If you are using
  335.       Mach 3.0 boot disks, you'll also have a bin.mach3 directory.    Each
  336.       of  these  directories  contains  two sup client side control files:
  337.       last which contains a list of all the files  that  were  transferred
  338.       and when which contains the time at which the sup was completed.
  339.  
  340.    6. Before booting from your hard disk,
  341.               cd /mnt/RFS/.LOCALROOT/etc
  342.       and  edit  the  file  netstart (use ed as the editor).  Fill in your
  343.       machine name, ip address and gateway in the appropriate places.  You
  344.       also  should verify that your machine name and ip address are in the
  345.       file, hosts.
  346.  
  347.       fstab is setup for an EDSI/IDE disk.   Copy  fstab.scsi  on  top  of
  348.       fstab, if you are using a SCSI disk.
  349.  
  350.    7. Now it is time to reboot off the hard disk.
  351.       type
  352.                       reboot
  353.       After  you  get  the  message "syncing disks ...", remove the floppy
  354.       disk or you will attempt to boot off the floppy  again  --  not  the
  355.       hard disk.
  356.  
  357.    8. Note that the template /etc/passwd file allows root to login with no
  358.       password.  This is so that you will be able to  add  yourself  as  a
  359.       user  and change the root password after you boot off the hard disk.
  360.       YOU SHOULD NOT LEAVE THE ROOT WITHOUT A PASSWORD AFTER YOU HAVE  SET
  361.       UP YOUR MACHINE.
  362.  
  363.       The  login prompt prints a banner indicating that the system is Mach
  364.       2.5. This string is defined  in  /etc/gettytab,  and  isn't  changed
  365.       automatically even if you are in fact running Mach 3.0.
  366.  
  367.    9. When you reboot, you must create the file system space allocated for
  368.       the user data.  If your disk is less than 150Meg,  the  d  partition
  369.       will fill the disk and you are expected to use this space for system
  370.       files and your personal files.  In this case, you  should  skip  the
  371.       next paragraphs.
  372.  
  373.       Otherwise,  if  you  are happy with using the remainder of your disk
  374.       for a single Mach/Unix file system, type
  375.               eval `vtoc -m e {**D*I*S*K**}` 4096 512
  376.       vtoc -m will type to stdout the beginning of a mkfs line  to  create
  377.       your  "e" partition.  You may now mount the "e" partition.  You will
  378.       probably want /etc/fstab to always mount it.  There is  a  prototype
  379.       line  in  the  distributed  /etc/fstab  that will mount /dev/hd0e on
  380.       /usr1; change the xx to rw.  On Mach 2.5  systems,  this  line  will
  381.       also  arrange for the swap file to be on /dev/rhd0e, which we assume
  382.       is a lot bigger that /dev/rhd0d.  (For SCSI, you will find /dev/sd0e
  383.       instead  of  /dev/hd0e.)   You will also note that in the /etc/fstab
  384.       file there are two lines for  /dev/hd0d.    The  first  line  has  a
  385.       trailer  that  indicates  that  a  swap  file  should  be  set up on
  386.       /dev/hd0d.  You need to cancel this  line  (change  rw  to  xx)  and
  387.       enable the next line (change xx to rw).  This moves the swap file to
  388.       /dev/hd0e. These comments on paging apply only to  Mach  2.5.    For
  389.       information  on  paging  under  Mach  3.0,  see the section entitled
  390.       Paging under Mach 3.0.
  391.  
  392.       If you do not  want  to  organize  the  rest  of  the  disk  as  one
  393.       partition, read the vtoc manual page.  A very prudent thing to do at
  394.       this time, would be to run the programs fdisk, vtoc, and  badblocks.
  395.       These  will  print  out the various disk "labels".  You want to save
  396.       the data ON PAPER.  If something catastrophic ever happens you  will
  397.       be able to reconstruct what your disk looked like.
  398.  
  399.   10. The  floppy  devices  may  be  wrong  for  the type of drive on your
  400.       machine.  They are setup for 5 1/4" floppies  via  the  installation
  401.       process.  You make the devices for the 3 1/2" floppy by
  402.       typing
  403.                       cd /dev
  404.                       rm -f *floppy *fd0
  405.                       ./MAKEDEV f30
  406.       or for the 5 1/4" floppy by
  407.       typing
  408.                       cd /dev
  409.                       rm -f *floppy *fd0
  410.                       ./MAKEDEV f50
  411.       MAKEDEV  f31 or MAKEDEV f51 can be used to make devices for a second
  412.       disk drive. It will be known by the names fd1 and rfd1.
  413.  
  414.   11. Edit all the site dependent BSD files below.  You should look at the
  415.       BSD installation manual for exact details.
  416.          - /etc/hosts
  417.          - /etc/rfsd-hosts  -  a  CMU  file  that lists all hosts that are
  418.            allowed rfs access
  419.          - /etc/motd
  420.          - /etc/termcap
  421.          - /etc/namedb
  422.          - /etc/sendmail.{cf,fc}
  423.          - /etc/passwd
  424.          - /etc/group
  425.          - /etc/printcap - if you have printers
  426.          - /etc/nmbroadcast - contains one line with the  local  broadcast
  427.            ip address
  428.  
  429.   12. Once  the  installation  is completed to this point, there are still
  430.       some more files that you might like to get.
  431.  
  432.       In /sup on your machine, there is a control file SUPFILE  that  will
  433.       allow you to upgrade your binaries to latest version from CMU.  Copy
  434.       the file to MYSUPFILE and edit in your CRYPT.  You will notice  that
  435.       there are several commented out lines at the bottom of the file that
  436.       you might want to enable.
  437.          - The optional collection "bin.all", gets  you  4Meg  -  6Meg  of
  438.            files   that   are   seldom   used,   like  /usr/lib/learn  and
  439.            /usr/lib/*_p.a.  If you are concerned  about  disk  space,  you
  440.            probably do not want this collection.
  441.          - Two  more  collections  are for B&W X11R4; if you want X11R4 on
  442.            your machine, delete the # from one of the lines.    The  X11R4
  443.            collection  gets  you all 20Meg of X binaries and fonts.  While
  444.            the X11R4small collection gets you a 2.3Meg subset of X;  which
  445.            is  enough  to  run xterm, xclock, and a window manager. At the
  446.            time of writing, we are working on solving  a  problem  on  IBM
  447.            PS/2's that causes the mouse not to respond.
  448.          - For Color X11R5, there are two choices:  bin.X11R5 is the whole
  449.            34Meg distribution.  The four sup  collections,  bin.X11R5base,
  450.            bin.X11R5+fonts,  bin.X11R5+inc, bin.X11R5+lib, will also bring
  451.            over the same stuff.    bin.X11R5base  is  the  "necessary  and
  452.            sufficient" 25Meg subset.  bin.X11R5+fonts are the 100dpi fonts
  453.            and the huge misc font files.  The  +inc  and  +lib  should  be
  454.            obvious. We do not yet support X11R5 on IBM PS/2's.
  455.          - bin.mach3  will  bring  over  binaries into /usr/mach3 that you
  456.            need when running Mach 3.0.    This  also  corresponds  to  the
  457.            mach3.release collection with release=i386. There are two lines
  458.            in SUPFILE corresponding to the bin.mach3 collection.
  459.          - You need to make sure the right line for you has no  #  as  the
  460.            first  character  and  the  other  one  begins  with a #. The #
  461.            character marks the rest of the line as a comment.    IBM  PS/2
  462.            users   should   uncomment   the  line  containing  the  string
  463.            release=ps2, while other users should use the other  line.  The
  464.            release=ps2 option specifies that you want PS/2 versions of the
  465.            kernel and server.
  466.          - mdos will bring over the sources for  the  MDOS  dos  emulation
  467.            package.
  468.  
  469.       After you have edited your sup control file, you run:
  470.               sup -dov MYSUPFILE
  471.       It will only take a few minutes to verify you are up to date; if you
  472.       need to bring over  a  few  changed  programs,  it  will  take  just
  473.       slightly longer.
  474.  
  475.       One  directory  that sup brings over, /usr/release, is worth noting.
  476.       In it there is a file NOTES, which tells you what has changed in the
  477.       current release; actually is an archive of all the change histories.
  478.       Also in the directory is mach-afs-nfs, which  is  a  binary  of  the
  479.       latest  released  Mach  2.5  kernel.    If you copy it into mach and
  480.       reboot, you will be running the latest distributed 2.5 kernel.
  481.  
  482.       The Mach 3.0 kernels are distributed in  the  bin.mach3  collection.
  483.       This  collection has releases for ISA bus kernels and a PS/2 release
  484.       for kernels that support the  microchannel  bus.  See  the  comments
  485.       above regarding the release=ps2 option.
  486.  
  487.   13. Instructions for Supping the sources can be found in Appendix III.
  488.  
  489.  
  490.  
  491. 5.2. Daemons
  492.   /etc/rc and /etc/rc.local will select the daemons you need for:
  493.    - NO network
  494.    - a network
  495.    - a 2.5 kernel
  496.    - a 3.0 kernel
  497.  
  498. To  determine  whether  to start the network daemons, we evaluate the predicate
  499. /bin/inet.  (For example, you might have a laptop that is not connected to  the
  500. network.)   If it returns FALSE, we presume there is NO network.  If it returns
  501. TRUE, there is.  A simple stratagem is to copy /bin/false to /bin/inet  if  you
  502. DO NOT want network services; copy /bin/true if you DO want them.
  503.  
  504.   To  determine  whether  the kernel is 3.0 Mach, we look for and then evaluate
  505. the predicate /usr/mach3/bin/mach3.  If it returns FALSE, we presume the kernel
  506. is  2.5 Mach.  If it returns TRUE, the kernel is 3.0 Mach.  Some of the daemons
  507. are different for each system; if you are curious look at /etc/rc.local.  NOTE:
  508. we assume that you have placed the "3.0 release subtree" in /usr/mach3.
  509.  
  510.  
  511.  
  512. 5.3. X11R4 and X11R5 and Mice
  513.  
  514.  
  515. 5.3.1. X11R5
  516.   X11R5  currently  is not supported on IBM PS/2's. If you're not using a PS/2,
  517. you probably want to use X11R5 with new SVGA cards and one  megabyte  of  video
  518. memory.    The  X11R5  SVGA  server  was  designed by Thomas Roell.  It has one
  519. critical requirement.  Your SVGA card must support at least 8 bits of color per
  520. pixel.    If  it  does not, the X11R5 server will not work.  You must then fall
  521. back to the X11R4 VGA server.
  522.  
  523.   The X11R5 binaries are the ones we use at CMU. Our support  organization  has
  524. chosen  to put X11R5 in /usr/misc/.X11, rather than the traditional /usr/X11 or
  525. /usr/X386.    This  means  when  you  sup  X11R5  it  will  be   installed   in
  526. /usr/misc/.X11 and you need to put /usr/misc/.X11 on your path.
  527.  
  528.   Now for the hard part.  Read:
  529.    - /usr/misc/.X11/lib/etc/README,
  530.    - /usr/misc/.X11/lib/etc/README.mach
  531.  
  532. and  whatever  else you can find about the X11R5 SVGA server.  One of the truly
  533. hard/magical parts of the server is coming up with a Xconfig file  to  describe
  534. your  monitor/svga card.  The X11R5 documentation describes the process in gory
  535. detail, at least twice.  In /usr/misc/.X11/lib, you will find some Xconfig's  I
  536. have played with:
  537.         XconfigGWa{,3} for the Diamond Speed Star and Crystal Scan 1024NI
  538.         XconfigGWb{,3} for the Diamond Speed Star and NEC 4FG
  539.         XconfigINa{,3} for the Cardinal 700 with NEC 4FG
  540.         Xconfig256k{,3}for generic cards with 256k of memory.
  541. The  "3"  suffix is used if you have a 3 button mouse. Lastly, if you specify a
  542. fixed chipset and clock like these configurations do, I believe that  any  mach
  543. kernel  will  work.  BUT you should really be at X142F or MK76/UX36 if you want
  544. to have X11R5 svga card "probing" work.
  545.  
  546.  
  547. 5.3.2. X11R4
  548.   X11R4 provides black and white video at 640 by 480 resolution.  It is still a
  549. reasonable  choice  for  laptops  because  laptops  typically do not have color
  550. displays and have only  3-6  bits  of  grey  per  pixel.    Also,  there  is  a
  551. bin.X11R4small  collection,  that  encapsulates  the  "necessary" 2.3 Meg X11R4
  552. files to conserve disk space which is still a premium on a laptop.
  553.  
  554.  
  555. 5.3.3. Mice
  556.   Mach supports three kinds of external mice, the logitech three button  mouse,
  557. the  microsoft two button mouse, and the PS2 mouse.  We do not support any kind
  558. of bus mouse.  The way you indicate the mouse  type  and  com  port  is  a  bit
  559. magical;  you  set  the  mouse device minor.  The value you set the minor to is
  560. computed by the formula:
  561.         <type> * 8 + <com port>
  562. <com port> is 0, or 1 or ... depending on which com port you  plug  your  mouse
  563. into.  (Some architectures prefer to make com0 the modem line.)
  564. <type> is:
  565.         0       for logitech mouse
  566.         1       for microsoft mouse
  567.         2       for ps2 mouse
  568.         3       for no real mouse at all
  569. We  have implemented a neat hack for small notebooks so that they don't have to
  570. be saddled with a HUGE mouse.  Scroll lock toggles a mode wherein "seldom  used
  571. 'function keys'" are used to represent mouse actions.  F1, F2, F3 are the left,
  572. middle, and right mouse button.  The first key stroke represents a  down  click
  573. and  the  second  key stroke represents an up click for the mouse button.  Then
  574. the up down, right, left, arrow keys actually move the mouse.  And if you  have
  575. a  standard  pad  with  home,  pageup,  end, and pagedown filling in the square
  576. around the up, down, right, and left arrow keys then  the  former  set  do  the
  577. obvious and move the mouse along the diagonals.
  578.  
  579.  
  580.  
  581. 5.4. The Environment
  582.   Mach  2.5 I386 has the same kernel features as the Mach 2.5 for all the other
  583. supported  platforms.    The  software  environment  starts  with  4.3BSD-TAHOE
  584. environment,  with  one  major exception.  The Mach 2.5 kernel does not support
  585. BSD file system labels; so most file system tools are CMU  tools  derived  from
  586. 4.3BSD.
  587.  
  588.   You are also provided with all the Mach programs, include files and libraries
  589. and the CMUCS library and some programs (most notably rfs and sup).    However,
  590. these  files  are not in the /usr/mach tree or /usr/cs tree as is the case with
  591. Mach on other hardware, but are integrated into the BSD tree.
  592.  
  593.   The compile environment/tools, i.e., cc, as, ld, size, nm, strip, ar, and gdb
  594. all come from the GNU products of the Free Software Foundation (FSF).  There is
  595. one exception, cpp; we use a CMU modified 4.3BSD cpp.  All of the  program  and
  596. library  sources  have been compiled without using the "traditional" switch and
  597. only a few programs needed "writable-strings".  You should  be  aware  of  what
  598. these  two  features  do;  see  the  gcc  manual  page.    You may need them to
  599. successfully port your applications.
  600.  
  601.   Finally, one feature about  the  load/execution  function  should  be  noted.
  602. Program  text starts at 0x10000 (64K).  This means that you can not dereference
  603. a pointer to 0 or any small integer value.  This will cause  programs  to  core
  604. dump  that  were  "accidentally"  working on other architectures.  Only a small
  605. number of 4.3BSD-TAHOE programs that had to be fixed to deal with this.  (SunOS
  606. and Mach on the Sun Architecture machines have a similar restriction.)
  607.  
  608.  
  609.  
  610. 5.5. BSD4.3-TAHOE Source Compilation
  611.   Since  the  system  sources,  /usr/src,  are  basically 4.3BSD-TAHOE, the BSD
  612. standard compilation procedures applies.  The typical way to build a program is
  613. to  go  to  the  appropriate directory and type make.  You install it by typing
  614. make install.  Note:  If  the  program  <foo>.cmucs  exists,  it  was  used  in
  615. preference  to  the  original  BSD  program  <foo>.    Also,  the compile tools
  616. mentioned above, should be taken from /usr/src/gnu; the BSD  version  has  been
  617. left for reference purposes.
  618.  
  619.  
  620.  
  621. 5.6. Building Kernels
  622.   This  section  tells  you how to build Mach 2.5 kernels. Different procedures
  623. apply to Mach 3.0. See the appropriate documents.
  624.  
  625.   First, you must decide what kernel to build.   The  mach.sys  sup  collection
  626. retrieves  a rather old Mach 2.5 kernel.  This corresponds to the functionality
  627. in the official Mach 2.5 release.  The mach.mainline (and mach.nfs) collections
  628. retrieve essentially what is actively used at CMU today.
  629.  
  630.   To build a new kernel, go to the kernel source tree.  Then type
  631.                 make CONFIG=STD+WS-afs-nfs doconf config
  632. This  will  create a directory, STD+WS-afs-nfs.  You can go into this directory
  633. and type ./make.  This will initiate a standard BSD style kernel build.
  634.  
  635.  
  636.  
  637. 5.7. Installing/Booting Kernels
  638.   This section applies to Mach 2.5 only. Different  procedures  apply  to  Mach
  639. 3.0. See the appropriate documents.
  640.  
  641.   The  kernel  that  you  have  built  should be placed on the root of the file
  642. system.  Give it some name other than /mach [or /vmunix], initially, so you can
  643. fall back to the old kernel if necessary.  To invoke your kernel
  644. type
  645.                 /etc/reboot
  646. The old kernel will shutdown, then the hardware performs self test, and lastly,
  647. you are prompted for a kernel to boot.  The system types out:
  648.         boot:
  649. If you type nothing, mach is booted. (If you type carriage return  (or  enter),
  650. mach  is  also  booted.)  You may type a file name of a kernel to boot.  If you
  651. had put your kernel in the file /mach.new, you would type
  652.                 /RFS/.LOCALROOT/mach.new
  653. to boot this kernel.  Note: From the section on Root, Super-root and  RFS,  you
  654. should  understand  why the /RFS/.LOCALROOT is necessary.  Aside:  you may also
  655. supply flags on the boot line, above.
  656.    - -a causes the kernel to ask for the file system root partition.
  657.    - -s causes the system to boot "single user".
  658.    - -d causes symbols for the debugger to be loaded.
  659.  
  660. Once you are happy with your kernel, you want to install it as /mach.  The  old
  661. /mach has a link count of three; the three files /mach, /vmunix and /../../mach
  662. have to be linked together.  You  also  want  to  save  the  old  kernel.    My
  663. preference for doing this is to:
  664.                 cp -p /mach /mach.old
  665.                 cp -p /mach.new /mach
  666. This  way  after  you  set  up the links once and never worry about them again.
  667. Alternatively, you might
  668.                 rm -f /mach.old  /../../mach.old /../../vmunix.old
  669.  
  670.                 mv /mach /mach.old
  671.                 mv /vmunix /vmunix.old
  672.                 mv /../../mach /../../mach.old
  673.  
  674.                 mv /mach.new /mach
  675.                 ln /mach /vmunix
  676.                 ln /mach /../..
  677.  
  678.  
  679.  
  680. 5.8. Root, Super-Root and RFS
  681.   Since 1982, CMUCS kernels have had a facility that lets you access files  and
  682. devices  on  other  machines.    We call this the remote file system, RFS.  The
  683. client side exists in every Mach kernel; the server is  a  privileged  program,
  684. rfsd,  that  is run on each machine that will permit access to its local files.
  685. We have even ported the server to non-Mach operating systems.
  686.  
  687.   RFS refers to remote files/devices in a location dependent way.   The  remote
  688. file  name  must  not look strange to Mach/Unix programs that parse file names.
  689. Thus, the generic name is
  690.                 /../<remote machine name>/<path on that machine>
  691. for example
  692.                 /../wb1/etc/passwd
  693.                 /../wb1/dev/rmt0
  694. What this implies is that in Mach, the root file system, "/", is not  inode  2.
  695. The  kernel automatically "chroots" (changes the root) to /RFS/.LOCALROOT as it
  696. boots.  Thus "/.." and "/../.." are well defined and not equal to "/".
  697.  
  698.   The local machine must have an "RFS link" to the remote machine.  To  make  a
  699. link in /.., type:
  700.                 cd /..
  701.  
  702.                 rfshost <IP ADDRESS> <host name> <host nic names>
  703. For example:
  704.                 rfshost 128.2.250.16 wb1.cs.cmu.edu wb1
  705. or even
  706.                 rfshost `grep wb1.cs.cmu.edu /etc/hosts`
  707. You  may create as many entries as you like and as many aliases as you like.  A
  708. special quoting mechanism is necessary to remove an RFS link.  If  you  are  in
  709. the directory containing the RFS link, link,
  710.                 rm .///<link>
  711. will remove the RFS link, link.
  712.  
  713.   By  default,  RFS  accesses  files on the server using the user id, rfsd, and
  714. group id, system.  However, the server must  be  told  that  your  machine  may
  715. access  its  files.    The  file /etc/rfsd-hosts, on the server, should contain
  716. single lines indicating the internet address of  machines  allowed  to  contact
  717. this machine.  (If you change the file, you must kill and restart rfsd.)
  718.  
  719.   You  can  also authenticate yourself to RFS, using the program, rfs. rfs will
  720. prompt you for a user, group, account, password,  and  "Identify?"    Give  the
  721. default  answer for account and "Identify".  After running rfs, you will have a
  722. shell that will allow you to access files on any remote  RFS  hosts  using  the
  723. specified  uid  and  group.    Note:  you  must  create  a local magic file for
  724. authentication to work.  You must type
  725.                 cd /..
  726.                 rfshost 0.0.0.0 CONTROL
  727.  
  728.  
  729.  
  730. 5.9. Paging under Mach 2.5
  731.   The Mach 2.5 kernel pages out to  the  file  named  pagingfile  on  the  disk
  732. partition specified in the /etc/fstab file.
  733.  
  734.  
  735.  
  736. 5.10. Paging under Mach 3.0
  737.   The  file  /mach_servers/paging_file  is  a  symbolic  link  to  a  file on a
  738. filesystem other than the root, which the kernel uses as  paging  space.    The
  739. kernel  interprets  the  destination of the link in a special way.  The default
  740. value is
  741.                 paging_file -> /dev/hd0d/paging_file
  742. The syntax /dev/hd0d/paging_file refers to the file paging_file on the root  of
  743. the  filesystem  on  /dev/hd0d. The size of this file is the size Mach will use
  744. for the paging area that the file refers to. The size  of  the  default  paging
  745. file is 12 megabytes.
  746.  
  747.   You  may  want to move the paging file to your partition on /dev/hd0e.  To do
  748. this you must follow four  steps:  create  the  new  file,  make  the  link  in
  749. /mach_servers  point  to  the  new paging file, reboot your system, and finally
  750. remove the original paging file. The following sequence of steps will create  a
  751. 20  megabyte  paging  file  on  /dev/hd0e and remove the default paging file on
  752. /dev/hd0d. The example assumes that /dev/hd0e is mounted on /usr1 and /dev/hd0d
  753. is mounted on /usr.
  754.                 cd /mach_servers
  755.                 dd if=/dev/rhd0c of=/usr1/paging_file bs=256k count=80
  756.                 chmod 600 /usr1/paging_file
  757.                 rm paging_file
  758.                 ln -s /dev/hd0e/paging_file
  759.                 reboot
  760.                 <when system reboots and you log in again in as root>
  761.                 rm /usr/paging_file
  762. Take care never to remove a paging file that the kernel is currently paging on.
  763. In the above example, we removed the link to the paging file; this is safe.  It
  764. would not have been safe to remove /usr/paging_file before rebooting.
  765.  
  766.  
  767.  
  768. 5.11. Changing Time Zones
  769.   As  distributed  the time zone is set to eastern standard time, i.e. EST5EDT.
  770. If you need to change time zones you will need to perform two tasks. First, you
  771. will need to re-link /etc/zoneinfo/localtime as follows:
  772.         login as root
  773.         cd  /etc/zoneinfo
  774.         rm  localtime
  775.         ln  xxx  localtime   (substitute appropriate timezone file for xxx)
  776.  
  777.   Second,  you  will need to patch time zone variable (i.e. _tz) in the kernel.
  778. Prior to doing this you will need to calculate the appropriate patch  value  in
  779. hex  of  the  difference  in  minutes  between  your  local  zone  time and GMT
  780. (universal time). The value of this constant for  eastern  standard  time,  for
  781. example  is  x12c  hex  (i.e.  300  decimal).  This  is the value that you will
  782. initially see for _tz. To change to Pacific Daylight Time, as an  example,  _tz
  783. should be patched to x1e0 hex (i.e. 480 decimal).
  784.  
  785.  
  786.  
  787. 5.12. The Kernel Debugger
  788.   Mach 2.5 has a version of "adb" in the kernel.  The key sequence "control-alt
  789. d" will enter the kernel debugger.  As you would expect, ":c"  gets  you  back.
  790. Once  in  the  kernel debugger, you are on your own.  You might look at the BSD
  791. documentation on adb and kdb for a list of the commands.  A laconic description
  792. of  the debugger may be found in Appendix V. Symbols have to be loaded with the
  793. kernel, for kdb to be able to use them.   If  the  kernel  file  is  executable
  794. (determined  by  the file's permission bits), the boot program always loads the
  795. symbols.  The boot line flag, -d, will force symbols to be loaded.
  796.  
  797. 6. Replicating The System
  798.   NOTE:  If you have one or two local machines, we will allow  you  to  upgrade
  799. them  directly  from  CMU.    But  if  you have a larger site, you must take an
  800. approach described in this section.
  801.  
  802.  
  803.  
  804. 6.1. Cloning
  805.   The easiest way to mass produce systems  is  to  set  up  one  machine  as  a
  806. "cloning"  machine.  Below, we assume you are cloning onto your second ESDI/IDE
  807. drive, /dev/rhd1c.  If you are using  SCSI,  you  would  substitute  /dev/rsd1c
  808. wherever  /dev/rhd1c  is  specified.    (And you would use /boot.sd rather than
  809. /boot.hd.)
  810.  
  811.   The recipe follows:
  812.    - bring your disk over to cloning machine
  813.    - low level format the new disk
  814.    - run "clobber_my_disk"  on  the  new  disk  (diskutil  clobber_my_disk
  815.      /dev/rhd1c)
  816.    - fill the disk:
  817.         * eval `vtoc -m a /dev/rhd1c` 4096 512
  818.         * fsck /dev/rhd1a
  819.         * mount /dev/hd1a /mnt
  820.         * mkdir /mnt/RFS
  821.         * mkdir /mnt/RFS/.LOCALROOT
  822.         * mkdir /mnt/RFS/.LOCALROOT/usr
  823.         * eval `vtoc -m d /dev/rhd1c ` 4096 512
  824.         * fsck /dev/rhd1d
  825.         * mount /dev/hd1d /mnt/RFS/.LOCALROOT/usr
  826.    - copy everything you need from the cloning disk to the new disk.
  827.    - plug your disk back into your own machine
  828.  
  829. Clearly,  you do not have to mount both file systems at the same time.  What is
  830. critical is that you perform the vtoc  commands  and  that  on  the  root  file
  831. system,  you  create RFS/.LOCALROOT and change directory there before you begin
  832. copying data.
  833.  
  834.   You may use any procedure that works under BSD to copy the cloning disk.  You
  835. could "dump|restore" root and usr from the one disk to the new disk.  You could
  836. "tar crf|tar xf".  You could load via a streamer into the  new  disk.    Follow
  837. whichever procedure you are most comfortable with.
  838.  
  839.   These procedures do not install a boot block on the disk.  To do this type:
  840.         dd if=/boot.hd of=/dev/rhd1c bs=b
  841. This will copy an image of the boot program, which is stored in /boot.hd to the
  842. boot area on the new disk.  It occupies roughly 9 sectors.
  843.  
  844.  
  845.  
  846. 6.2. Using Sup
  847.   You might want to set up a sup repository at your site that is upgraded  from
  848. CMU  on  a  regular  basis.   You would then add site dependent information and
  849. local improvements to this base.  Then local machines would sup from this local
  850. repository/server.    The  information in the /usr/mach/public/sup directory on
  851. mach.cs.cmu.edu provides an example of how to set up your local site; refer  to
  852. the  section  Sup'ing  Sources.    We  advocate  sup  because  it allows you to
  853. propagate to each machine at your site only the changes in the repository  that
  854. have  happened  since  the  machine  last was upgraded by sup.  This allows ALL
  855. machines to keep current with  a  minimum  overhead.    sup  does  all  of  the
  856. bookkeeping.
  857.  
  858.  
  859.  
  860. 6.3. Floppies
  861.   The  Mach 2.5 kernel sources have the tools to produce more 3 1/2" and 5 1/4"
  862. floppies.  Two scripts are in the standi386at/binaries directory.    MKfs  will
  863. make  the  file  system floppy, and MKkernel will make the kernel floppy.  Both
  864. take a single argument of "3h" or "5h" which specifies the  floppy  size  as  3
  865. 1/2"  or  5  1/4", respectively.  You must run these commands as "root" and the
  866. floppies must have been previously formatted.
  867.  
  868.   You can make Mach 3.0 boot floppies using the scripts MK3fs and MK3kernel.
  869.  
  870. 7. DONT CLOBBER MY DISK
  871.  
  872.  
  873.  
  874. 7.1. Minor Variations
  875.   Three simple cases of disk setup arise that can still be handled by
  876.                       diskutil clobber_my_disk {**D*I*S*K**}.
  877. In the first case, you might need/want to override what BIOS believes the  disk
  878. geometry  to  be.    BIOS allows only 10 bits of cylinder numbers.  If you have
  879. more, either you can not use them, or you have to lie to BIOS about the  number
  880. of  sectors  per  track  and  number  of  heads so that the "virtual" number of
  881. cylinders falls under 1024.   If  you  specify  the  "-p"  option  to  diskutil
  882. clobber_my_disk,  it  will  interactively  prompt  you  for  the  true geometry
  883. information.
  884.  
  885.   In the second case, you have bad blocks in what would be the bad block  area.
  886. diskutil  clobber_my_disk will abort very early on.  You fix this by moving the
  887. start of the "Mach (BIOS) partition"  forward  (see  section  The  Disk  Layout
  888. below).  You type:
  889.         diskutil clobber_my_disk -o <offset in sectors> {**D*I*S*K**}
  890. The  Mach (BIOS) partition will start at <offset in sectors> on the disk.  This
  891. quantity should be an integral number of cylinders.    NOTE:  You  specify  the
  892. number in SECTORS.
  893.  
  894.   In  the  last  case,  you  might have a stupid low level format program which
  895. marks all the sectors  of  a  track  bad  if  any  sector  is  bad.    diskutil
  896. clobber_my_disk  has  a heuristic; it looks for several sector errors before it
  897. labels the track as bad.  This will cause a lot of  needless  rattling  of  the
  898. disk  (error  retries  and  recalibration),  before  the track is marked bad by
  899. diskutil clobber_my_disk.  The "-t" option  to  diskutil  clobber_by_disk  (and
  900. badblocks)  will cause the program to mark the entire track bad if there is one
  901. bad sector.
  902.  
  903.   Lastly, you can combine any or all of the options described above.
  904.  
  905.  
  906.  
  907. 7.2. Room Enough for DOS or MDOS
  908.   If you are starting out with an empty disk and want to leave room for  a  DOS
  909. partition at the front of the disk, there is a very easy way to do this.  Use
  910.         diskutil clobber_my_disk -o <offset in sectors> {**D*I*S*K**}
  911. as  noted in the previous section and specify the number of sectors you want to
  912. leave for the DOS partition.  (This should be a integral number of cylinders.)
  913.  
  914.   Next, you boot up DOS from a floppy and run DOS's fdisk to create  a  primary
  915. DOS  partition  that  uses ONLY the initial cylinders of the disk that you have
  916. set aside.  Then you run DOS format to format the DOS c  drive.    Lastly,  you
  917. populate the c drive.  NOTE: in our experience, using fdisk from DOS 3.3 or DOS
  918. 5.0, it is very easy to allocate the right number of cylinders.  DOS 4.1  fdisk
  919. is harder to use for this purpose.
  920.  
  921.   MDOS  (the  Mach  DOS  emulation  server)  does  not  actually  require a DOS
  922. partition to run. It will  read  DOS  application  programs  out  of  the  Unix
  923. partitions.  But  is is easier to load software from DOS floppies to a real DOS
  924. partition than to a Unix partition. If you think that you  might  want  to  run
  925. MDOS  eventually,  you  should look at the mdos_info document now and decide if
  926. you want to leave room for a DOS partition.
  927.  
  928.   If DOS partitions are already on the disk, the next section will explain what
  929. you need to do.
  930.  
  931.  
  932.  
  933. 7.3. The Disk Layout
  934.   At the start of the disk (sector 0), there is a BIOS boot block that has code
  935. and a partition table.  (NOTE: BIOS calls this table a partition table.    Unix
  936. refers to regions of the disk that are separate file systems as partitions.  To
  937. try to avoid the obvious confusion, we call to the former a "(BIOS) partition",
  938. and  the latter a partition.)  The (BIOS) partition table has four entries; one
  939. is designated as "active".  The boot process finds  the  active  partition  and
  940. invokes  it.    This table makes it possible to divide the disk up into several
  941. disjoint areas.  Thus Mach and DOS can both coexist on the same disk.
  942.  
  943.   The "Mach (BIOS) partition" begins with a boot program that can occupy up  to
  944. 29  sectors.    This  is  followed  by  one  sector for a vtoc (volume table of
  945. contents).  The vtoc specifies the override disk geometry and then divides  the
  946. "Mach  (BIOS)  partition"  into  the standard Mach/Unix file system partitions.
  947. The vtoc is followed by four sectors that record bad blocks  and  a  number  of
  948. sectors  that  are  used  as  bad  block  replacements.    At the next cylinder
  949. boundary, the first Mach partition begins; this is typically the "root".
  950.  
  951.   All the structures described above need to be initialized for Mach to be able
  952. to  use the disk.  The programs, fdisk, vtoc, and badblocks, edit the necessary
  953. structures.  They will let you edit every field in every structure.    We  will
  954. not describe them in detail; see the manual pages for more information.
  955.  
  956.   We also provide a simpler interface:
  957.                 diskutil clobber_my_disk {**D*I*S*K**}
  958. This  initializes  the  structures  to  use  the  whole  disk  for Mach.  It is
  959. equivalent to the following three commands:
  960.                 diskutil finit {**D*I*S*K**}
  961.                 badblocks -w {**D*I*S*K**}
  962.                 diskutil fs {**D*I*S*K**}
  963. The first step, diskutil finit, does a quick and basic  initialization  of  the
  964. structures  to  an  empty state.  Then, badblocks scans the disk for bad spots.
  965. Finally, diskutil fs puts the basic Mach partitions, "a" -  "e"  on  the  disk.
  966. (This uses the Mach default layout.)
  967.  
  968.   You  may replace diskutil finit with diskutil init.  This DOES NOT initialize
  969. the sector 0 disk layout information.  You MUST use fdisk  to  pick  a  "(BIOS)
  970. partition"  for  Mach,  before you run this alternate sequence.  You should put
  971. the sector start  address  for  the  "Mach  (BIOS)  partition"  on  a  cylinder
  972. boundary.    You  follow this method, if the disk already has (BIOS) partitions
  973. that you need to preserve.
  974.  
  975. 8. Known Features/Problems/Bugs
  976.  
  977.  
  978.  
  979. 8.1. gas
  980.   To be compatible  with  the  AT&T  assembler,  the  gas  assembler  has  been
  981. generated  to  accept  "#"  and "/" as comment characters.  This means that, at
  982. present, there is no way to indicate division in assembler expressions.
  983.  
  984. 9. Mach Feedback
  985.   We expect to get three kinds of feedback:
  986.    - Code
  987.    - Bug reports/fixes and suggestions for improvements
  988.    - General enquiries
  989.  
  990.  
  991.  
  992. 9.1. Reporting bugs/ General enquiries
  993.   The Mach Project may be contacted either by US Mail, e-mail or telephone.
  994.   US Mail Address
  995. Mach Project
  996. c/o Brian Bershad
  997. School of Computer Science
  998. Carnegie Mellon University
  999. Pittsburgh, PA 15213-3890
  1000. USA
  1001.   e-mail addresses
  1002. machi386@cs.cmu.edu
  1003. info-mach@cs.cmu.edu
  1004. info-mach-request@cs.cmu.edu
  1005. mach@cs.cmu.edu
  1006.  
  1007.   machi386 is a mail distribution list read by I386 users.  It should  be  used
  1008. to discuss problems unique to the I386 distribution or I386 hardware devices.
  1009.  
  1010.   info-mach  is  a mail distribution list consisting of the Mach developers and
  1011. Mach users. Bug reports, technical questions and suggestions on how to use Mach
  1012. features  should  be  sent  to this list. Also replies to questions raised here
  1013. should be cc'ed to this list.
  1014.  
  1015.   info-mach-request is used to accept requests to be  added  to  the  info-mach
  1016. mailing list.
  1017.  
  1018.   mach  is  read  by  the  Project  Manager  and  the Distribution Coordinator.
  1019. Problems pertaining to distribution problems should be sent here.
  1020.  
  1021.   Telephone
  1022. 412 268-8166 (Lori Iannamico - Distribution Coordinator)
  1023.  
  1024.   The telephone number should only be used when absolutely necessary  and  then
  1025. only  to  leave  a  message.  PLEASE KEEP IN MIND THAT WE DO NOT HAVE A SUPPORT
  1026. STAFF AND SO CANNOT PROVIDE MORE THAN MINIMAL HELP WITH PROBLEMS.
  1027.  
  1028.  
  1029.  
  1030. 9.2. Returning code to CMU
  1031.   We encourage you to send back to us any code which may  improve  the  system.
  1032. You  should  make your changes under specific compilation switches; all changes
  1033. (even bug fixes) should leave the original code intact such  that  turning  off
  1034. the  appropriate  option  will  return  the  code  to  its  original state.  By
  1035. following these conventions we will be able to more  quickly  incorporate  your
  1036. modifications.  Code should be returned to mach@cs.cmu.edu.
  1037. I. Trouble Shooting the Installation
  1038.  
  1039.    1. One  BIOS never gets this far.  We would suggest that you get either
  1040.       an AMI or PHOENIX BIOS as a replacement. (We believe  that  the  new
  1041.       boot.fd  code  of  Mar  1,  1991 has solved this problem. If you are
  1042.       still seeing it, please contact us at mach@cs.cmu.edu)
  1043.  
  1044.    2. Occasionally, people type an extra carriage return which is  gobbled
  1045.       down  and you are not given an opportunity to put in the file system
  1046.       disk.    The  kernel  will  panic  shortly  and  you  will  have  an
  1047.       opportunity to try again.  You must use both disks to load Mach.
  1048.  
  1049.    3. It  is  very  important  that  one  line in the hardware description
  1050.       contains your ethernet hardware address.  If you do not see  such  a
  1051.       line,  then  the  kernel  has  not  recognized  your ethernet board.
  1052.       Either the board is unacceptable or the jumper settings  are  wrong.
  1053.       Refer to Appendix II to get the appropriate jumper settings.
  1054.  
  1055.    4. Be  careful  not to delete the prefix=/usr at the end of the bin.usr
  1056.       line in PORTFILE. If you do, sup will try to load all the  files  in
  1057.       the  bin.usr collection on to the root partition and will run out of
  1058.       space.
  1059.  
  1060.    5. If you get an access error back from sup, we might not have put your
  1061.       site/machine into our authentication table yet.  More likely is that
  1062.       your installation's name server  does  not  respond  when  our  site
  1063.       queries  it, asking it to translate your machine's IP address to its
  1064.       name.  Please send a copy of the supfile command  and  command  line
  1065.       that  you  are  using  and  the  transcript  of  the  sup session to
  1066.       mach@cs.cmu.edu.
  1067.  
  1068.    6. sup has a very long timeout.  It takes minutes  for  it  to  realize
  1069.       that a connection has closed.  If you are connecting to us from some
  1070.       far away place, you might want to run sup  or  "setup  sup"  in  the
  1071.       background.    You  NEVER want to power cycle the machine; since you
  1072.       are in the process of loading your machine, it is VERY  likely  that
  1073.       the  buffer pool has not been flushed to disk and you will see a lot
  1074.       of inconsistencies when you next fsck
  1075.  
  1076.  
  1077.  
  1078. I.1. A Few More Anomalies
  1079.  
  1080.    - If you can not low level format your disk, talk to  the  manufacturer
  1081.      or sales office.  This is a routine "BIOS/DOS" procedure.  We can not
  1082.      help you.
  1083.  
  1084.    - If you personally installed a 80387, make sure  that  there  are  not
  1085.      switches  to  change  or  a setup program, to run to tell the machine
  1086.      about the fpu.
  1087.  
  1088.    - Unless you are running X, Mach will use a "monochrome 80 x  25"  mode
  1089.      of  character display.  Some vga cards misbehave; you might be better
  1090.      off with a simple monochrome board if you have one.   Also,  be  sure
  1091.      you  have  initialized  your  vga  board  for  this mode; some boards
  1092.      require special setup.
  1093.  
  1094.    - Believe it or not, we have found at least one keyboard that does  not
  1095.      work  with  Mach  -- it does work with DOS.  What will happen is that
  1096.      after you get the single user prompt on the floppy boot, you will not
  1097.      be able to type.
  1098. II. ETHERNET
  1099.   In the presentation below, you will see that we prefer IRQ 9 for the ethernet
  1100. interrupt level.  On some 8 bit cards, there is no option for IRQ 9; you should
  1101. use  IRQ  2  instead  --  which just happens to map to IRQ 9 on a 16 bit AT BUS
  1102. machine.
  1103.  
  1104.  
  1105.  
  1106. II.1. WD8003 & Etherlink II & WD8003 Elite
  1107.   The first two of these boards  use  the  NS  8390  ethernet  chip;  they  are
  1108. programmed "basically" the same with a few localized differences to account for
  1109. the board logic.  The new SMC WD8003 Elite uses custom logic and  is  described
  1110. later.
  1111.  
  1112.  
  1113. II.1.1. EtherLink II
  1114.   This  board  has nicely labeled jumpers.  There are only two jumpers: one for
  1115. the memory address and one for the port.  You may use either 0xd8000 or 0xdc000
  1116. for  the  memory  address.    But  0xdc000  is  used  by the Adaptec 1542B SCSI
  1117. controller to map its ROM BIOS, so for SCSI configurations you should ONLY  use
  1118. 0xd8000.    The  thick/thin ether setting and IRQ are made by software.  We use
  1119. the port address to imply a setting of IRQ and thick vs thin ether.
  1120.                 PORT                    IRQ     ETHER TRANSCEIVER
  1121.                 0x280                   9       thin
  1122.                 0x2A0                   9       thick
  1123.                 0x2E0                   5       thin
  1124.                 0x300                   5       thick
  1125.  
  1126.  
  1127. II.1.2. WD8003 & WD8013
  1128.   We can accept:
  1129.                 port            irq             memory
  1130.                 0x280           9               0xd0000
  1131.                 0x2A0           9               0xd0000
  1132.                 0x2E0           5               0xd0000
  1133.                 0x300           5               0xd0000
  1134. The WD8013 is the 16 bit card.  It is very nicely laid out and all the  jumpers
  1135. are labeled.  Select a set of options consistent with the above table.
  1136.  
  1137.   For the WD8003, there are five sets of jumpers that must be set.  A schematic
  1138. of the board jumpers  is  shown  later  with  one  acceptable/preferred  jumper
  1139. arrangement.  NOTE: with the DELL 320SLT, you must use a setting with IRQ 5.
  1140.  
  1141.   W1:  Sets  the  Port  address.    We use 280 which is indicated in the figure
  1142. below.  If you interpret (jumper) shorts as 1 then the map of 16 possible  port
  1143. ranges is given below:  (The *'d ports are the ones we support.)
  1144. port            0x200   0x220   0x240   0x260
  1145. pattern         0xF     0x7     0xB     0x3
  1146.  
  1147. port            0x280*  0x2A0*  0x2C0   0x2E0*
  1148. pattern         0xD     0x5     0x9     0x1
  1149.  
  1150. port            0x300*  0x320   0x340   0x360
  1151. pattern         0xE     0x6     0xA     0x2
  1152.  
  1153. port            0x380   0x3A0   0x3C0   0x3E0
  1154. pattern         0xC     0x4     0x8     0x0
  1155.  
  1156.   The  jumper  labeled 2 in the W1 set, reduces the number of board wait states
  1157. from 4 to 2.
  1158.  
  1159.   W2: selects the IRQ level that the board is to use.  We use  IRQ2  that  gets
  1160. remapped to IRQ9 on ISA bus machines.  The possibilties are:
  1161.         jumper 11 -> IRQ2               jumper 9 -> IRQ3
  1162.         jumper  7 -> IRQ5               jumper 5 -> IRQ5
  1163.         jumper  3 -> IRQ6               jumper 1 -> IRQ7
  1164.  
  1165.   W3:  Is  shorted  for thin ether, otherwise all the jumpers are open.  w4: Is
  1166. open for thin ether, otherwise shorted.  w5: Is only meaningful for thin  ether
  1167. and we wanted it shorted.
  1168.  
  1169.   Below is a picture of the board and jumpers set up for thin ether.
  1170.  
  1171.                   W4
  1172.  
  1173.                                                                 E
  1174.                                                                 T
  1175.         2468a W1                _ W3                            H
  1176.          || |                   _                               E
  1177.                                 _                               R
  1178.                                 _
  1179.                                 _                               T
  1180.                                 _                               A
  1181.                                                                 P
  1182.                                                                 S
  1183.                                                 | W5
  1184.  
  1185.                 b97531 W2
  1186.                 |
  1187. II.1.3. WD8003 Elite
  1188.   This is a reworking of the WD8003.  It is necessary to read its documentation
  1189. and use the DOS setup utility that is provided with it.  Choose  a  port/memory
  1190. address that is compatible with the table below.
  1191.                 port            irq             memory
  1192.                 0x280           9               0xd0000
  1193.                 0x2A0           9               0xd0000
  1194.                 0x2E0           5               0xd0000
  1195.                 0x300           5               0xd0000
  1196.  
  1197.  
  1198.  
  1199. II.2. Etherlink I
  1200.   We can accept:
  1201.                 port            irq
  1202.                 0x300           2
  1203. A  schematic  of  the board jumpers is shown below with one acceptible/prefered
  1204. jumper arrangement.
  1205.                 I/O ADDR        MEM
  1206.                 4 5 6 7 8 9     EN
  1207.  
  1208.                 . . . . X X      X
  1209.                 X X X X X X      X
  1210.                 X X X X . .      .
  1211.  
  1212.  
  1213.                 MEM     1 1 1 1 1 1 1 1
  1214.                 ADDR    2 3 4 5 6 7 8 9
  1215.  
  1216.                         . . X X . X X X
  1217.                         X X X X X X X X
  1218.                         X X . . X . . .
  1219.  
  1220.  
  1221.                 INTERRUPT           DMA
  1222.                 2 3 4 5 6 7     1 2 3 1 2 3
  1223.                 |               |     |
  1224. II.3. PC586
  1225.   We can accept:
  1226.                 PORT            IRQ             MEMORY
  1227.                 0x0d0000        9               0x0d0000
  1228.                 0x0c0000        5               0x0c0000
  1229.                 0xf00000        12              0xf00000
  1230.  
  1231.   A schematic of the board jumpers is shown below with one  acceptible/prefered
  1232. jumper arrangement.  NOTE: This is not the specification for an iMX586 which is
  1233. the equivalent board but layed out differently.
  1234.  
  1235.   Jumper 1: E27-E32 selects > 8 Mhz bus.
  1236.  
  1237.   The board static ram must be jumpered to address 0xD0000
  1238.         Jumper 2: E28-E33
  1239.         Jumper 3: E29-E24
  1240.         Jumper 4: E30-E25
  1241.         Jumper 5: E31-E26
  1242.  
  1243.   Jumper 6 thru jumper 13 choose  one:    The  board  must  be  configured  for
  1244. interrupt request line 9.  This is jumper 10 set to E41-E49.
  1245.  
  1246.   Jumper 14: E54-E55 selects 0WS mode.
  1247.  
  1248.   Jumper 15: is left alone.
  1249.  
  1250.   Jumpers  16  thru Jumpers 21:  E1-E18 control whether the board uses cheapnet
  1251. or standard ethernet.  The figure below shows it using cheapernet.    Move  the
  1252. jumpers down for standard ethernet.
  1253.  
  1254.   The  figure  below  visually  shows  the  jumper pins of interest. Those pins
  1255. marked with X's are the jumpered pins. E56 --- E58 may be  missing  from  older
  1256. cards.
  1257.  
  1258.                                                 J  J  J  J  J  J
  1259.                                                 1  1  1  1  2  2
  1260.                                                 6  7  8  9  0  1
  1261.  
  1262.                                              E1 X  X  X  X  X  X E6
  1263.                                              E7 X  X  X  X  X  X E12
  1264.                                             E13 .  .  .  .  .  . E18
  1265.          J15
  1266.  
  1267.         X E19
  1268.         X E20
  1269.         . E21
  1270.  
  1271.                                 J  J  J  J  J
  1272.                                 1  2  3  4  5
  1273.  
  1274.                       E56 X     .  .  X  X  X E22-E26
  1275.                       E57 X     X  X  X  X  X E27-E31
  1276.                       E58 .     X  X  .  .  . E32-E36
  1277.                        .  .  .  .  X  .  .  . E37-E44
  1278.                        .  .  .  .  X  .  .  . E45-E52
  1279.  
  1280.                        J  J  J  J  J  J  J  J
  1281.                        0  0  0  0  1  1  1  1
  1282.                        6  7  8  9  0  1  2  3
  1283.  
  1284.                                                 J14
  1285.  
  1286.                                         E53 .  X  X E55
  1287. III. Sup Collections
  1288.  
  1289.  
  1290.  
  1291. III.1. Binary Collections
  1292.   Edit  the  control  file  below, replacing CRYPT with your crypt.  You choose
  1293. among the optional collections as was explained earlier.
  1294.  
  1295. bin.root host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1296. bin.usr host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT prefix=usr
  1297. #bin.cmu host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1298. #bin.all host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1299. #bin.X11R4 host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1300. #bin.X11R4small host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1301. #bin.X11R5 host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1302. #bin.X11R5base host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1303. #bin.X11R5+fonts host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1304. #bin.X11R5+inc host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1305. #bin.X11R5+lib host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1306. #bin.mach3 host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT
  1307. #bin.mach3 host=x29.mach.cs.cmu.edu hostbase=/i386 base=/ crypt=CRYPT release=p
  1308. #mdos host=x29.mach.cs.cmu.edu hostbase=/i386 base=<BASE> crypt=mdos
  1309.  
  1310.   There are two control lines above applying to the bin.mach3 collection.   You
  1311. need  to  make  sure the right line for you has no # as the first character and
  1312. the other one begins with a #. The # character marks the rest of the line as  a
  1313. comment.    IBM  PS/2  users  should  uncomment  the line containing the string
  1314. release=ps2, while other users should  use  the  other  line.  The  release=ps2
  1315. option specifies that you want PS/2 versions of the kernel and server.
  1316.  
  1317.   NOTE: the bin.cmu collection is only available for machines at CMU.
  1318.  
  1319.  
  1320.  
  1321. III.2. Source Collections
  1322.   The  source  kit  for  Mach  includes  all of 4.3BSD-TAHOE, plus all the Mach
  1323. group's sources, plus some of the CMUCS sources, and several of the  FSF  (gnu)
  1324. components.    These sources will take up about 100Meg of disk space.  You will
  1325. need about another 40Meg, if you want to compile them.
  1326.  
  1327.   Edit the control file below (which can be found in  /sup/SUPFILE),  replacing
  1328. CRYPT with your crypt.  For each line in the control file, create the top level
  1329. directory  in  which  the  data  will  be  stored  and  set   the   permissions
  1330. appropriately.   (Change to the base directory (/usr/src) and mkdir each prefix
  1331. directory.)
  1332. type
  1333.         sup -dov <control file>
  1334. Repeat this command until sup completes successfully.  Note: It  will  probably
  1335. take  several  attempts  and  you probably want to do this at night.  Each, the
  1336. src.<dir> collection below, brings over the BSD/MACH sources necessary to build
  1337. the  programs  in the <dir> directory.  For example, src.etc is the sources for
  1338. the /etc directory and src.usr.lib is obviously the sources  for  the  /usr/lib
  1339. directory.  src.gnu contains the gnu sources used to build the binary tools and
  1340. the compiler.  Lastly, we have the mach.<dir> collections for  kernel  sources.
  1341. mach.sys   contains   sources  for  the  Mach  2.5  official  release.    While
  1342. mach.mainline and mach.nfs contain kernel  sources  for  essentially  the  most
  1343. recent monolithic Mach kernel used at CMU.
  1344.  
  1345. src.MISC host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src crypt=CRYPT
  1346. src.bin host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=bin crypt=
  1347. src.cci host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=cci crypt=
  1348. src.doc host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=doc crypt=
  1349. src.etc host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=etc crypt=
  1350. src.games host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=games cr
  1351. src.include host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=includ
  1352. src.lib host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=lib crypt=
  1353. src.man host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=man crypt=
  1354. src.new host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=new crypt=
  1355. src.old host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=old crypt=
  1356. src.tests host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=tests cr
  1357. src.ucb host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=ucb crypt=
  1358. src.undoc host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=undoc cr
  1359. src.usr.bin host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=usr.bi
  1360. src.gnu host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=gnu crypt=
  1361. src.usr.lib host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=usr.li
  1362. src.nfs host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=nfs crypt=
  1363. mach.sys host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=sys crypt
  1364. mach.mainline host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=sys
  1365. mach.nfs host=x29.mach.cs.cmu.edu hostbase=/i386 base=/usr/src prefix=sys crypt
  1366.  
  1367.   NOTE:  the  src.nfs and mach.nfs collections are only available to sites with
  1368. Sun NFS educational licenses.
  1369.  
  1370.   If you do not have the space on your machine, but  have  some  other  machine
  1371. (non  I386  even)  running Mach, you may put the control file there and run the
  1372. above procedure.  Note: you will have to register this new machine  at  CMU  in
  1373. order to run sup.
  1374.  
  1375.   You can obtain Mach 2.5 I386 sources without using the Mach operating system.
  1376. You MUST have a Mach 2.5 license and you  MUST  use  the  CMU  sup  program  to
  1377. request the sources, though.  Everything you need to know about the sup program
  1378. is  available  for  anonymous  FTP  access  on  the   machine   mach.cs.cmu.edu
  1379. (128.2.209.192),  in  the  directory  /usr/mach/public/sup.   There is a manual
  1380. page, the program sources, library sources,  and  sample  "collection"  control
  1381. files.    There  is also a README file that describes the contents further.  If
  1382. you do not have sup and are running 4.3BSD,  you  should  have  all  the  files
  1383. necessary  to  build  sup.   If you have problems building sup under some other
  1384. operating system, let us know; we might be able to help.
  1385. IV. KDB commands
  1386.   Kdb is the kernel debugger for the Mach 2.5 kernel.  The following is a brief
  1387. list of the kdb commands. kdb uses the same command format as adb and expertise
  1388. in adb is assumed.  The Mach 3.0 kernel has a different debugger called ddb.  A
  1389. man page for it comes with the Mach 3.0 kernel sources.
  1390. To enter the debugger:
  1391.  
  1392.                 ctrl-alt-d
  1393.  
  1394.  
  1395.         The format commands:
  1396.                  <addr>/<letters>
  1397. and write commands
  1398.                 <addr>/{w,W} values
  1399. function exactly as you would expect from adb.  (And note that / and ?
  1400. are treated the same.)  So you can use kdb to disassemble code, look at
  1401. memory locations and change memory locations.
  1402.  
  1403.         $r      -       will print out the register values
  1404.         <rname/var      accesses the value of register_name/variable
  1405.         >rname/var      sets the value of register_name/variable
  1406.  
  1407.         The neat features are the "step/breakpoint" commands, which are
  1408. again analogous to the adb functions:
  1409.         :s      -       single step one instruction
  1410.         :c,C    -       continue until the next breakpoint
  1411.                         (these both takes counts ala adb syntax)
  1412.         :p,P    -       print the instructions while single stepping
  1413.         :j      -       step until the next call or return and count
  1414.                          the instructions
  1415.         :J      -       step until we return to this nesting level
  1416.                          (show functions entered and instruction
  1417.                           counts.)
  1418.         :S      -       step over the function call you are stopped at
  1419.         :r,R    -       set a temporary break at the return address, so
  1420.                          you effectively step out of this function. (Note:
  1421.                          make sure you have done the push %ebp, movl %esp,
  1422.                          %ebp before you try this.)
  1423.  
  1424.   Breakpoints  are set with <addr>:B and <addr>:D and listed with $B, just like
  1425. adb.  You may not provide  commands  to  execute  when  a  breakpoint  is  hit.
  1426. <addr>:b  #, <addr>:d and $b are very different breakpoints.  They use the i386
  1427. hardware match facilities.  You can set up to 4 breakpoints  and  you  have  to
  1428. specify  which  one  to  ":b".    Right  now  they  work  analogous  to the "B"
  1429. breakpoints. But someday, I will implement access to the hardware break on read
  1430. and break on write features; all that is supported now is break on execute.
  1431.         $l      -       lists the state of all the threads
  1432.         $L      -       lists the state and stack of all the threads
  1433.  
  1434.         $k      -       does a stack trace
  1435.         $c      -       does a stack trace
  1436. <thread>$K      -       does a stack trace for the give thread
  1437. <addres>$C      -       does a stack trace at the given frame.
  1438.    <map>$m      -       prints the map at address <map>
  1439. <addres>$Pp     -       prints port
  1440. <addres>$PO     -       prints object
  1441. <addres>$PM     -       prints map
  1442. <addres>$PP     -       prints "page structure"
  1443.  
  1444. <function>! arg0 arg1 ...       invokes function with the given arguments
  1445.  
  1446.         R!      -       invokes the function to sync the disk and reboot
  1447.         Q!      -       invokes the function to reboot
  1448.  
  1449.         pb!     -       invokes the playback function.  The screen is small
  1450.                          compared to the info you might want to display; pb
  1451.                          will play back each line and wait for a space or
  1452.                          return before continuing.  Any other character
  1453.                          terminates playback.  The buffer is 64k.
  1454. V. Manual Pages
  1455.                                Table of Contents
  1456. 1. Introduction                                                               1
  1457. 2. Hardware Requirements for Mach on i386 Machines                            1
  1458. 3. The Bootstrap Disks                                                        1
  1459. 4. Before You SUP                                                             1
  1460.      4.1. Low Level Disk Formatting                                           1
  1461.      4.2. Manual Pages                                                        1
  1462.      4.3. Booting to Single User mode                                         1
  1463.      4.4. Disk Types                                                          1
  1464.      4.5. Initializing your Disk                                              2
  1465. 5. Installation and System Setup                                              2
  1466.      5.1. Supping files                                                       2
  1467.      5.2. Daemons                                                             3
  1468.      5.3. X11R4 and X11R5 and Mice                                            3
  1469.           5.3.1. X11R5                                                        3
  1470.           5.3.2. X11R4                                                        3
  1471.           5.3.3. Mice                                                         3
  1472.      5.4. The Environment                                                     3
  1473.      5.5. BSD4.3-TAHOE Source Compilation                                     3
  1474.      5.6. Building Kernels                                                    3
  1475.      5.7. Installing/Booting Kernels                                          3
  1476.      5.8. Root, Super-Root and RFS                                            4
  1477.      5.9. Paging under Mach 2.5                                               4
  1478.      5.10. Paging under Mach 3.0                                              4
  1479.      5.11. Changing Time Zones                                                4
  1480.      5.12. The Kernel Debugger                                                4
  1481. 6. Replicating The System                                                     4
  1482.      6.1. Cloning                                                             4
  1483.      6.2. Using Sup                                                           4
  1484.      6.3. Floppies                                                            5
  1485. 7. DONT CLOBBER MY DISK                                                       5
  1486.      7.1. Minor Variations                                                    5
  1487.      7.2. Room Enough for DOS or MDOS                                         5
  1488.      7.3. The Disk Layout                                                     5
  1489. 8. Known Features/Problems/Bugs                                               5
  1490.      8.1. gas                                                                 5
  1491. 9. Mach Feedback                                                              5
  1492.      9.1. Reporting bugs/ General enquiries                                   5
  1493.      9.2. Returning code to CMU                                               5
  1494. I. Trouble Shooting the Installation                                          6
  1495.      I.1. A Few More Anomalies                                                6
  1496. II. ETHERNET                                                                  7
  1497.      II.1. WD8003 & Etherlink II & WD8003 Elite                               7
  1498.           II.1.1. EtherLink II                                                7
  1499.           II.1.2. WD8003 & WD8013                                             7
  1500.           II.1.3. WD8003 Elite                                                8
  1501.      II.2. Etherlink I                                                        8
  1502.      II.3. PC586                                                              9
  1503. III. Sup Collections                                                         11
  1504.      III.1. Binary Collections                                               11
  1505.      III.2. Source Collections                                               11
  1506. IV. KDB commands                                                             12
  1507. V. Manual Pages                                                              13
  1508.