home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / mach / doc / unpublished / sun_release.doc.Z / sun_release.doc
Encoding:
Text File  |  1992-08-19  |  40.0 KB  |  1,001 lines

  1.                        MACH 2.5 SUN 3 INSTALLATION NOTES
  2.  
  3.                                  Jonathan Chew
  4.                                   Karl Hauth
  5.                           Carnegie Mellon University
  6.                              Pittsburgh, PA 15213
  7.                                21 December 1989
  8.  
  9. 1. Introduction
  10.   The distribution of Mach for the Sun 3 contains a whole operating system.  It
  11. is intended to be loaded onto an empty disk and booted.  The tape(s) contains a
  12. Mach  kernel,  the  CMU-CS 4.3BSD environment, Mach support programs/libraries,
  13. X11, gnu emacs, tools for source control and building from source, and  sources
  14. for  the Mach kernel and environment and the compilation environment to compile
  15. them under.
  16.  
  17.   This document assumes at least a working knowledge of  the  installation  and
  18. maintenance  of  a 4.3BSD system.  A working knowledge of the installation of a
  19. SunOS system is highly desirable, but  may  not  be  necessary.    If  you  are
  20. unfamiliar with one or both 4.3BSD and SunOS, you should read the 4.3BSD and/or
  21. SunOS documentation.
  22.  
  23. 2. Information About the Tape
  24.  
  25.    - 1/2" tape:  1  tape,  6250bpi,  device  =  /dev/rmt{16,20},  blocking
  26.      factor=40 (This is the PREFERRED tape distribution)
  27.  
  28.    - 1/2"  tape:  2  tapes,  1600bpi,  device  =  /dev/rmt{8,12}, blocking
  29.      factor=40
  30.  
  31.    - 1/4"  tape:  3  450ft.  tapes,  device  =   /dev/{,n}rst8,   blocking
  32.      factor=1024
  33.  
  34.  
  35.  
  36. 2.1. Contents
  37.  
  38.    1. Programs to help set up the disk and load it (tar)
  39.  
  40.               stand/diag
  41.               etc/{disktab,fsck,mkfs,newfs,restore}
  42.               bin/tar
  43.  
  44.    2. /                                 7073K (dump)
  45.  
  46.    3. /sys0                             22119K (tar)
  47.  
  48.    4. /usr0 (tar)
  49.               adm                       41K
  50.               guest                     16K
  51.               mach                      6631K
  52.               spool                     9K
  53.               tmp                       1K
  54.  
  55.    5. Source  for  Mach  kernel  and environment, compilation environment,
  56.       kernel dependent programs, and some  useful  CMU  specific  programs
  57.       (tar)
  58.               build/src                 20739K
  59.  
  60.    6. Miscellaneous software (tar)
  61.               misc                      32869K
  62.                       .X11              12757K
  63.                       .gnu-emacs        9503K
  64.                       .nfs              924K
  65.                       .rcs              1742K
  66.                       .sdm              598K
  67.  
  68. 3. Hardware Requirements
  69.   To install this distribution, you will need a Sun 3 with:
  70.  
  71.    - A minimum of 4 megabytes of memory (>= 8 meg. is preferred)
  72.  
  73.    - A bwtwo, cgtwo, or cgfour monitor
  74.  
  75.    - At least one formatted 70 megabyte disk
  76.  
  77.           NOTE:  A bootable system consisting of items 2-4 in the previous
  78.                section will fit on a 70 megabyte disk.  140  megabtyes  of
  79.                disk space will comfortably accomodate everything.
  80.  
  81.    - A server, a 1/4 inch tape drive, or a second disk to boot from
  82.  
  83.   Mach  has  been tried (and is being used) here on the following models of the
  84. Sun 3:
  85.  
  86.             Sun 3/{50,60,75,110,140,160,280}
  87.  
  88. 4. Installation Procedure
  89.   Basically, you'll need to boot your machine, read in the programs to help set
  90. up  and  load  the  disk,  partition the disk, make 4.3 file systems on it, and
  91. restore and un-tar the contents of the tape(s).
  92.  
  93.   There is a script of a sample installation at the end of this document.
  94.  
  95.    1. Boot your machine with your last version of Mach or SunOS 3.X
  96.  
  97.              You can boot SunOS on your machine in one  of  the  following
  98.            ways:
  99.  
  100.               a. Boot your machine as a diskless node off a server
  101.  
  102.               b. Load mini-Unix from 1/4 inch tape into the b partition of
  103.                  the local disk and boot it
  104.  
  105.               c. Boot from a second local disk
  106.  
  107.              Your local Sun maintainer should be able to help you  do  one
  108.            of  the  above.   There is also a Sun manual called "Installing
  109.            UNIX on the Sun Workstation" that might be helpful.
  110.  
  111.    2. Save your versions  of  /stand/diag,  /etc/{disktab,fsck,mkfs,newfs,
  112.       restore}, and /bin/tar by renaming them
  113.  
  114.            NOTE:    Of  these programs, the only one that you MUST have is
  115.                 /etc/mkfs to make 4.3 file systems  instead  of  Sun  file
  116.                 systems.  The other programs are optional.
  117.  
  118.    3. Cd  to  /  and  un-tar the first file on the tape which contains the
  119.       programs to help set up and load the disk ie.
  120.               stand/diag
  121.               etc/{disktab,fsck,mkfs,newfs,restore}
  122.               bin/tar
  123.    4. Halt the machine
  124.  
  125.    5. Boot /stand/diag to partition your disk(s)
  126.  
  127.            /stand/diag has been modified to include CMU  partition  tables
  128.            as  menu  items  for  the  disks that we use here.  You can use
  129.            these, the non-CMU tables, or your own.  The nice  thing  about
  130.            the  CMU  tables  is  that they are laid out so everything will
  131.            fit.
  132.  
  133.                        -       -
  134.                        |     a |
  135.                        |       |
  136.                        |       -
  137.                        |     b |
  138.                      c |       -       -       -
  139.                        |       |     d |     f |
  140.                        |       |       -       |
  141.                        |     h |       |       -
  142.                        |       |     e |     g |
  143.                        |       |       |       |
  144.                        -       -       -       -
  145.  
  146.                 Figure 4-1:  Standard CMU disk partition layout
  147.  
  148.            In the CMU scheme, 70 megabyte disks don't have a "b" partition
  149.            With big disks, d and e split f instead of h.  You can look in
  150.            /etc/disktab for examples of partition tables.
  151.  
  152.            Here's the contents of /etc/fstab (for a Priam 638) which  will
  153.            give you an idea of how partitions can map to file systems:
  154.  
  155.                /dev/sd0a:/:rw:1:1
  156.                /dev/sd0d:/sys0:rw:1:2
  157.                /dev/sd0b:/tmp:rw:0:5
  158.                /dev/sd0e:/usr0:rw:1:3
  159.                /dev/sd0g:/usr1:rw:1:4
  160.  
  161.            See Sun's "Installing UNIX on the Sun Workstation" and/or "Diag
  162.            - A Disk Maintenance Program" if you  don't  know  how  to  use
  163.            diag.
  164.  
  165.    6. Reboot machine with your last version of Mach or SunOS 3.X
  166.  
  167.    7. Make   the   file  systems  for  your  disk(s)  using  /etc/mkfs  or
  168.       /etc/newfs.  See /etc/disktab for a list of disks newfs understands.
  169.  
  170.            NOTE:  You should use 8k file systems on your Sun 3
  171.  
  172.    8. Restore the / dump into the "a" partition
  173.  
  174.    9. Un-tar the /sys0 tar file
  175.  
  176.            NOTE:  The files in the this tar file are  stored  by  relative
  177.                 instead  of  full  path  names.  Also, the tape may not be
  178.                 positioned correctly, so you may  get  the  error  message
  179.                 "tar: blocksize 0".  To remedy this, either try re-issuing
  180.                 the tar command or rewind the tape and skip forward to the
  181.                 tar file.
  182.  
  183.   10. Un-tar the /usr0 tar file
  184.  
  185.            NOTE:    The  files in the this tar file are stored by relative
  186.                 instead of full path names.  Also, the  tape  may  not  be
  187.                 positioned  correctly,  so  you  may get the error message
  188.                 "tar: blocksize 0".  To remedy this, either try re-issuing
  189.                 the tar command or rewind the tape and skip forward to the
  190.                 tar file.
  191.  
  192.   11. Un-tar the sources into one of your user partitions
  193.  
  194.            NOTE:  The files in the this tar file are  stored  by  relative
  195.                 instead  of  full  path  names.  Also, the tape may not be
  196.                 positioned correctly, so you may  get  the  error  message
  197.                 "tar: blocksize 0".  To remedy this, either try re-issuing
  198.                 the tar command or rewind the tape and skip forward to the
  199.                 tar file.
  200.   12. Un-tar miscellaneous programs
  201.  
  202.            NOTE:    The  files in the this tar file are stored by relative
  203.                 instead of full path names.  Also, the  tape  may  not  be
  204.                 positioned  correctly,  so  you  may get the error message
  205.                 "tar: blocksize 0".  To remedy this, either try re-issuing
  206.                 the tar command or rewind the tape and skip forward to the
  207.                 tar file.
  208.  
  209.   13. Use /usr/mdec/installboot to install a boot block on your disk
  210.  
  211.   14. Halt the machine
  212.  
  213.   15. Boot Mach single user
  214.  
  215.            NOTE: Mach will come up running the default kernel without  NFS
  216.                 or  AFS  support. See the section on Changing Kernels, for
  217.                 information on how to get a different kernel.
  218.  
  219.   16. Fsck the root partition
  220.  
  221.   17. Su to root (the root password is "password")
  222.  
  223.   18. Edit /etc/THISHOST to contain your machine name
  224.  
  225.   19. Edit /etc/NETWORKS to contain your IP address
  226.  
  227.   20. Create /etc/nmbroadcast with a single  line  containing  your  local
  228.       broadcast address.
  229.  
  230.   21. Edit  /etc/attributes,  changing  "changeme.mach.cs.cmu.edu"  to the
  231.       name of your machine
  232.  
  233.              This is a control file unique to CMU which contains a  single
  234.            line   entry   for  each  machine  in  the  local  CMU  network
  235.            environment specifying the particular characteristics  of  that
  236.            machine.   It  is  mainly  used  by  /usr/cs/etc/nanny,  a  CMU
  237.            developed  utility  for  starting  and  managing  servers,   to
  238.            determine  which  servers  need  to be started for a particular
  239.            machine.
  240.  
  241.   22. Fsck /sys0
  242.  
  243.   23. Mount /sys0 since /etc/hosts is linked to /usr/cs/lib/hosts/hosts in
  244.       /sys0
  245.  
  246.   24. Edit /etc/hosts to contain your machine name and IP address
  247.  
  248.   25. Edit /etc/neton
  249.  
  250.              /etc/neton sets the host name and address of the machine, and
  251.            configures the network interface.  It needs to  be  changed  to
  252.            specify  your network broadcast address and add your gateway to
  253.            the routing table.  If your machine won't be  on  the  network,
  254.            then  everything  except the first few lines which set the host
  255.            name and host ID should be commented out.
  256.  
  257.   26. Edit /etc/fstab to contain your disk partitions and mount points
  258.  
  259.   27. CTRL-d out of your root shell
  260.  
  261.   28. CRTL-d out of the opr shell
  262.  
  263.   29. Hit return when asked 'Do you wish to run a "fsck -p"? [yes] '
  264.  
  265.   30. When it comes up multi-user, login as guest (no password)
  266.  
  267.              The guest account was set up to show you how an account might
  268.            be set up.  It execs X when you login.
  269.  
  270. 5. References
  271.  
  272.    - 4.3BSD Unix Programmer's Manual
  273.  
  274.    - Diag - A Disk Maintenance Program
  275.  
  276.    - Installing UNIX on the Sun Workstation
  277.  
  278.    - Sun Commands Reference Manual
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.    - Sun 3 is a trademark of Sun Microsystems, Inc.
  287.  
  288.    - Unix is a trademark of AT&T Bell Laboratories
  289. 6. Sample Installation Session
  290.   Sample  session  for  installing  Mach  on  a Sun 3/160 on the network with a
  291. formatted Priam 638 disk, a 1/4" Mach tape distribution, and a SunOS  3.X  boot
  292. tape.  User input is in bold face.
  293. Session output                          Comments
  294.  
  295.  
  296.                                         Start with a halted machine
  297. >b st()                                 Boot from the 1/4" tape
  298. Boot: st(0,0,0)
  299. Boot:st(0,0,4)                          Load the copy program
  300. Standalone Copy
  301. From:st(0,0,5)                          Copy mini-unix
  302. To:sd(0,0,1)                             into the b partition
  303. Boot:sd(0,0,1)vmunix -as                Boot mini-unix
  304.  
  305. [... about 20 lines of mini-unix messages ...]
  306.  
  307. root device?sd0*
  308.  
  309. [... more mini-unix messages ...]
  310.  
  311. # mv /stand/diag /stand/diag.old        save our versions
  312. # mv /etc/disktab /etc/disktab.old
  313. # mv /etc/fsck /etc/fsck.old
  314. # mv /etc/mkfs /etc/mkfs.old
  315. # mv /etc/newfs /etc/newfs.old
  316. # mv /etc/restore /etc/restore.old
  317. # mv /bin/tar /bin/tar.old
  318. # cd /
  319. # /bin/tar.old xbf 1024 /dev/rst8
  320. # sync
  321. # sync                                  Get ready to halt
  322.                                         We have to use L1 a to halt since
  323. Abort at some-number                    mini-unix doesn't have halt
  324. > b st()
  325. Boot: st(0,0,0)
  326. Boot: sd(0,0,1)stand/diag               partition the disk
  327. Version 1.1 86/02/03
  328. Disk Initialization and Diagnosis
  329.  
  330. When asked if you are sure, respond with 'y' or 'Y'
  331.  
  332. specify controller:
  333.         0 - Interphase SMD-2180
  334.         1 - Xylogics 440 (prom set 926)
  335.         2 - Xylogics 450/451
  336.         3 - Adaptec ACB 4000 - SCSI/ST506
  337.         4 - Emulex MD21 - SCSI/ESDI
  338. which one? 4
  339. Specify controller address on the mainbus (in hex): 200000
  340. Device address: 200000
  341.  
  342. Which target? 0
  343.  
  344. Which unit? 0
  345.  
  346. Specify drive:
  347.         0 - Micropolis 1355
  348.         1 - Toshiba MK 156F
  349.         2 - Priam 638
  350.         3 - Other
  351. which one? 2
  352.  
  353. ncyl 1218 acyl 6 nhead 15 nsec 34 interleave 1
  354. diag> partition
  355. Select partition table:
  356.         0 - CMU Micropolis 1355
  357.         1 - Toshiba MK 156F
  358.         2 - CMU Priam 638
  359.         3 - Other
  360. Which one? 2
  361. Do you wish to modify this table? no
  362. Verify partition table 'CMU Priam 638':
  363.         Partition a: starting cyl=0, # blocks=28560
  364.         Partition b: starting cyl=56, # blocks=32640
  365.         Partition c: starting cyl=0, # blocks=621180
  366.         Partition d: starting cyl=120, # blocks=932330
  367.         Partition e: starting cyl=303, # blocks=186660
  368.         Partition f: starting cyl=120, # blocks=279990
  369.         Partition g: starting cyl=669, # blocks=279990
  370.         Partition h: starting cyl=120, # blocks=559980
  371. OK to use this partition table? y
  372. Use the label command to write out the partition table.
  373. diag> label
  374. label this disk...
  375. OK to use logical partition map 'CMU Priam 638'? y
  376. Are you sure you want to write? y
  377. verify label
  378. id: <Priam 638 cyl 1218 alt 6 hd 15 sec 34>
  379.         Partition a: starting cyl=0, # blocks=28560
  380.         Partition b: starting cyl=56, # blocks=32640
  381.         Partition c: starting cyl=0, # blocks=621180
  382.         Partition d: starting cyl=120, # blocks=932330
  383.         Partition e: starting cyl=303, # blocks=186660
  384.         Partition f: starting cyl=120, # blocks=279990
  385.         Partition g: starting cyl=669, # blocks=279990
  386.         Partition h: starting cyl=120, # blocks=559980
  387. diag> q
  388. >b sd(0,0,1)vmunix -as                  bring mini-unix back up
  389.  
  390. [... messages from mini-unix ...]
  391.  
  392. # newfs -n /dev/sd0a 638                Make some file systems
  393. [... messages from newfs ...]
  394. # newfs -n /dev/sd0d 638
  395. [... messages from newfs ...]
  396. # newfs -n /dev/sd0b 638
  397. [... messages from newfs ...]
  398. # newfs -n /dev/sd0e 638
  399. [... messages from newfs ...]
  400. # newfs -n /dev/sd0g 638
  401. # mkdir /mnt
  402. # mount /dev/sd0a /mnt
  403. # cd /mnt
  404. # restore rbf 1024 /dev/nrst8           Pull in the root partition
  405. # mkdir /sys0
  406. # mount /dev/sd0d /sys0
  407. # cd /sys0
  408. # tar xbf 1024 /dev/nrst8               Now for /sys0
  409. # mkdir /usr0
  410. # mount /dev/sd0e /usr0
  411. # cd /usr0
  412. # tar xbf 1024 /dev/nrst8               And now /usr0
  413. # tar xbf 1024 /dev/nrst8               source files
  414. # cd /usr0
  415. # tar xbf 1024 /dev/nrst8               miscellaneous programs
  416. # cat > /mnt/etc/fstab                  Put an fstab on the new disk
  417. /dev/sd0a:/:rw:1:1
  418. /dev/sd0d:/sys0:rw:1:2
  419. /dev/sd0b:/tmp:rw:0:5
  420. /dev/sd0e:/usr0:rw:1:3
  421. /dev/sd0g:/usr1:rw:1:4
  422. ^D
  423. # /usr/mdec/installboot bootsd /dev/sd0a
  424. # sync
  425. # sync
  426.  
  427. Abort at some-number                    Halt with L1 a
  428. > b sd(0,0,0)vmunix -s                  Boot mach single user
  429. [... lots of output from the mach kernel ...]
  430. -OPR- fsck -p /dev/sd0a
  431. [... fisk output ...]
  432. -OPR- su
  433. Password:
  434. # rm /etc/THISHOST                      Set up the host's name
  435. # cat > /etc/THISHOST
  436. ZION.MACH.CS.CMU.EDU                    Use YOUR host name here
  437. ^D
  438. # rm /etc/NETWORKS                      Set up the IP address
  439. # cat > /etc/NETWORKS
  440. 128.2.222.192 on ie0                    Use YOUR IP address here
  441. ^D
  442. # fsck -p /dev/rsd0d                    Need to mount sys0 since /etc/hosts is
  443. # mount /dev/sd0d /sys0                 linked to /usr/cs/lib/hosts/hosts
  444. # cat >> /etc/hosts                     Add ourself to the host table
  445. 128.2.222.192        zion.mach.cs.cmu.edu zion                                 
  446. ^D
  447. # ^D -OPR- ^D
  448.  
  449. You should not bring the system up for users unless you know
  450. that a "fsck -p" has been run and has produced no errors.
  451.  
  452. Do you wish to run a "fsck -p"? [yes]   Just hit return
  453.  
  454. 7. Post-Installation Considerations
  455.  
  456.  
  457.  
  458. 7.1. How to Make Accounts
  459.  
  460.    1. Edit /etc/{passwd,group}
  461.  
  462.              If  you  don't  know what the passwd and group files are, you
  463.            should look at their manual pages  in  the  "Unix  Programmer's
  464.            Manual".
  465.  
  466.    2. Edit /etc/account
  467.  
  468.              /etc/account  is  a CMU-CS specific file that tells when your
  469.            account starts and expires for each group that you are in.   As
  470.            an example, here are a few lines from it:
  471.  
  472.                jjc::477:3:01-Dec-86:01-Jan-89:root:
  473.                jjc::477:7:03-May-86:01-Jan-89:root:
  474.                jjc::477:377:17-May-87:01-Jan-89:root:
  475.                jjc::477:408:01-Sep-87:01-Jan-89:root:
  476.  
  477.    3. Make a home directory for the account
  478.  
  479.    4. Make a symbolic link from /usr to the home directory
  480.  
  481.    5. Change  the  ownership of the home directory to the user and his/her
  482.       group.
  483.  
  484.   Each line of /etc/account contains the  account  name,  user  ID,  group  ID,
  485. starting date, expiration date, and sponsor.
  486. 7.2. Nanny
  487.   /usr/cs/etc/nanny  is  a  server  started in /etc/rc that starts and babysits
  488. other servers.  It will restart any of the servers that  it  babysits  if  they
  489. die.  The servers that it babysits are listed in /usr/cs/etc/nanny.config.  The
  490. description of each server in nanny's configuration file consists of  the  full
  491. path  name  of  the  server, what user and group IDs to run it as, the value to
  492. nice it at, and the attribute that the machine must have for nanny to  run  it.
  493. Nanny looks for the machine's attributes in /etc/attributes.
  494.  
  495.   To add or delete a server from nanny's babysitting service, add or delete the
  496. server description to or from /usr/cs/etc/nanny.config.  If you add  a  server,
  497. check to make sure that your machine has the attribute needed to run the server
  498. in /etc/attributes.  If you don't want to run nanny, comment out the invokation
  499. of it in /etc/rc and start the servers in /etc/rc or /etc/rc.local instead.
  500.  
  501.   See nanny(8) for more information.
  502.  
  503.  
  504.  
  505. 7.3. Netmsgserver
  506.   /etc/nmbroadcast  needs  to  be  edited  to contain one line containing an IP
  507. address to be used as the IP broadcast address.  Omission  of  this  file  will
  508. cause Mach's netmsgserver to use CMU's IP broadcast address as a default.
  509.  
  510.  
  511.  
  512. 7.4. Root, Super-Root and RFS
  513.   To  clarify  upfront  what  may  be the cause of some confusion regarding the
  514. software system you have just installed, as distributed your system includes  3
  515. root  directories.    First,  there is the physical root which is /../../.  The
  516. second is the remote root which is /../ and the third is the local  root  which
  517. is / and appears as a typical Unix root.
  518.  
  519.   The  reason for this is that the kernel as distributed supports a remote file
  520. system (i.e. RFS) first developed at CMU in  1982.  Mach  systems  at  CMU  are
  521. usually  "rooted"  at /RFS/.LOCALROOT, allowing for a /../hostname syntax and a
  522. /../../ super-root.
  523.  
  524.   RFS is easy to use.  The syntax is /../hostname or alias.  For  example,  the
  525. following command would list the contents of /tmp on wb1:
  526.  
  527.     ls /../wb1/tmp
  528.  
  529.   The  local  machine  must  have  an RFS link to the remote machine for you to
  530. access the remote machine through RFS.  To make a link in /.. for a  particular
  531. machine:
  532.  
  533.    1. Cd to /..
  534.  
  535.    2. Run /usr/cs/etc/remhost giving it the alias of the machine.
  536.  
  537.            NOTE:    The host name and alias must appear in /etc/hosts with
  538.                 its corresponding IP address for this to work.
  539.  
  540.   The above procedure will create two binary  files,  /../alias  and  /../.host
  541. name,  which  contain  the  IP address of the machine.  To refer to these files
  542. without going across RFS, you must quote the file by using the  syntax  /..///.
  543. For  example,  the  following  command  would show the contents of /../alias in
  544. hexadecimal:
  545.  
  546.     od -x /..///alias
  547.  
  548.   For RFS to  work,  the  remote  machine  must  be  running  the  RFS  daemon,
  549. /usr/cs/etc/rfsd,  which is started by nanny. The remote machine must also list
  550. the IP address of any machines which are allowed  to  access  it  in  the  file
  551. /usr/cs/lib/hosts/local-hosts.
  552.  
  553.   By  default,  RFS  accesses  files as if you had the user and group, rfsd and
  554. system.  To authenticate yourself to RFS as someone different, you  should  use
  555. the  program  /usr/cs/etc/rfs.    It  will  prompt you for a user, group, group
  556. account, and password.  Give the  default  answer  when  it  asks  "Identify?".
  557. After  running  /usr/cs/etc/rfs,  you  will have a shell that will allow you to
  558. access files on remote RFS hosts that you have a  corresponding  user  account,
  559. group, and password for.
  560.  
  561.  
  562.  
  563. 7.5. Paging
  564.   The  kernel  pages  out  to  inodes.   There is no need for special dedicated
  565. paging area, but there must be free space on the  disk  to  page  out  to.  The
  566. program  /usr/mach/etc/swapon  can be run at boot time to specify partitions to
  567. perfer to swap to and those to never swap to.  (see mach_swapon.8)
  568.  
  569.  
  570.  
  571. 7.6. System Log Files
  572.   System log files are  located  under  /usr/adm.  Should  any  unusual  system
  573. behavior  be  noticed, looking at the log files located here is a good place to
  574. start looking for clues as to what the cause may be.  An  unusually  large  log
  575. file can be an indication that system errors are occurring. It's a good idea to
  576. occassionally check the size of this directory by simply doing a  du  /usr/adm.
  577. Also, these log files should be periodically checked as some have a tendency to
  578. become excessively large over time.   Most  are  regularly  removed  when  they
  579. exceed a specified age, see /usr/lib/crontab.
  580.  
  581.  
  582.  
  583. 7.7. Changing Time Zones
  584.   As  distributed  the time zone is set to eastern standard time, i.e. EST5EDT.
  585. If you need to change time zones you will need to perform two tasks. First, you
  586. will need to re-link /etc/zoneinfo/localtime as follows:
  587.         login as root
  588.         cd  /etc/zoneinfo
  589.         rm  localtime
  590.         ln  xxx  localtime   (substitute appropriate timezone file for xxx)
  591.  
  592.   Second,  you  will need to patch time zone variable (i.e. _tz) in the kernel.
  593. Prior to doing this you will need to calculate the appropriate patch  value  in
  594. hex  of  the  difference  in  minutes  between  your  local  zone  time and GMT
  595. (universal time). The value of this constant for  eastern  standard  time,  for
  596. example  is  x12c  hex  (i.e.  300  decimal).  This  is the value that you will
  597. initially see for _tz. To change to Pacific Daylight Time, as an  example,  _tz
  598. should  be  patched  to  x1e0  hex  (i.e.  480  decimal). The following example
  599. illustrates patching the vmunix kernel to PDT.
  600.         login as root
  601.         /bin/adb  -w /vmunix
  602.            tz?W  1e0
  603.            $q
  604.         /etc/reboot
  605.  
  606.   An alternative to patching the kernel is to configure a new kernel  with  the
  607. right timezone, recompile it, and install it.
  608.  
  609. 8. How to make changes and upgrades
  610.  
  611.  
  612.  
  613. 8.1. Compilation Environment
  614.   Building Mach software (including the kernel) requires a modified compilation
  615. environment.  This environment includes a  path  searching  version  of  the  C
  616. compiler.   The C compiler resides in /usr/cs/bin/cc and requires the following
  617. paths (which are environment variables):
  618.  
  619.      CPATH           Path to search for include files.
  620.  
  621.      LPATH           Path to search for library files.
  622.  
  623.   These paths usually contain at least:
  624.  
  625.      CPATH           :/usr/mach/include:/usr/cs/include:/usr/include:
  626.  
  627.      LPATH           :/usr/mach/lib:/usr/cs/lib:/lib:/usr/lib:
  628.  
  629.   A script that sets these environment variables to  reasonable  values  is  in
  630. /usr/mach/lib/machpaths.
  631.  
  632.   The  Makefiles  that  are  supplied with the sources in /usr/build/src assume
  633. that the program /usr/misc/.sdm/bin/build is being used  to  execute  them  and
  634. need  the  CMU-modified  version  of make found in /usr/cs/bin/make.  The files
  635. Makefile-common, mach/Make.inc and {.,mach,kernel}/Makeconf are  also  required
  636. parts  of the make process.  Makefile-common is a set of generalized make rules
  637. that is included by the Makefiles in  the  bin,  etc  and  usr  subdirectories.
  638. Mach/Make.inc  is the set of general rules included by most of the Makefiles in
  639. the mach subdirectory. The respective Makeconf files are also read by make  and
  640. specify  an  object  base directory into which the .o files will be placed. The
  641. mach/Makeconf and kernel/Makeconf files also define a few other parameters that
  642. the make process depends on.
  643.  
  644.  
  645.  
  646. 8.2. Rebuilding from the sources
  647.   The   build   program   (see   /usr/misc/man/man8/build.8)  reads  a  project
  648. description file from which it gets information about switches to  make,  where
  649. to  put  the executables, and lists of directories to be used for the CPATH and
  650. LPATH variables. It will set the correct switches, paths and targets  and  then
  651. call  the make program. If you wish to be sure that you are getting the correct
  652. make program, set the environment variable MAKE to the complete  pathname.  The
  653. project description files are in /usr/build/lib/project.
  654.  
  655.   To build programs in bin,etc, or usr
  656.  
  657.     setpath LPATH -i99 /usr/build/lib
  658.     setenv PROJECT sys.2.5
  659.     cd /usr/build/src
  660.     #build <program> but do not install it
  661.     build /usr/cs/bin/<program>
  662.  
  663.     #build ps and install it in /usr/bin
  664.     build -fromsource -todefault /bin/ps
  665.  
  666.     #build and install all the programs in bin and its subdirectories.
  667.     build -fromsource -todefault -here /bin
  668.  
  669.  
  670.   To build programs in mach
  671.  
  672.     setpath LPATH -i99 /usr/build/lib
  673.     setenv PROJECT sys.2.5
  674.     cd /usr/build/src/mach
  675.     #build md but do not install it
  676.     build /bin/md
  677.  
  678.     #build md and install it in /usr/mach/bin
  679.     build /bin/md.install
  680.  
  681.     #build and install all the programs in /lib and it
  682.     #subdirectories libthreads and libmach
  683.     build /lib/install
  684. In  the mach area, build is only used to set the path values correctly.  If you
  685. have CPATH and LPATH correctly set you can use make instead of build.
  686.  
  687.   To build a kernel
  688.  
  689.     cd /usr/build/src/kernel
  690.     make   - builds the kernel specified by CONFIG in kernel/Makeconf
  691.     make CONFIG=STD+MP-afs - builds the specified configuration.
  692.  
  693. Build is only useful with the kernel sources if you wish to make a shadow  area
  694. in  which you place a few modified sources and get the rest of the sources from
  695. the standard source area. Build can deal with sources in  multiple  directories
  696. where make cannot. See /usr/misc/man8/build.8 for details on how to do this.
  697.  
  698.  
  699.  
  700. 8.3. Changing Kernels
  701.   If  your  license  allows  it,  you  will have received extra versions of the
  702. kernel in  the  /usr/build/obj/kernel  directory.  These  kernels  are  in  the
  703. subdirectories STD+WS and STD+ANY. The versions STD+ANY or STD+WS have both NFS
  704. and AFS support. The versions STD+ANY-afs and STD+WS-afs have NFS support.  The
  705. versions  -afs-nfs  have  neither. The ANY configurations support more drivers.
  706. The vax MP configurations are for multi-processors vaxes  with  BI  buses.  The
  707. conf/MASTER.*  files  in  the  kernel  source  area  define the contents of the
  708. various configurations.
  709.  
  710.   The kernel must be in two roots, the physical root (/../..)  where  the  boot
  711. program  is  expecting  to  find  it and the local root (/) where the kernel is
  712. found when the system is up.  To make the kernel be in both roots, a hard  link
  713. is  made  between  /vmunix  and /../../vmunix.  Even though this link has to be
  714. made, booting a new kernel is very straightforward:
  715.  
  716.    1. Su to root
  717.  
  718.    2. Copy your new kernel into /vmunix.reboot
  719.  
  720.    3. Change its protection to 640
  721.  
  722.    4. Change its user and group ownership to sys and kmem
  723.  
  724.    5. Reboot
  725.  
  726.   There  are  lines  in  /etc/rc  that  save  /vmunix  in   /vmunix.old,   move
  727. /vmunix.reboot  to  /vmunix,  make  the  necessary  links from the local to the
  728. physical root, and then reboot.
  729.  
  730.   Two shell scripts, /etc/oldvmunix and /etc/newvmunix, are useful for changing
  731. kernels.   /etc/oldvmunix will save /vmunix in /vmunix.new, move /vmunix.old to
  732. /vmunix, and change the links.  /etc/newvmunix will  do  the  opposite,  moving
  733. /vmunix to /vmunix.old and /vmunix.new to /vmunix.
  734.  
  735.  
  736.  
  737. 8.4. Supping updates from CMU
  738.   Both  the  sources  and  the  binary  for  sup (Software Update Protocal) are
  739. included in this distribution. With the installation of some control  files  at
  740. your  site  and at CMU, this program can be used to get updated versions of the
  741. kernel or mach sources, and the BSD binaries and selected sources. It can  also
  742. be used at your site to automatically keep software consistent on all your Mach
  743. workstations.
  744.  
  745.   The  sup  program  is  documented  both  in   /usr/mach/doc/sup.ps   and   in
  746. /usr/cs/man/man8/sup.8.   Send   mail   to   mach@cs.cmu.edu  to  request  more
  747. information about setting your site up to sup upgrades from  CMU.  The  machine
  748. that you wish to sup files to must be on the INTERNET.
  749.  
  750. 9. Differences between Mach 2.0 and Mach 2.5
  751.  
  752.  
  753.  
  754. 9.1. NFS and in-kernel AFS support
  755.   If  you have the appropriate NFS and AFS licenses, your distribution includes
  756. kernel support for Sun's NFS and possibily the  Andrew  File  System  (AFS)  as
  757. well.  The  few  user  level  programs  need  to  run  NFS and AFS are found in
  758. /usr/misc/.nfs. The programs to set up an AFS server or to maintain a  complete
  759. NFS are not provided. It is assumed that you can get them from Sun and Transarc
  760. respectively.  The necessary daemons are started by /etc/rc.
  761.  
  762.  
  763.  
  764. 9.2. Mach IPC changes
  765.   The  Mach  2.5  kernel  has  two  compile-time   options   (MACH_IPC_SIGHACK,
  766. MACH_IPC_XXXHACK) that can be used to enable backwards-compatibility code.  The
  767. kernel sources currently have these options enabled but once  you  change  your
  768. sources, you may want to turn them off.
  769.  
  770.   In  general,  Mach  2.5 is not binary compatible with Mach 2.0, because traps
  771. and kernel calls have changed, but with some help from libmach it is reasonably
  772. source compatible.
  773.  
  774.    1. Ownership  rights  are no longer supported.  MSG_TYPE_PORT_OWNERSHIP
  775.       and  MSG_TYPE_PORT_RECEIVE  are  invalid.     ownership-rights   and
  776.       receive-rights notifications are never generated.  (MACH_IPC_XXXHACK
  777.       enables ownership rights.)
  778.  
  779.    2. Emergency messages are no longer supported.  A  port  has  only  one
  780.       queue of messages.
  781.  
  782.    3. PORT_ENABLED  is  no  longer  supported.  Instead, Mach 2.5 provides
  783.       "port  sets",  which  generalize   the   enabled/disabled   concept.
  784.       (MACH_IPC_XXXHACK  enables  support  for  PORT_ENABLED.    Note that
  785.       libmach   also   has   some   backward-compatibility   support   for
  786.       PORT_ENABLED, port_enable, and port_disable.)
  787.  
  788.    4. Mach 2.0 allowed a task to receive messages directly from an enabled
  789.       port, in addition to receiving messages directed to enabled ports by
  790.       using PORT_ENABLED.  Mach 2.5 does not allow messages to be received
  791.       directly from ports that are members of a port set.
  792.  
  793.    5. SIGMSG and SIGEMSG are no longer supported.  Mach 2.0 signalled  the
  794.       receiver  when  a message was sent to an enabled port.  Mach 2.5 IPC
  795.       never generates signals.  (MACH_IPC_SIGHACK  enables  SIGMSG/SIGEMSG
  796.       support.  CMU Common Lisp relies on these signals.)
  797.  
  798.    6. The  IPC traps (msg_send/msg_receive/msg_rpc) have different numbers
  799.       and arguments  in  Mach  2.5.    (However,  note  that  the  wrapper
  800.       functions  in libmach continue to have the same arguments as in Mach
  801.       2.0, so this change is transparent to user  code  and  only  impacts
  802.       binary compatibility.)  (MACH_IPC_XXXHACK enables the old traps.)
  803.  
  804.    7. Mach  2.5 has a completely different set of port-manipulating kernel
  805.       calls.    The  old  port_allocate,   port_deallocate,   port_enable,
  806.       port_disable_select,  port_select, port_set_backlog, and port_status
  807.       are gone.  task_ports is gone, but it  wasn't  implemented  in  Mach
  808.       2.0.    (MACH_IPC_XXXHACK enables these old kernel calls, except for
  809.       port_select and task_ports.)
  810.  
  811.    8. Mach  2.5  has  new  versions  of  port_allocate,   port_deallocate,
  812.       port_set_backlog,  and  port_status  that  have  basically  the same
  813.       arguments.  The subtle difference is that they  refer  to  ports  by
  814.       name  instead  of  passing  send rights.  port_status also returns a
  815.       port-set-membership indication  in  place  of  the  enabled/disabled
  816.       indication.    It  still  returns  separate ownership/receive rights
  817.       indications, also they will  never  have  different  values  (unless
  818.       MACH_IPC_XXXHACK).
  819.  
  820.    9. Mach  2.5  has new kernel calls: port_names, port_type, port_rename,
  821.       port_set_allocate,        port_set_deallocate,         port_set_add,
  822.       port_set_remove,          port_set_status,         port_insert_send,
  823.       port_extract_send,    port_insert_receive,     port_extract_receive,
  824.       port_set_backup.
  825.  
  826.   10. Mach    2.5    supports    the    use   of   TASK_KERNEL_PORT   with
  827.       task_{get,set}_special_port,     and     THREAD_KERNEL_PORT     with
  828.       thread_{get,set}_special_port.
  829.  
  830.   11. Mach  2.5 has a "backup port" concept to replace the most common use
  831.       of ownership rights.  Using port_set_backup, a task  can  specify  a
  832.       backup  port  for a port that it owns.  Normally when receive rights
  833.       for a port are deallocated, the port is destroyed.  If the port  has
  834.       a  backup, instead they are sent in a port-destroyed notification to
  835.       the backup port.
  836.  
  837.   12. All notifications in  Mach  2.5  have  a  PORT_NULL  msg_remote_port
  838.       field.  Notifications in Mach 2.0 carried send rights for the task's
  839.       kernel port in the msg_remote_port (reply port) field.
  840.  
  841.  
  842.  
  843. 9.3. External Pager interface changes
  844.   In Mach 2.0 the External Pager was only provided in  +EXP  configurations  of
  845. the kernel. It is now standard and cannot be disabled. The names and parameters
  846. of most of the calls  have  changed.  The  old  names  began  with  pager_  the
  847. corresponding new ones begin with memory_object. For example,
  848.  
  849.     pager_data_provided(pageing_object_request,
  850.             offset,data,data_count,lock_value)
  851.  
  852. has been replaced with
  853.  
  854.     memory_object_data_provided(memory_control,
  855.             offset,data,data_count,lock_value)
  856.  
  857. and    the   type   of   the   first   parameter   changed   from   port_t   to
  858. memory_object_control_t.
  859.  
  860.   The new calls are documented in the Kernel  Reference  Manual  included  with
  861. this distribution.
  862.  
  863.  
  864.  
  865. 9.4. Kernel include files reorganized
  866.   The kernel include files were reorganized in the following ways:
  867.  
  868.    - sys now includes only files from Berkeley. Mach files were moved from
  869.      here to mach, kernel and vm directories.
  870.  
  871.    - mach and mach/<machine> contain all the Mach specific  include  files
  872.      that  are  to  be  exported to /usr/cs/include. Files were moved here
  873.      from sys, kern and vm.
  874.  
  875.    - mach_debug and mach_debug/<machine> contain the  debugging  interface
  876.      to   the   kernel.   This   interface   is   only  included  in  +EXP
  877.      configurations.
  878.  
  879.    - include files in kern and vm directories are no  longer  exported  to
  880.      /usr/cs/include.
  881.  
  882.    - The  kernel  include  files are no longer placed in /usr/mach/include
  883.      but only  in  /usr/cs/include  with  symbolic  links  to  there  from
  884.      /usr/include.
  885.  
  886.   The  sed script in /usr/build/src/mach/FIX-INCLUDES.sed can be used to modify
  887. your source files to include the header files from the new locations.
  888.  
  889. 10. Known Problems/Bugs
  890.  
  891. 11. Mach Feedback
  892.   We expect to get three kinds of feedback:
  893.  
  894.    1. Bug reports/fixes and suggestions for improvements
  895.  
  896.    2. Code
  897.  
  898.    3. General enquiries
  899.  
  900.  
  901.  
  902. 11.1. Reporting bugs/ General enquiries
  903.   The Mach Project may  be  contacted  either  by  US  Mail,  Arpanet  mail  or
  904. telephone.
  905.   US Mail Address
  906. Mach Project
  907. c/o Richard F. Rashid
  908. School of Computer Science
  909. Carnegie Mellon University
  910. Pittsburgh, PA 15213-3890
  911. USA
  912.   Arpanet mail addresses
  913. mach@wb1.cs.cmu.edu
  914. info-mach-request@cs.cmu.edu
  915. info-mach@cs.cmu.edu
  916. mach is read by the Project Manager and the Distribution Coordinator.  Problems
  917. pertaining to distribution problems should be sent here.
  918.  
  919.   info-mach-request is used to accept requests to be  added  to  the  info-mach
  920. mailing list.
  921.  
  922.   info-mach  is  a mail distribution list consisting of the mach developers and
  923. mach users. Bug reports, technical questions and suggestions on how to use mach
  924. should  be  sent  to this list. Also replies to questions raised here should be
  925. cc'ed to this list.
  926.  
  927.   Telephone
  928. 412 268-8166 (Lori Iannamico - Distribution Coordinator)
  929.  
  930.   The telephone number should only be used when absolutely necessary  and  then
  931. only  to  leave  a  message.  Please keep in mind that we do not have a support
  932. staff and so cannot provide more than minimal help with problems.
  933.  
  934.  
  935.  
  936. 11.2. Returning code to CMU
  937.   We encourage you to send back to us any code which may  improve  the  system.
  938. Please  follow  the conventions we have used in the kernel.  In particular, you
  939. should make your changes under specific compilation switches and you should add
  940. the  switches  to  the configuration file.  All changes (even bug fixes) should
  941. leave the original code intact such that turning  off  the  appropriate  option
  942. will  return  the system to its original state.  By following these conventions
  943. we will be able to more  quickly  incorporate  your  modifications.    This  is
  944. especially  important  if you are porting Mach to a new machine and want CMU to
  945. include that software in a future release.
  946.  
  947.   Code may be returned in a tape (similar to the kind of tape you received with
  948. this  release)  or  via  the Arpanet.  If you have network access and intend to
  949. work heavily with Mach it may be desirable to  access  Mach  software  using  a
  950. software  update  program (called SUP) which is supplied with the release tape.
  951. This program allows network updating of software modifications  between  sites.
  952. If you feel this is important to you or your group, you should contact the Mach
  953. group as described above to make the necessary arrangements.
  954.  
  955. 12. References
  956.  
  957.    - 4.3BSD Unix Programmer's Manual
  958.  
  959.    - Installing UNIX on the Sun Workstation
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.    - Unix is a trademark of AT&T Bell Laboratories
  968.                                Table of Contents
  969. 1. Introduction                                                               1
  970. 2. Information About the Tape                                                 1
  971.      2.1. Contents                                                            1
  972. 3. Hardware Requirements                                                      1
  973. 4. Installation Procedure                                                     1
  974. 5. References                                                                 2
  975. 6. Sample Installation Session                                                3
  976. 7. Post-Installation Considerations                                           3
  977.      7.1. How to Make Accounts                                                3
  978.      7.2. Nanny                                                               4
  979.      7.3. Netmsgserver                                                        4
  980.      7.4. Root, Super-Root and RFS                                            4
  981.      7.5. Paging                                                              4
  982.      7.6. System Log Files                                                    4
  983.      7.7. Changing Time Zones                                                 4
  984. 8. How to make changes and upgrades                                           4
  985.      8.1. Compilation Environment                                             4
  986.      8.2. Rebuilding from the sources                                         4
  987.      8.3. Changing Kernels                                                    5
  988.      8.4. Supping updates from CMU                                            5
  989. 9. Differences between Mach 2.0 and Mach 2.5                                  5
  990.      9.1. NFS and in-kernel AFS support                                       5
  991.      9.2. Mach IPC changes                                                    5
  992.      9.3. External Pager interface changes                                    5
  993.      9.4. Kernel include files reorganized                                    5
  994. 10. Known Problems/Bugs                                                       6
  995. 11. Mach Feedback                                                             6
  996.      11.1. Reporting bugs/ General enquiries                                  6
  997.      11.2. Returning code to CMU                                              6
  998. 12. References                                                                6
  999.                                 List of Figures
  1000. Figure 4-1:   Standard CMU disk partition layout                              1
  1001.