From: mike@array.com (Mike Willett)
Newsgroups: comp.os.coherent
Subject: Coherent FAQ, Technical Info for Version 4.X
Keywords: FAQ, Technical Info Coherent OS Version 4.X
Date: 23 Jan 93 02:03:29 GMT
Organization: Array Microsystems, Colorado Springs, CO. USA







       T E C H N I C A L  T I P S  F O R  C O H E R E N T  4.X

              Technical Tips FAQ for Rev 4.X of Coherent

                             FAQ Rev 2.3





                               Help With Installation:
                    4.0 Binary compatability with other software:
                                 Compiling programs:
                        Help with serial ports and terminals:
                    Creating a Bootable Floppy for Emergency Use:





Help With Installation:     From: Bob Hemedinger <support@mwc.com>
  -----------------------
  1) I'm updating from version 3.x to 4.x and am being asked for
     a serial number from a registration card. I don't have one.

          - updating users do not need new serial numbers. Use
            the number supplied with your 3.x version. If you don't
            know what it is, read the file /etc/serialno.

  2) I'm seeing various characters in the upper right hand corner of
     my screen when Coherent boots.

          - These are used by MWC for debugging some installation
            problems. If installation fails to boot, the last character(s)
            displayed in the corner of the screen will give a significant
            clue as to where the failure occurred.

  3) I get a core dump during the installation. The last digits of the
     eip register are 2EF.

          - Call MWC for a new set of installation diskettes.

  4) I see a prepare_gift() message when Coherent boots.

          - The tertiary boot program, /tboot, is attempting to read your
            CMOS to get your hard drive parameters and other information.
            This process met with an unexpected error, usually related to
            the initialization of cache memory. If Coherent continues to boot
            and run, ignore the message. If the boot fails, try this:

                  - hit <space> when prompted by tboot to abort the
                    boot process. Type 'info' at the first '?' prompt.
                    Ignore the returned data. At the next '?' prompt,
                    type 'update' or 'begin' if updating or installing,
                    or enter the name of the kernel to boot. Follow
                    this procedure exactly. Do NOT try the 'info' command
                    more than once.

  5) When booting the installation, I come to a # prompt with a message
     displayed that I didn't boot properly and need to reboot.

          - tboot failed to pass what you typed at the '?' prompt
            to the installation program. A prepare_gift() message
            was probably displayed before this, sometimes too quickly
            to be seen unless one is looking for it specifically.
            One can either reboot and use the procedure from item #4
            (above), or type 'build' at the # prompt to install, or
            type 'build -u' at the # prompt to update from 3.x.

  6) During boot, I see a message about not being able to brelease a
     modified buffer.

          - In most cases, Coherent will continue to boot normally. In some,
            the message will scroll endlessly. This is an indication of an
            incompatible bios and is a very rare case. The Epson bios set
            has sometimes produced this problem. If at all possible, update
            the bios chips in the computer. Phoenix is the bios chipset
            MWC recommends.

  7) After installing disk #1, I reboot Coherent from the hard drive, but
     am never prompted to enter a diskette -or-, I reboot Coherent from the
     hard drive, and the system hangs with a Coherent banner message on the
     screen.

          - Thou hast most likely chosen to use either virtual consoles,
            or no virtual consoles but did select a loadable keyboard
            table. Coherent is hanging at the point where keyboard initialization
            takes place, indicating that the keyboard does not properly support
            IBM scan code 3. This is a different keyboard mode than DOS
            uses, and probably a good 10% of keyboards of Asian origin will
            have problems with this. Reinstallation without virtual consoles
            nor loadable keyboard tables should resolve this.

  8) All diskettes install without a hitch, but after rebooting, fsck finds
     all sorts of DUP blocks and bad i-nodes.

          - This is rare, but is usually the result of installing onto a
            large partition. This is possibly related to sector translation
            firmware and/or the manner in which the firmware deals with
            bad blocks... we don't know yet. Break the large partition into
            smaller partitions and try installation again. If this is an ESDI
            drive, and the controller is doing sector translation, try switching
            it to native mode.


  4.0 Binary compatability with other software:
  --------------------------------------------

  Coherent 4.x compiles and runs COFF executables. Third party COFF software
  will most likely run if the following conditions are true:

          - does NOT use shared memory nor shared libraries. We plan to
            implement these in the next release of Coherent. Coherent
            4.0 shared memory is not System V compliant.

          - does NOT rely on sockets nor streams. Again, we plan to have
            have at least one of these in the next release.

          - does NOT use graphics. Coherent 4.0 is strictly a text-based
            system. Again, we plan to have some form of graphics support
            in the future.

  Some examples of 3rd party software running under Coherent 4.x:
          ACUCOBOL
          Xtree
          BASIS International BBX/Progression 3 (BASIC)
          FilePro

          - For more info, please contact MWC, or email sales@mwc.com.


  Compiling programs:
  -------------------

  1) The compiler is complaining about not enough memory.

          - You may have a significant amount of memory, say 2 or 4 Megabytes,
            but one must also account for other running processes. The compiler
            by default tries to do all of its work in core (memory). If it
            aborts due to not enough memory, then add a -T0 to your cc command
            line. This will force the compiler to use temporary files on
            the hard drive, rather than in core.

  2) I'm trying to port software from a bbs or the net. Is Coherent closer to
     System V or BSD?

          - You should select System V wherever possible. We tend to
            avoid BSDisms.

  3) When compiling a package, the linker complains that getwd() doesn't
     exist. This worked under 3.x. What happened?

          - With Coherent 4.0, we have gone to getcwd() in place of
            getwd(). We have supplied _getwd() for people that need
            getwd(), but we are planning on dropping this in the
            future.


Help with serial ports and terminals:
  -------------------------------------
                  d10590@tanus.oz.au (Robert Chalmers) Coherent V4.0/4.01.
                          Thanks, Robert!

  If you follow the installation instructions, and choose their defaults,
  you will end up with a ttys file very similar to the following.

          0lPcom1l <--|
          0lPcom2l    | -- The four standard COM1, COM2,
          0lPcom3l    |    COM3 & COM4 ports. NOT CONFIGURED.
          0lPcom4l <--|    See the notes below for configuration.
          1lPmono0 <--|
          1lPmono1    | -- The terminal virtual consoles.
          1lPmono2    |    These REPLACE the V3.x's 1Pconsole
          1lPmono3 <--|     entry in that versions ttys file.
                            You dont have to touch these.

  For example, on my  system  I  have  the  following  hardware.   One
  standard HDD/FDD Controller (IDE) with COM1, COM2 and LPT1 on board,
  and enabled. These live at 3F8 - IRQ4, and 2F8 - IRQ3. LPT1 uses 378
  and IRQ7.

  One standard Taiwan Multi I/O card with 2  COM  ports,  one  printer
  port,  and  one  game port. This card can be configured as COM1/2 or
  COM3/4, and LPT1 or LPT2. I have the jumpers set for the  following.
  COM3  at 3E8 - IRQ4 and COM4 at 2E8 - IRQ3, with the second printer,
  LPT2 at 278 - IRQ5.

  Now, setting them up, as applied to this type of 2 board setup.   If
  you   are  not  sure  if  your  installation  configured  the  ports
  correctly, then follow the instructions in  the  Release  Notes  and
  Installation Guide under 'Asy' exactly as they appear, regarding the
  making of the devices.  Dont change anything. yet.  Now,  the  thing
  to  note  is  the rule on IRQs and Polling. If you are using COM2 as
  your modem port, (seems to be the most used option), and COM1  as  a
  terminal  connection,  and  both  are using IRQs, then the other two
  must be Polled. COM3 and COM4 must be Polled.  Observe  my  settings
  listed,

          0lPcom1l <--- Serial terminal on COM1. IRQ4
          1rLcom2r <--- Modem, incoming, on COM2. IRQ3
          0lLcom2l <--- Modem, outgoing (the same modem) on COM2. IRQ3
          0lPcom3pl <--- Serial terminal on COM3. Polled
          0lPcom4pl <--- Serial terminal on COM4. Polled
          1lPmono0 <-|
          1lPmono1   |
          1lPmono2   | --virtual screens.
          1lPmono3 <-|

  The Serial terminals are shown as 'disabled' in the  above  listing,
  but  when  they  are  connected, you simply type 'enable com3pl' and
  presto!, you get a login prompt on that terminal.

  In SUMMARY:
  Install with all defaults.
  Run the three configuration commands in the Asy entry.
  The asyxxx entries in your /dev directory are the prototypes for
  the comxx devices, so you can ignore them for the purposes of this.
  Decide which lines you will use, and check your IRQ/Poll combination.
  Check your physical wiring.

  For terminals, you only need three wires:

  D25 connectors. TXD to RXD, RXD to TXD, Common Ground.
          2 --> 3
          3 <-- 2
          7 <-> 7
  D9 connector. TXD to RXD, RXD to TXD, Common Ground.
          2 --> 3
          3 <-- 2
          5 <-> 5

  In the above setting, to call out on the modem, you MUST type
   'disable com2r' before you can call out  on  com2l.  When  you  are
  finished, type 'enable com2r' to put your modem back on line.

  Other things of note: Old Xt's with a com port and  any  version  of
  TELIX/PROCOMM/etc etc make good cheap terminals, as do old terminals
  that businesses throw away as obsolete.

  Windows 3.1's Terminal will emulate a vt100. If you have a second PC
  connected to a Coherent serial port, its 'almost!' like having Xterm
  running Coherent in a Term  window.  You  can  even  cut  and  paste
  between Word for Windows etc and vi. So who needs X I ask?

  Creating a Bootable Floppy for Emergency Use:
  ---------------------------------------------
          Forwarded here by Robert Chalmers, work done by Udo and Vlad
  | Udo and Vlad have done a MARVELOUS job here. -- Robert Chalmers     |

          [Two spaces have been added to the start of each line to
           avoid mailer and nroff problems... --Mike]

  -------------------------Cut Here-------------------------------
    # shell script to create a bootable floppy disk
    # Works with COHERENT 3.x and COHERENT 4.0.
    # Written by Udo Munk (udo@umunk.GUN.de)
    # with help from Vladimir Smelyansky (vlad@mwc.com)
    clear
    if [ $USER != root ]
    then
      echo "This program must be run as user root!"
      exit
    fi
    echo "This programm creates a bootable floppy disk for COHERENT."
    echo "Because booting the PC hardware only works with floppy drive A"
    echo "I want to know the size of your A device first."
    echo
    while true
    do
      echo -n "Is your A devive a 5,25
      read answer
      if [ $answer = y -o $answer = n ]
      then
        break
      else
        echo "answer with y or n please!"
        echo
      fi
    done
    if [ $answer = y ]
    then
      echo "Fine, let us create a 5,25
      dev=/dev/fha0
      devsize="5,25
      devblocks=2400
      boot=/conf/boot.fha
    else
      echo "Fine, let us create a 3,5
      dev=/dev/fva0
      devsize="3,5
      devblocks=2880
      boot=/conf/boot.fva
    fi
    echo
    echo "Now please put a" $devsize "floppy disk into your drive A".
    echo "WARNING: ALL DATA ON THIS FLOPPY DISK WILL BE DESTROYED!"
    echo
    echo -n "Type y if you want to continue, any other to abort: "
    read answer
    if [ $answer != y ]
    then
      exit
    fi
    clear
    echo "Step 1: formating floppy disk..."
    /etc/fdformat $dev
    echo "Step 2: building the bad block list..."
    /etc/badscan -o bootdisk $dev $devblocks
    echo "Step 3: building a filesystem..."
    /etc/mkfs $dev bootdisk
    rm bootdisk
    echo "Step 4: copy the bootstrap onto the floppy disk..."
    cp $boot $dev
    /etc/mount $dev /mnt
    if [ -f /tboot ]
    then
      cp /tboot /mnt
    fi
    cp /dpb /mnt
    echo "Step 5: copy the kernel and patch it..."
    cp /coherent /mnt
    ln /mnt/coherent /mnt/autoboot
    if [ -f /tboot ]              # we are running Coherent 4.x
    then
      if [ $dev = /dev/fha0 ]     # drive A is 5,25"
      then
        /conf/patch /mnt/coherent rootdev=makedev14)
        /conf/patch /mnt/coherent pipedev=makedev14)
      else                                # drive A is 3,5"
        /conf/patch /mnt/coherent rootdev=makedev15)
        /conf/patch /mnt/coherent pipedev=makedev15)
      fi
    else                          # we are running Cohherent 3.x
      if [ $dev = /dev/fha0 ]     # drive A is 5,25"
      then
        /conf/patch /mnt/coherent rootdev_=makedev14)
        /conf/patch /mnt/coherent pipedev_=makedev14)
      else                                # drive A is 3,5"
        /conf/patch /mnt/coherent rootdev_=makedev15)
        /conf/patch /mnt/coherent pipedev_=makedev15)
      fi
    fi
    echo "Step 6: copy all neccesary files to the floppy disk..."
    mkdir /mnt/mnt
    mkdir /mnt/tmp
    cpdir /dev /mnt/dev
    cpdir /drv /mnt/drv
    mkdir /mnt/conf
    cpdir /conf/kbd /mnt/conf/kbd
    mkdir /mnt/bin
    cp /bin/bad /mnt/bin
    cp /bin/check /mnt/bin
    cp /bin/chgrp /mnt/bin
    cp /bin/chmod /mnt/bin
    cp /bin/chown /mnt/bin
    cp /bin/cmp /mnt/bin
    cp /bin/cp /mnt/bin
    cp /bin/cpdir /mnt/bin
    cp /bin/date /mnt/bin
    cp /bin/db /mnt/bin
    cp /bin/dcheck /mnt/bin
    cp /bin/df /mnt/bin
    cp /bin/find /mnt/bin
    cp /bin/grep /mnt/bin
    cp /bin/icheck /mnt/bin
    cp /bin/ln /mnt/bin
    cp /bin/ls /mnt/bin
    cp /bin/lc /mnt/bin
    cp /bin/mkdir /mnt/bin
    cp /bin/mv /mnt/bin
    cp /bin/ncheck /mnt/bin
    cp /bin/ps /mnt/bin
    cp /bin/pwd /mnt/bin
    cp /bin/rm /mnt/bin
    cp /bin/rmdir /mnt/bin
    cp /bin/scat /mnt/bin
    cp /bin/sh /mnt/bin
    cp /bin/stty /mnt/bin
    cp /bin/sync /mnt/bin
    mkdir /mnt/usr
    mkdir /mnt/usr/tmp
    mkdir /mnt/usr/bin
    cp /usr/bin/vi /mnt/usr/bin
    cp /usr/bin/me /mnt/usr/bin
    cp /usr/bin/more /mnt/usr/bin
    if [ -d /usr/lib/terminfo ]
    then
      mkdir /mnt/usr/lib
      mkdir /mnt/usr/lib/terminfo
      mkdir /mnt/usr/lib/terminfo/a
      cp /usr/lib/terminfo/a/ansipc /mnt/usr/lib/terminfo/a
    fi
    mkdir /mnt/etc
    cp /etc/.profile /mnt/etc
    cp /etc/ATclock /mnt/etc
    cp /etc/badscan /mnt/etc
    cp /etc/clri /mnt/etc
    if [ -f /etc/drvld ]
    then
      cp /etc/drvld /mnt/etc
    fi
    cp /etc/drvld.all /mnt/etc
    cp /etc/fdisk /mnt/etc
    cp /etc/fsck /mnt/etc
    cp /etc/init /mnt/etc
    cp /etc/mkfs /mnt/etc
    cp /etc/mount /mnt/etc
    cp /etc/reboot /mnt/etc
    cp /etc/umount /mnt/etc
    cp /etc/serialno /mnt/etc
    cp /etc/timezone /mnt/etc
    cp /etc/termcap /mnt/etc
    echo "Step 7: create lost+found with enough empty directory slots..."
    mkdir /mnt/lost+found
    for I in 0 1 2 3 4 5 6 7 8 9
    do
      for J in 0 1 2 3 4 5 6 7 8 9
      do
        touch /mnt/lost+found/$I$J
      done
    done
    rm /mnt/lost+found/*
    echo "Step 8: create some files, so that boot ends in single user mode..."
    cat >/mnt/etc/brc <<!
    . /etc/timezone
    /bin/date -s `/etc/ATclock` >/dev/null
    /etc/drvld.all
    exit 1
    !
    >/mnt/etc/checklist
    >/mnt/etc/mount.all
    echo "Last step: check the filesystem of the created floppy disk:"
    /etc/umount $dev
    /etc/fsck $dev
    echo "Fine, floppy disk ready, store it at a cold and dry place but"
    echo "where you can remeber in case of an emergency :-)"
    -------------------------End Here-------------------------------




















-- 
-------------------------------------------------------------------------------
mike@array.com              So much fun, so little time to enjoy it....
-------------------------------------------------------------------------------