home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / info / faq / os2_20 / os2help / vmb.fax < prev    next >
Encoding:
Text File  |  1992-09-17  |  33.9 KB  |  756 lines

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