home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / info / faq / os2_20 / os2help / dosvmb1.fax < prev    next >
Encoding:
Text File  |  1993-06-21  |  39.6 KB  |  918 lines

  1. ┌───────────────────────────────────────────────────────────────────────────┐
  2. │                          OS/2 2.0 Technical Tips                          │
  3. │                                 From the                                  │
  4. │                        OS/2 Technical Support Team                        │
  5. │                            Boca Raton, Florida                            │
  6. │                                                                           │
  7. ├───────────────────┬─────────────────────────────────────┬─────────────────┤
  8. │    File Name      │   Description                       │ Number of pages │
  9. ├───────────────────┼─────────────────────────────────────┼─────────────────┤
  10. │  DOSVMB.FAX       │ OS/2 Setting up DOS Virt. Machines  │       14        │
  11. └───────────────────┴─────────────────────────────────────┴─────────────────┘
  12.  
  13.  
  14. Creating a DOS 5.0 Image file for OS/2 2.0
  15. ------------------------------------------
  16.  
  17. This information is provided as *general guidelines* for creating
  18. a VIRTUAL MACHINE BOOT ("VMB") from an Image file.  Please
  19. consult OS/2's online help under "Image File" for more information if
  20. necessary. Your configuration may vary...
  21. -----------------------------------------------------------------
  22. You will need to have a DOS 5.0 bootable diskette with the FORMAT
  23. command in its PATH statement in AUTOEXEC.BAT, or DOS 5.0 installed
  24. on your hard disk drive also with FORMAT command in its PATH.
  25.  
  26.  1.  Create a bootable 360k or 720k diskette with DOS 5.0. You can
  27.      use high density 1.44mb disk if you wish, but each image file
  28.      you create will equal the size of the diskette you  use.  By
  29.      using a 360K diskette, your image files will only be 368K in
  30.      size.  (You will need to boot with a DOS 5 diskette, and then
  31.      use the FORMAT command with the /S parameter - see your DOS
  32.      manual's FORMAT command information for assistance if
  33.      necessary).  You can also create a bootable diskette if you
  34.      have DOS 5.0 installed on your system.  Boot up from pure DOS 5.0,
  35.      insert a blank formatted diskette in drive A, and from your DOS root
  36.      directory type "SYS A:".
  37.  
  38.  2.  Boot up in OS/2 and copy all of the following files to the bootable
  39.      diskette:
  40.  
  41.      From:                      Filename:
  42.  
  43.           \OS2\MDOS                       ANSI.SYS
  44.           \OS2\MDOS                       FSFILTER.SYS
  45.           \OS2\MDOS                       EMM386.SYS
  46.           \OS2\MDOS                       HIMEM.SYS
  47.           \OS2\MDOS                       MOUSE.COM
  48.  
  49.  
  50.  3.  Create with a text editor a CONFIG.SYS file on the Bootable diskette
  51.      like the following:  (assumes you have a c:\dos directory - if not
  52.      "MD DOS" from the root directory).
  53.  
  54.      device=himem.sys
  55.      device=emm386.sys
  56.      dos=high,umb
  57.      devicehigh=fsfilter.sys
  58.      devicehigh=ansi.sys
  59.      files=40
  60.      buffers=30
  61.  
  62.  
  63.  4.  Create an AUTOEXEC.BAT file on the bootable diskette *like* the
  64.      following:
  65.  
  66.      echo off
  67.      lh mouse                                            NOTE:  (lh = LH)
  68.      path c:\;c:\dos
  69.      prompt $p$g
  70.      c:
  71.      cd \dos
  72.      dos5-img.bat
  73.  
  74.      The last line of the AUTOEXEC.BAT file will load a batch file
  75.      named  DOS5-IMG.BAT in the \DOS subdirectory.  Use this batch
  76.      file  to continue executaion of other programs or utilities.
  77.      See step 5 for a sample batch file.
  78.  
  79.  
  80.  5.  Create a batch file in the \DOS subdirectory named DOS5-IMG.BAT
  81.      similiar to the following:
  82.  
  83.        echo off
  84.        \os2\mdos\fsaccess a:
  85.  
  86.      The second line of this batch file will release access to the
  87.      image file. Otherwise the DOS session thinks the image file
  88.      is drive A, and you will not have access to the physical
  89.      drive A on your system.
  90.  
  91.  
  92.  6.  Open an  OS/2 window, and change to your DOS subdirectory,
  93.      type:
  94.           cd \DOS                <enter>
  95.           VMDISK A: DOS5.IMG     <enter>
  96.  
  97.      This  will  create an image of the diskette  you  created  in
  98.      steps 1 through 5.  The image file will be named DOS5.IMG and
  99.      will be located in the \DOS subdirectory.
  100.  
  101.  
  102.  7. Exit the OS/2 Window, and return to the Desktop.
  103.  
  104.  
  105.  8. Create a DOS Window object:
  106.  
  107.     a.  Open the " OS/2 System " folder.
  108.  
  109.     b.  Double click on the "Command Prompts" icon.
  110.  
  111.     c.  Copy the DOS Window icon to the Desktop by holding down
  112.         the CTRL key and dragging the icon to the Desktop.
  113.  
  114.     d.  Close the "Command Prompts" and the "OS/2 System" folder.
  115.  
  116.  
  117.  9.  Change the DOS Settings for the DOS Window icon:
  118.  
  119.     a. Select the "DOS Window" icon by clicking on it once.
  120.  
  121.     b. Bring up its menu by clicking the right mouse button once.
  122.  
  123.     c. Click on the ARROW on the "OPEN" line.
  124.  
  125.     d. Select "Settings".
  126.  
  127.     e. In the "DOS Window - Settings" notebook, select "Session".
  128.  
  129.     f. Select "DOS Settings".
  130.  
  131.     g. Change the following settings:
  132.  
  133.        1. DOS_HIGH           to:   ON
  134.        2. DOS_SHELL          to:   C:\DOS\COMMAND.COM C:\DOS\ /p
  135.        3. DOS_STARTUP_DRIVE  to:   C:\DOS\DOS5.IMG
  136.  
  137.        Note:
  138.        If your pc has a LAN adapter, or other board that uses RAM
  139.        memory, add the range it uses to the MEM_EXCLUDE_REGIONS
  140.        settings (ie, C800-CC00 for my Ethernet adapter).
  141.  
  142.  
  143.        There may be other settings you wish to change, but don't
  144.        do it yet. Get the DOS Window up and working first, then
  145.        you can make other necessary changes.
  146.  
  147.  
  148.  10.  Save the settings you changed, and exit the notebook.
  149.  
  150.  11.  Time to test all this stuff out. Double click on your new
  151.       DOS 5 Window, and you there you are!
  152.  
  153.  
  154. If  you have problems with the above steps, please double check
  155. all your file and directory names, especially the ones in the
  156. "DOS Settings".  If you need more assistance, open the Master Help
  157. Index and choose Search Topics, and then enter Starting from an
  158. Image File in the box, scroll down to the DOS section and double
  159. click on the Starting from an Image File and read the information
  160. presented there.  Good luck!
  161.  
  162.  
  163. ========================================================
  164. More information on VMB's from the OS/2 2.0 Redbook Vol. II
  165. is presented below for your information.
  166. ========================================================
  167.  
  168. VIRTUAL MACHINE BOOT
  169. --------------------
  170.  
  171.    The following is an excerpt from Chapter 12 of the IBM OS/2 Version 2.0
  172.    Technical Redbooks, Volume 2:  DOS and Windows Environment (Document
  173.    Number GG24-3731-00), published by the IBM Corporation.
  174.  
  175.    This document describes the ability of OS/2 to run Virtual DOS Machines
  176.    using a feature called Virtual Machine Boot (VMB).
  177.  
  178.    An important goal of OS/2 Version 2.0 is the ability to run past, current,
  179.    and  future DOS programs; indeed most DOS applications available today run
  180.    unchanged in the MVDM environment.
  181.  
  182.    However, it should be remembered that the "DOS" which runs in this case is
  183.    highly optimized for (and specific to) an OS/2 Version  2.0  virtual  8086
  184.    machine.    Because  of  this,  there are fundamental internal differences
  185.    between the DOS Emulation provided under OS/2 Version 2.0 and "real"  DOS.
  186.    Two problems may therefore arise:
  187.  
  188.    1.  Some  programs  may  depend  on specific DOS features such as internal
  189.        control blocks, LAN Redirector hooks, or even undocumented  functions,
  190.        which are not present in MVDM's DOS Emulation.
  191.    2.  Only  DOS  character  device  drivers  can  be  loaded  in  MVDM's DOS
  192.        Emulation. The user may own a block device (such as a special disk  or
  193.        tape  drive) for which no OS/2 driver is available. (A block device is
  194.        one accessed via a drive letter, such as E:).
  195.  
  196.    Virtual Machine Boot (VMB) solves both these problems. It allows the  user
  197.    to  boot  "off-the-shelf"  DOS  and  use  block  device drivers in an OS/2
  198.    Version 2.0 virtual DOS machine, ensuring greater  compatibility  for  DOS
  199.    applications.
  200.  
  201.    Another possible use of VMB is to run DOS of a different National Language
  202.    to  that  of OS/2 Version 2.0 itself. This may be useful in a multilingual
  203.    environment.
  204.  
  205.  12.1  VMB Environment
  206.  
  207.    The 80386 processor and VDM component of OS/2 Version 2.0 together emulate
  208.    a  8086  processor, keyboard, display, BIOS and other supporting hardware;
  209.    in effect, a complete  "virtual  Personal  Computer."    It  is  therefore
  210.    possible for "real" DOS to be loaded in a VDM  session.  Control is passed
  211.    to the boot record (the first sector) of the DOS system diskette, which in
  212.    turn  loads  and  initializes  the rest of the DOS kernel, just as it does
  213.    when booting on a physical PC.
  214.  
  215.    Indeed, the VDM environment is so similar to a real  PC  environment  that
  216.    VMB can actually support any 8086 operating system kernel, such as Digital
  217.    Research's  DR-DOS**  and  CP/M**,  Microsoft  MS-DOS**,  or  even  a PS/2
  218.    reference diskette (but do not attempt to run diagnostics  or  change  the
  219.    configuration  from a VDM; the results are unpredictable).  However, since
  220.    the purpose of VMB is to run current DOS applications, formal IBM  support
  221.    is announced for IBM PC DOS 3.x, 4.0, and 5.0 only.
  222.  
  223.    A VDM using VMB is similar in function to any other virtual  DOS  machine.
  224.    Multiple  VDMs  may  be  started  and  operated concurrently using Virtual
  225.    Machine Boot.   Each runs in its  own  virtual  8086  machine;  access  to
  226.    hardware  and other system resources is managed by MVDM and the underlying
  227.    OS/2 Version 2.0  operating system.
  228.  
  229.  12.2  Configuring Virtual Machine Boot
  230.  
  231.    The DOS operating system loaded into a VDM by VMB  may be:
  232.  
  233.    1.  An actual DOS system diskette
  234.    2.  An image of a DOS system diskette saved to hard disk
  235.    3.  A DOS partition on hard disk.
  236.  
  237.    For any of the alternatives, we need to do the following:
  238.  
  239.    1.  Set up the start-up batch file AUTOEXEC.BAT
  240.  
  241.    2.  Set up the configuration file CONFIG.SYS
  242.  
  243.    3.  Provide OS/2 V2.0 with the real DOS to boot.
  244.  
  245.  12.2.1  Preparing AUTOEXEC.BAT and CONFIG.SYS
  246.  
  247.    The  AUTOEXEC.BAT  and  CONFIG.SYS  that  will  be  used  by  the  VMB  at
  248.    initialization are not the ones found in the root directory  of  the  OS/2
  249.    V2.0  boot  drive.  The  following  table  explains which AUTOEXEC.BAT and
  250.    CONFIG.SYS will be used for the different DOS  session  types  under  OS/2
  251.    V2.0.
  252.  
  253.    +------------------------------------------------------------------------+
  254.    | Table 7. Location of AUTOEXEC.BAT and CONFIG.SYS                       |
  255.    |------------------------------------------------------------------------|
  256.    | VDM Type                           | Location                          |
  257.    |                                    |                                   |
  258.    | Virtual Machine Boot from diskette | drive A:                          |
  259.    |                                    |                                   |
  260.    | Virtual Machine Boot from diskette | imbedded in diskette image file   |
  261.    | image                              | on the hard disk                  |
  262.    |                                    |                                   |
  263.    | Virtual Machine Boot from DOS boot | DOS boot partition                |
  264.    | partition                          |                                   |
  265.    |                                    |                                   |
  266.    | OS/2 V2.0 DOS emulator             | root directory of OS/2 boot drive |
  267.    +------------------------------------+-----------------------------------+
  268.  
  269.    CONFIG.SYS requires special attention for the following reasons:
  270.  
  271.    1.  Write  access  to  the  hard  disk  is denied the Virtual Machine Boot
  272.        session to preserve system integrity, since the real DOS is unaware of
  273.        OS/2 V2.0 and the other applications running.
  274.  
  275.        The OS/2 device driver FSFILTER.SYS is provided to address  the  above
  276.        problem.
  277.  
  278.    2.  HPFS partitions are not visible to the real DOS running.
  279.  
  280.        FSFILTER.SYS allows the DOS in the Virtual Machine Boot to access HPFS
  281.        files.
  282.  
  283.    3.  OS/2  V2.0  provides  its  own  mouse, EMS and XMS to each virtual DOS
  284.        machine, so there is no need to load the equivalent drivers  available
  285.        for native DOS.  Those provided with the real DOS should not be used.
  286.  
  287.        However,  some  DOS  programs  test for the presence of these drivers.
  288.        OS/2 V2.0 provides the equivalent  "stub"  drivers  to  satisfy  these
  289.        programs that the services actually are available.
  290.  
  291.        The  following  types  of  device  drivers should also be omitted from
  292.        CONFIG.SYS:
  293.  
  294.        -   Disk cache
  295.        -   Print spooler
  296.        -   RAM disk
  297.  
  298.        These facilities are already provided by OS/2 Version 2.0 and  may  be
  299.        accessed by virtual DOS machines and VMB sessions; including them with
  300.        DOS   leads   to  unnecessary  duplication,  and  may  impact  overall
  301.        DOS   leads   to  unnecessary  duplication,  and  may  impact  overall
  302.        performance.
  303.  
  304.    When the Virtual Machine Boot is started from a diskette image on the hard
  305.    disk, the real DOS sees the diskette image as drive A:.  The real drive A:
  306.    cannot be accessed.  OS/2 V2.0 provides a DOS program, FSACCESS.EXE,  that
  307.    can  be  used  from  the DOS command prompt or inserted in AUTOEXEC.BAT to
  308.    overcome this problem.
  309.  
  310.    We will cover  each  of  these  special  requirements  in  detail  in  the
  311.    following sections.
  312.  
  313.  12.2.1.1  Drive Letter Allocation and Access
  314.  
  315.    Drive  letter  allocation  and  access is one of the more complex areas of
  316.    VMB, mainly due to the automatic drive letter allocation performed by DOS,
  317.    and the limitations of earlier DOS versions. The following possible  areas
  318.    of confusion may arise for the user:
  319.  
  320.    -   If DOS is booted from an image file, it sees this image file as its A:
  321.        drive.  This prevents access to the real A:  diskette drive.  Attempts
  322.        to write to the apparent A: drive will fail.
  323.  
  324.    -   Unlike the DOS Emulation kernel provided  by  OS/2  Version  2.0,  the
  325.        "real" DOS booted by VMB cannot see or access an HPFS partition on the
  326.        hard disk.
  327.  
  328.    -   A  DOS  3.x  VDM cannot see a large (>32MB) FAT partition on the fixed
  329.        disk, or FAT partitions beyond an HPFS partition on the disk.
  330.  
  331.    -   Even if the booted DOS can otherwise see the hard disk  partition,  it
  332.        is  only given read access. Attempts to write will fail with simulated
  333.        errors such as "General failure writing  drive  C:".  The  user  might
  334.        mistake this for a genuine hardware fault.
  335.  
  336.    -   If  the  booted  DOS  loads a block device-driver, the allocated drive
  337.        letter may be the same as that of a different device outside this VDM,
  338.        thereby preventing access to that device from within the VDM.
  339.  
  340.    The results could be somewhat disorienting for the user. To  help  resolve
  341.    these  issues,  two utilities FSFILTER and FSACCESS are provided with OS/2
  342.    Version 2.0.
  343.  
  344.    It is recommended that disk volumes should always be  given  a  meaningful
  345.    name,  either  when formatting or later using the LABEL command. This name
  346.    will remain constant regardless of drive letter allocation, and  will  aid
  347.    in  identifying  a particular volume, even if the assigned drive letter is
  348.    different.
  349.  
  350.  12.2.1.2  FSFILTER
  351.  
  352.    FSFILTER.SYS  is  a  device  driver  which  manages DOS VDM access to OS/2
  353.    disks. FSFILTER.SYS should be copied from the \OS2\MDOS directory  to  the
  354.    DOS  diskette, and the following statement added to the CONFIG.SYS file of
  355.    the bootable DOS diskette or image.
  356.  
  357.      device=a:fsfilter.sys
  358.  
  359.    This statement should precede any  DEVICE=  statements  which  load  block
  360.    device drivers.
  361.  
  362.    Note  that  FSFILTER.SYS  gives  DOS  full  access to all OS/2 partitions,
  363.    regardless of their file system type or partition size.
  364.  
  365.    This is an important and somewhat surprising point. For example,  DOS  3.3
  366.    (in  a VDM) has no problem accessing a 300MB HPFS partition, once FSFILTER
  367.    is  loaded.  I/O  calls  within  the  DOS  virtual  machine   are   passed
  368.    transparently to OS/2 Version 2.0. DOS itself is unaware of the underlying
  369.    file  system.   DOS can read, write and modify files on the hard disk, and
  370.    for most configurations the drive letter mapping within  the  VMB  session
  371.    will match those of OS/2 Version 2.0.
  372.  
  373.    The  FSFILTER device driver occupies approximately 11KB of memory.  It can
  374.    be loaded into high  memory  under  DOS  5.0  by  specifying  the  command
  375.    DEVICEHIGH = FSFILTER.SYS in CONFIG.SYS.
  376.  
  377.    The  users  should  also  specify  the  path  to COMMAND.COM in the SHELL=
  378.    statement of CONFIG.SYS.  For example, if DOS files have  been  copied  to
  379.    C:\DOS,  the CONFIG.SYS file on a diskette intended for VMB should contain
  380.    the following statement:
  381.  
  382.      SHELL=c:\DOS\COMMAND.COM c:\dos /p
  383.  
  384.    The first parameter specifies the command  processor  to  be  loaded.  The
  385.    second  parameter  specifies  the reload path (that is, the COMSPEC path).
  386.    This is preferable to a SET COMSPEC = command in AUTOEXEC.BAT.
  387.  
  388.    Each block device driver loaded in DOS CONFIG.SYS is  allocated  the  next
  389.    free  OS/2 letter excluding LAN drives.  This can result in a drive letter
  390.    clash.  An example may illustrate the point. OS/2 drives are:
  391.  
  392.    A:   Diskette drive 0
  393.    B:   Diskette drive 1
  394.    C:   Hard disk
  395.    D:   External diskette drive
  396.    E:   Remote LAN drive on a server
  397.  
  398.    FSFILTER will ensure that a booted DOS  sees  these  drives  by  the  same
  399.    letter.  The booted DOS has the same access to the external diskette drive
  400.    and LAN resources as does OS/2  itself.  This  is  true  whether  the  VMB
  401.    session  is started before or after user logon to the network, when remote
  402.    drive letters are assigned.
  403.  
  404.    However, a block device driver in a VMB session will  also  initialize  as
  405.    E:,  so  LAN drive access is lost. To remedy this, issue an "fsaccess f=e"
  406.    command. The LAN drive is now accessible as F:  within the DOS session.
  407.  
  408.    Note that even when FSFILTER is loaded, the following  restrictions  still
  409.    apply:
  410.  
  411.    -   A VMB session cannot see HPFS files or directories which have:
  412.  
  413.        -   Long file names (9 or more characters)
  414.        -   Invalid FAT characters (for example, plus, comma, blank)
  415.        -   Multiple dot separators.
  416.  
  417.    -   HPFS file names containing lowercase letters are folded to uppercase.
  418.  
  419.    -   PC  DOS commands which require low-level disk access will fail.  These
  420.        include:
  421.  
  422.        -   CHKDSK
  423.        -   SYS
  424.        -   UNDELETE
  425.        -   FORMAT
  426.        -   UNFORMAT
  427.        -   MIRROR.
  428.  
  429.        In such cases OS/2 Version 2.0 will simulate a disk  error  condition.
  430.        DOS may interpret this as a hardware fault, or report that the command
  431.        is not supported on a network or assigned drive.
  432.  
  433.  12.2.1.3  FSACCESS
  434.  
  435.    FSACCESS.EXE  is  a utility supplied with OS/2 Version 2.0 but intended to
  436.    run in a VMB session. It cooperates with FSFILTER to manage drive  letters
  437.    within the VMB session. This serves three purposes:
  438.  
  439.    1.  Drives may be registered for filtering.
  440.  
  441.    2.  The  drive  letter  for  a  device  can be changed, giving consistency
  442.        across sessions.
  443.  
  444.    3.  Letters can be removed in order to hide the OS/2 device from  the  VMB
  445.        session.
  446.  
  447.    The syntax of the FSACCESS command is:
  448.  
  449.  
  450.       FSACCESS ----------------+-------------------------+-----+
  451.                                |-+---+- DOSletter -------+     |
  452.                                | | ! |                         |
  453.                                |------ DOSletter - DOSletter --+
  454.                                |                               |
  455.                                +------ DOSletter = OS2drive  --+
  456.  
  457.  
  458.  
  459.    FSACCESS          Lists the current drive mapping. For example:
  460.  
  461.                                     Local C: is mapped to OS/2 C:
  462.                                     Local D: is mapped to OS/2 D:
  463.                                     Local E: is mapped to OS/2 K:
  464.  
  465.    FSACCESS F:       Registers  DOS letter F: for filtering. References to F:
  466.                      will be sent to OS/2 Version 2.0.
  467.  
  468.    FSACCESS !F:      De-registers DOS letter F: from filtering.
  469.  
  470.    FSACCESS F:-H:    Registers DOS letters F: through H: for filtering.
  471.  
  472.    FSACCESS M:=C:    Routes requests for DOS letter M: to OS/2 drive C:
  473.  
  474.    Parameters can be combined on a single command  line,  and  the  colon  is
  475.    optional.
  476.  
  477.    When  booting  from  an  image  file,  it  is often desirable to issue the
  478.    command FSACCESS A: in order to access the A:  diskette drive.  This  will
  479.    remove  access  to  the  image  file,  so the booted DOS will be unable to
  480.    reload its COMMAND.COM when necessary.  It may be useful to copy  all  the
  481.    DOS  files  to  a subdirectory on hard disk, ensuring the PATH and COMSPEC
  482.    point there.
  483.  
  484.    An alternative is to access the diskette drive via a different letter. For
  485.    example, a user may issue the command FSACCESS G:=A, then use G: to access
  486.    the real A:   drive.   The image file remains as  A:,  avoiding  PATH  and
  487.    COMSPEC problems.
  488.  
  489.  12.2.2  Mouse, EMS and XMS Support
  490.  
  491.    The  booted DOS in a VMB session receives XMS (HIMEM), EMS, DPMI and mouse
  492.    support services from  its  VDM  environment  (assuming  the  virtual  DOS
  493.    machine  has default DOS settings).  DOS should not therefore load its own
  494.    HIMEM, EMS or mouse drivers; indeed they may cause errors in the VDM.
  495.  
  496.    DOS programs call these services via appropriate API  register  parameters
  497.    and a designated interrupt:
  498.  
  499.    Mouse     INT 33h
  500.    XMS       INT 2Fh (multiplex)
  501.    EMS       INT 67h
  502.  
  503.    These  interrupts  are  trapped by the VDM environment, routed outside the
  504.    virtual machine and handled by  the  OS/2  Version  2.0  operating  system
  505.    itself.   This may present a problem for certain programs which first test
  506.    for the presence of such services  by  issuing  an  OPEN  command  to  the
  507.    associated device driver, or which check that a valid interrupt handler is
  508.    referenced  by  the Interrupt Vector Table. When a VMB session is started,
  509.    these device driver names are not present, and the interrupt vectors point
  510.    to null handlers. The application will therefore assume that the  required
  511.    services are not useable.
  512.  
  513.    In   order  to  avoid  this  problem,  OS/2  Version  2.0  provides  three
  514.    alternative "stub" drivers:
  515.  
  516.    -   MOUSE.COM
  517.    -   HIMEM.SYS
  518.    -   EMM386.SYS
  519.  
  520.    These stub drivers are very small (and use minimal memory when loaded) but
  521.    satisfy programs which depend on drivers with such  names  being  present.
  522.    They  respond  to  OPEN  commands,  and  also set handler addresses in the
  523.    Interrupt Vector Table, thereby satisfying applications  which  check  for
  524.    the presence of the device drivers in either of these ways.
  525.  
  526.    The  user must load these OS/2 files rather than any similarly named files
  527.    which may be shipped with DOS or applications, such as:
  528.  
  529.    DOS 4.0   XMAEM.SYS, XMA2EMS.SYS
  530.  
  531.    DOS 5.0   HIMEM.SYS, EMM386.EXE, MOUSE.COM
  532.  
  533.    DR DOS    HIDOS.SYS, EMM386.SYS, EMMXMA.SYS
  534.  
  535.    Other     MOUSE.SYS
  536.  
  537.    There are two ways to achieve this. Assuming OS/2 Version 2.0 is installed
  538.    on drive E:
  539.  
  540.    1.  Copy the above OS/2 files from E:\OS2\MDOS to the  DOS  diskette,  and
  541.        edit  CONFIG.SYS and AUTOEXEC.BAT accordingly to load these files from
  542.        the A: drive.  VMDISK may then be run to create a  bootable  image  if
  543.        desired.
  544.  
  545.             device=a:himem.sys
  546.             device=a:emm386.sys
  547.             device=a:fsfilter.sys
  548.  
  549.        This method should be used if FSFILTER will be loaded into high memory
  550.        using DOS 5.0:
  551.  
  552.             device=a:himem.sys
  553.             device=a:emm386.sys
  554.             devicehigh=a:fsfilter.sys
  555.  
  556.    2.  Edit  CONFIG.SYS  and  AUTOEXEC.BAT  to load these files directly from
  557.        E:\OS2\MDOS. (FSFILTER.SYS must be loaded  first  if  the  OS/2  drive
  558.        would otherwise be inaccessible to the booted DOS).
  559.  
  560.             device=a:fsfilter.sys
  561.             device=e:\os2\mdos\himem.sys
  562.             device=e:\os2\mdos\emm386.sys
  563.  
  564.        The  second  method  has one notable advantage; if and when Corrective
  565.        Service is applied to the OS/2 Version 2.0 system, and  HIMEM,  EMM386
  566.        or MOUSE are updated, it is not necessary to update your DOS diskettes
  567.        and  recreate  image  files.   FSFILTER itself will have to be updated
  568.        manually  (unless  the  OS/2  Version  2.0    partition  is   directly
  569.        accessible to DOS and FSFILTER is also loaded from here).
  570.  
  571.    Note  that  EMS  memory  size  and  frame  location  are determined by DOS
  572.    Settings, and not by parameters on the DEVICE= statement  for  EMM386.SYS.
  573.    It is recommended that EMS and XMS support should not be configured unless
  574.    required  by  the  application  running in the VMB session, since this can
  575.    impact overall system performance.
  576.  
  577.    We now look at the three different ways to prepare  the  real  DOS  to  be
  578.    booted in the VMB.
  579.  
  580.  12.2.3  Booting from Diskette
  581.  
  582.    The  user  may  load  a  specific  version  of  DOS  or an equivalent 8086
  583.    operating system into a VMB session directly from  a bootable diskette, by
  584.    specifying A: at the value for DOS_STARTUP_DRIVE under DOS Settings.  Note
  585.    that this may affect the way in which applications in the VMB session  may
  586.    access  the  diskette drives;  see "Drive Letter Allocation and Access" in
  587.    topic 12.2.1.1 for further discussion.
  588.  
  589.    Here is an example using DOS 5:
  590.  
  591.    1.  From a system running DOS 5, format a diskette with the /s option.
  592.  
  593.    2.  Copy FSFILTER.SYS from the OS/2 V2.0 subdirectory \OS2\MDOS  onto  the
  594.        diskette.
  595.  
  596.    3.  Create CONFIG.SYS and AUTOEXEC.BAT on the diskette.
  597.  
  598.        A sample CONFIG.SYS to use is as follows (OS/2 V2.0 is installed in E:
  599.        drive in this example):
  600.  
  601.          REM Load FSFILTER driver
  602.          DEVICE=A:FSFILTER.SYS
  603.          REM load the stub XMS and EMS memory drivers from OS2.
  604.          DEVICE=E:\OS2\MDOS\HIMEM.SYS
  605.          DEVICE=E:\OS2\MDOS\EMM386.SYS
  606.  
  607.        A sample AUTOEXEC.BAT to use is as follows:
  608.  
  609.          @ECHO OFF
  610.          PROMPT $P$G
  611.          REM set the path to where the DOS files were copied
  612.          SET PATH=C:\DOS
  613.          SET COMSPEC=C:\DOS\COMMAND.COM
  614.          REM load the stub mouse driver from OS/2 V2.0
  615.          LH E:\OS2\MDOS\MOUSE
  616.  
  617.  
  618.    4.  Create a DOS subdirectory on the hard disk and copy the real DOS files
  619.        there.
  620.  
  621.    5.  Insert the DOS boot diskette in the A: drive.
  622.  
  623.    6.  Locate the Command Prompts folder.  It is usually a folder in the OS/2
  624.        System icon on the Workplace Shell.
  625.  
  626.    7.  Open the Command Prompts  folder.
  627.  
  628.    8.  Locate the DOS from drive A: icon and double click on it.
  629.  
  630.        The DOS_STARTUP_DRIVE setting of this icon is pre-set to the value A:.
  631.  
  632.    The  user cannot specify "B:" or an external diskette drive as the startup
  633.    drive.  There may be situations where it is desired to boot from a 5Ñ inch
  634.    diskette; typically the B: drive on PS/2 systems.  One way to do  this  is
  635.    by  creating  an  image  of  the  diskette,  then  booting this image (See
  636.    "Booting from Diskette Image" in topic 12.2.4).
  637.  
  638.    If a 5Ñ inch diskette must be booted directly for  some  reason,  this  is
  639.    possible  if  drive  remapping  is supported by the system (such as a PS/2
  640.    Model 57, 90 or 95). Normally A: is Drive 0 (3ç inch), and B: is  Drive  1
  641.    (5Ñ inch, if fitted).  To change this, run "Set Startup Sequence" from the
  642.    reference diskette, and ensure Drive 1 appears before Drive 0. Then the 5Ñ
  643.    inch drive will become the A: drive.
  644.  
  645.    Some  5Ñ  inch drives (such as the IBM External 1.2MB drive and associated
  646.    adapter) require a device driver, and are accessed as D: or  higher.  They
  647.    cannot be specified as a startup drive, nor can they be readdressed as A:,
  648.    but can be the source drive when creating a bootable image file.
  649.  
  650.  12.2.4  Booting from Diskette Image
  651.  
  652.    A  user  may also load a specific version of DOS or another 8086 operating
  653.    system into a VMB session from a diskette image stored on the  hard  disk.
  654.    This  is  achieved  by  specifying  the  fully  qualified  filename of the
  655.    diskette image file as the value for DOS_STARTUP_DRIVE under DOS Settings.
  656.  
  657.    Here is an example using the DOS 5  boot diskette created in the  "Booting
  658.    from Diskette" in topic 12.2.3 above:
  659.  
  660.    1.  Edit CONFIG.SYS on the diskette and add the following statement:
  661.  
  662.          E:\OS2\MDOS\FSACCESS G: = A:
  663.  
  664.    2.  Create the image of the boot diskette on the hard disk.
  665.  
  666.        Images  may  be  created  using  the VMDISK utility supplied with OS/2
  667.        Version 2.0. The syntax of the VMDISK command is:
  668.  
  669.        vmdisk <source drive> <image filename>
  670.  
  671.        For example:
  672.  
  673.          VMDISK a: c:\bootimg\dos50.vmb
  674.  
  675.        The image file is a complete binary "dump" of the diskette, consisting
  676.        of a short header record  followed  by  the  diskette's  boot  sector,
  677.        FAT(s),  and all data clusters.  Its file size corresponds to the size
  678.        of the source diskette, regardless of the  amount  of  space  actually
  679.        used  on  the  source  diskette.    No  compression  of  the  image is
  680.        performed.
  681.  
  682.        The diskette must have a standard DOS format (FAT, 512 byte  sectors).
  683.        It  is not possible to create, then boot, an image of a copy-protected
  684.        diskette which has a non-DOS format. It may be possible to boot such a
  685.        diskette directly in a VDM.
  686.  
  687.        The VMDISK utility can run under either DOS or OS/2, and supports  all
  688.        3ç    inch  (720KB,  1.44MB  and 2.88MB) and 5Ñ inch (360KB and 1.2MB)
  689.        source diskette formats.
  690.  
  691.        Note that VMDISK works one way only; it is not possible  to  create  a
  692.        diskette from a VMDISK image.
  693.  
  694.    3.  Proceed to add an icon to the OS/2 V2.0 Workplace Shell to launch VMB.
  695.        Refer  to  "Putting  the Virtual Machine Boot Session in the Workplace
  696.        Shell" in topic 12.2.6 on customizing the  Virtual  Machine  Boot,  in
  697.        particular the DOS_STARTUP_DRIVE setting.
  698.  
  699.  12.2.5  Booting from a DOS Partition
  700.  
  701.    If  VMB will be used regularly, the most convenient method may be to do so
  702.    from a DOS partition on hard disk, rather than via diskettes  or  diskette
  703.    images.    This  may  be  achieved  by  specifying  C:  as  the  value for
  704.    DOS_STARTUP_DRIVE under DOS Settings.  Loading DOS from  a  DOS  partition
  705.    proceeds  more  quickly  and  offers  the  user  a more "familiar" working
  706.    environment. It is also easier to apply DOS Corrective Service to  a  disk
  707.    partition than to diskettes or images.
  708.  
  709.    Note  that  this  method  is  different  from  that  of a single hard disk
  710.    partition with the Dual Boot feature available under previous versions  of
  711.    OS/2.
  712.  
  713.    In order to load DOS from a DOS partition, the following requirements must
  714.    be satisfied:
  715.  
  716.    1.  Boot Manager must be installed
  717.  
  718.    2.  DOS must be installed on a primary partition on the first hard disk in
  719.        the machine
  720.  
  721.    3.  OS/2  Version  2.0  must  be installed on an extended partition on the
  722.        first fixed disk, or on another hard disk.
  723.  
  724.    This will require re-partitioning on  single-drive  systems  if  the  disk
  725.    initially contains DOS alone, or earlier versions of OS/2.
  726.  
  727.    Loading  DOS  from  a DOS partition presents one significant problem.  The
  728.    DOS partition is itself bootable directly via  Boot  Manager,  should  the
  729.    user  so  choose,  and  there may a requirement to boot this DOS partition
  730.    directly on occasions.  OS/2 Version 2.0 provides stub device drivers  for
  731.    functions such as EMS, XMS and mouse support in the VMB session, and these
  732.    must  be used in place of the normal DOS device drivers when DOS is booted
  733.    in a VMB session.  Since the same CONFIG.SYS  and AUTOEXEC.BAT in  the  C:
  734.    root  directory  is  used,  the question arises of which drivers should be
  735.    specified for functions such as EMS and XMS support:
  736.  
  737.    -   If the partition is booted via VMB, the DOS drivers are inappropriate
  738.  
  739.    -   If the partition is booted directly via Boot Manager,  the  OS/2  stub
  740.        drivers are inappropriate.
  741.  
  742.    It   might   appear   that  the  user  would  have  to  maintain  multiple
  743.    configuration files and rename or copy them  depending  upon  whether  the
  744.    partition  was  being  booted  into  a  VMB  session or directly from Boot
  745.    Manager.  This is clearly unsatisfactory. Fortunately there is a  solution
  746.    which  avoids  this.  The  key  is to specify both sets of drivers, in the
  747.    correct order, in CONFIG.SYS and AUTOEXEC.BAT.
  748.  
  749.    The following example assumes:
  750.  
  751.    -   DOS 5.0 is installed on the C: Primary partition
  752.    -   OS/2 Version 2.0 is installed on the E: Extended partition
  753.  
  754.    CONFIG.SYS on the C: drive contains:
  755.  
  756.      device=c:\dos\setver.exe
  757.      device=c:\dos\himem.sys
  758.      device=c:\dos\emm386.exe noems
  759.      device=e:\os2\mdos\himem.sys
  760.      device=e:\os2\mdos\emm386.sys
  761.      dos=high,umb
  762.         ... etc ...
  763.  
  764.    When this file is processed in an OS/2 VMB session,  the  DOS  HIMEM  load
  765.    fails  as  it sees no available extended memory. EMM386.EXE cannot load as
  766.    it sees protect-mode software already running. Then, the  OS/2  HIMEM  and
  767.    EMM386 stub device drivers load as normal.
  768.  
  769.    When  this  file  is processed as part of a native DOS boot, the DOS HIMEM
  770.    and EMM386 load as normal, but the OS/2 stub device  drivers  detect  that
  771.    they are not running under OS/2 and do not load themselves.
  772.  
  773.    A similar technique works for mouse support in AUTOEXEC.BAT:
  774.  
  775.      @echo off
  776.      prompt $p$g
  777.      set path=c:\dos
  778.      set path=c:\dos
  779.      LH e:\os2\mdos\mouse
  780.      LH c:\dos\mouse
  781.         ... etc ...
  782.  
  783.    Note  that  here  the  OS/2  driver  is  listed  first.  When this file is
  784.    processed in an OS/2 VMB session, the OS/2 stub  loads  first.    The  DOS
  785.    mouse  driver  sees  that  a mouse driver is already present, and hence it
  786.    does not install itself.  When booting DOS natively, the OS/2  mouse  stub
  787.    device driver detects that it is not running under OS/2, and does not load
  788.    itself. The DOS mouse driver then loads as normal.
  789.  
  790.  12.2.6  Putting the Virtual Machine Boot Session in the Workplace Shell
  791.  
  792.    We  are  now ready to put the VMB session as an object on the OS/2 Version
  793.    2.0  Workplace Shell desktop.
  794.  
  795.    1.  Locate the Templates folder.  It is usually an icon on  the  Workplace
  796.        Shell.
  797.  
  798.    2.  Open the Templates folder.
  799.  
  800.    3.  Locate the Program icon template.
  801.  
  802.    4.  Drag the Program icon template on to the desktop.  This will cause the
  803.        Program Settings notebook to appear.
  804.  
  805.    5.  Enter an asterisk "*" in the Path and file name field.
  806.  
  807.    6.  Select the Session notebook tab.
  808.  
  809.        The Session notebook allows the user to specify the session  type  and
  810.        DOS Settings  for the VMB session.
  811.  
  812.    7.  Select  either  DOS  full screen or DOS window and then select the DOS
  813.        Settings... button.
  814.  
  815.    8.  Select the DOS_STARTUP_DRIVE list item.
  816.  
  817.        The difference between a VMB session and a "normal" VDM  is  that  the
  818.        DOS   Settings   value  of  DOS_STARTUP_DRIVE  is  set.  This  setting
  819.        determines the location of the DOS kernel to be booted.   By  default,
  820.        MVDM's  DOS  Emulation  is  loaded.    However, the user may specify a
  821.        location from which to load DOS, in which  case  the  version  of  DOS
  822.        residing at that location is loaded.
  823.  
  824.        Example values for DOS startup drive are:
  825.  
  826.        DOS Start up setting      Meaning
  827.        a:                        Boot using the diskette in drive A:
  828.        c:\bootimg\dos50.vmb      Boot using the specified DOS image file
  829.        c:                        Boot  using  the primary partition of the C:
  830.                                  drive
  831.  
  832.        The following restrictions apply:
  833.  
  834.        -   A second diskette drive (B:) or hard disk (D:) cannot be specified
  835.            as the startup drive.
  836.  
  837.        -   To boot DOS from the C: partition, Boot Manager must be installed,
  838.            and OS/2 Version 2.0 must reside in an extended partition  on  the
  839.            first  hard disk, or on another hard disk. See "Booting from a DOS
  840.            Partition" in topic 12.2.5 .
  841.  
  842.    9.  Select the Save button to save the DOS settings and return.
  843.  
  844.    10. Select the General notebook tab.
  845.  
  846.    11. Change the Title field to your own name describing the new object.
  847.  
  848.    12. Close the Settings notebook by double clicking on the system  menu  in
  849.        the upper left corner of the window.
  850.  
  851.  12.2.6.1  Other DOS Settings
  852.  
  853.    DOS  settings which control the VDM hardware environment are applicable to
  854.    the VMB session and operate in  the  same  way  as  for  a  DOS  Emulation
  855.    windowed  or  full-screen  session.    Those  which modify the virtual DOS
  856.    environment are ignored; the equivalent settings are instead determined by
  857.    the CONFIG.SYS file of the booted DOS kernel. Ignored settings include:
  858.  
  859.    -   DOS_BREAK                       -   DOS_HIGH
  860.    -   DOS_DEVICES                     -   DOS_LASTDRIVE
  861.    -   DOS_UMB                         -   DOS_VERSION
  862.    -   DOS_SHELL
  863.  
  864.    The FCB limit is the lesser of either the booted DOS, or OS/2 Version  2.0
  865.    CONFIG.SYS  value.    The  VMB  session will by default have 640KB of real
  866.    memory, mou se support, 2MB Expanded (EMS) memory, 2MB DPMI, and  2MB  XMS
  867.    memory.
  868.  
  869.  12.3  Managing the VMB Session
  870.  
  871.    The  user  may  interact  with a VMB session in a similar way to any other
  872.    virtual DOS machine.  The session may be scaled, minimized, maximized  and
  873.    switched between windowed and full-screen mode, and is subject to the same
  874.    graphics  mode limitations when windowed. However, a VMB session cannot be
  875.    ended by typing EXIT at its command prompt. The session can only be closed
  876.    from its system icon or the Window List.
  877.  
  878.    Note that Ctrl-Alt-Del will reboot the entire OS/2 Version  2.0  operating
  879.    system, not just the foreground virtual machine session.
  880.  
  881.  12.4  VMB Limitations
  882.  
  883.    VMB does not support:
  884.  
  885.    -   VCPI and other non-DPMI DOS extenders
  886.    -   I/O to disk which bypasses the file system
  887.    -   Feature adapter sharing without a virtual device driver
  888.    -   Real-time or timing-critical DOS applications
  889.    -   Some copy-protection schemes.
  890.  
  891.    These  limitations arise in the most part from the limitations of the MVDM
  892.    environment,  which  are  imposed  in  order  to  protect  overall  system
  893.    integrity.
  894.  
  895.  12.5  Summary
  896.  
  897.    The  DOS  Emulation kernel which is normally used to support the execution
  898.    of DOS applications in  a  VDM  is  exactly  what  its  name  implies;  an
  899.    emulation of the DOS operating system and associated services.  While this
  900.    suffices  for most DOS applications, certain applications exist which take
  901.    advantage of unique and/or  undocumented  features  which  exist  only  in
  902.    specific versions of DOS.
  903.  
  904.    To  allow such applications to be successfully run under OS/2 Version 2.0,
  905.    the VMB (Virtual Machine Boot) feature is provided.  This feature allows a
  906.    "real" DOS operating system, or indeed most other 8086 operating  systems,
  907.    to be booted in a virtual DOS machine.  The operating system may be booted
  908.    from  either a diskette in drive A:, a diskette image on a hard disk, or a
  909.    partition on a hard disk.
  910.  
  911.    Applications which run using Virtual Machine Boot may  take  advantage  of
  912.    the  EMS,  XMS  and mouse support provided to virtual DOS machines by OS/2
  913.    Version 2.0.   This  support  is  provided  through  stub  device  drivers
  914.    supplied  with OS/2 Version 2.0; these should be used in preference to the
  915.    device drivers supplied with the operating system or applications.
  916.  
  917.  
  918.