OSDAVMB - CREATING A DOS IMAGE FILE FOR VIRTUAL MACHINE BOOT (VMB) ALL OS/2 RELEASES 01/12/96 ======================================================================= Creating a DOS Image File for Virtual Machine Boot (VMB) All OS/2 Releases ======================================================================= Please Read Entire Document for Full Explanation of Procedures -------------------------------------------------------------- DESCRIPTION Some DOS applications and networks that do not run in a DOS session (sometimes referred to as "virtual DOS machine" or "VDM"), will run under a specific DOS version ("native DOS"). This document describes how to create a DOS image file to use for starting native DOS under OS/2 (referred to as "virtual machine boot" or "VMB"). RESOLUTION PART 1: STANDARD VMB GENERAL GUIDELINES Creating a VMB Diskette ----------------------- Note: Make sure you have a backup of any file you intend to change. Each image file you create equals the size of the diskette you use; for example, 360KB, 720KB, or 1.44MB. To create a VMB diskette: 1. From a DOS Startup Diskette: a. In drive A, insert a DOS startup diskette that includes the FORMAT.COM file from native DOS. b. Turn on the computer, or press Ctrl+Alt+Del if it is already on. c. Type FORMAT A: /S and press Enter. When you see the "Press any key" message, insert a blank diskette for the VMB in drive A, and press Enter. COMMAND.COM is now on this diskette. Go to step 3. 2. From Native DOS: a. Start the computer. b. Insert a blank formatted diskette for the VMB in drive A. c. At the command prompt of the DOS root directory, type SYS A: and press Enter. COMMAND.COM is now on the diskette. Go to step 3. 3. Insert the VMB diskette in drive A and restart the computer. If it starts correctly, continue with the following; otherwise, retry the previous steps. Note: After creating a VMB diskette, you can start from: * DOS from Drive A: (from Command Prompts in the OS/2 System folder), or * VMB Image on the Desktop Use the following instructions to create the VMB. Make sure it is running before you customize the VMB image. You can then add other device drivers, native DOS files, and statements in the CONFIG.SYS file and AUTOEXEC.BAT file specific to your application, network, and so on. You have to create several VMBs for each program that has special requirements. 4. Start your system in OS/2 and copy the following files from the OS2\MDOS directory to the VMB diskette: ANSI.SYS FSFILTER.SYS FSACCESS.EXE EMM386.SYS HIMEM.SYS LPTDD.SYS MOUSE.COM You can add any number of native DOS files to this diskette, but not until the VMB is running. Creating the VMB Image ---------------------- You can create the VMB image using either of the options described below. Each time you install a new version of OS/2 or a Service Pak, you need to update the IMAGE with the current version of the files from the OS2\MDOS directory listed in step 4 above. OPTION A: You can read or write to drive A, but you cannot change the AUTOEXEC.BAT or CONFIG.SYS file, or add files directly to the VMB image file on the hard disk. Note: Use a text editor to create files. 1. On the VMB diskette, create the following CONFIG.SYS file: DEVICE=HIMEM.SYS DEVICE=EMM386.SYS DOS=HIGH,UMB DEVICE=FSFILTER.SYS DEVICE=ANSI.SYS DEVICE=LPTDD.SYS FILES=40 BUFFERS=30 LASTDRIVE=Z 2. On the VMB diskette, create the following AUTOEXEC.BAT file: ECHO OFF PROMPT $P$G SET COMSPEC=C:\VMB\COMMAND.COM MOUSE.COM PATH C:\;C:\VMB C: CD\VMB VMB.BAT 3. At the C:\ prompt, type MD VMB and press Enter to create the VMB directory. 4. In the C:\VMB directory, create the batch file, VMB.BAT, consisting of the following commands: C:\OS2\MDOS\FSACCESS A: CD\ This file lets you read and write to drive A; otherwise, a DIR on drive A displays the image files. 5. Copy COMMAND.COM from the VMB diskette to the VMB directory. 6. At the C:\VMB prompt, type VMDISK A: DOS.IMG and press Enter. This creates an image of the diskette you created. The image file is DOS.IMG and is in the C:\VMB directory. 7. When finished, remove and store the diskette; then return to the Desktop. OPTION B: You can read and write to a drive other than drive A; for example, drive M. You can change the AUTOEXEC.BAT and CONFIG.SYS files, and add files directly to the VMB image file on the hard disk. Note: Use a text editor to create files. 1. On the VMB diskette, create the following AUTOEXEC.BAT file: ECHO OFF PROMPT $P$G MOUSE.COM PATH C:\;C:\VMB FSACCESS M=A C: CD\VMB Note: If you start DOS from an Image File, you cannot use physical drive A until you release the Image File. FSACCESS M=A releases drive A and assigns "M" to physical drive A. You can select another logical drive in its place. This process allows DOS applications to read and write to physical drive A, which is logical drive M. When retrieving or saving a file in physical drive A, rename the application's drive destination to M instead of A. LAN USERS: Do not use FSACCESS Z=A if your LAN assigns logical drive Z as the network drive. 2. On the VMB diskette, create the following CONFIG.SYS file: DEVICE=HIMEM.SYS DEVICE=EMM386.SYS DOS=HIGH,UMB DEVICE=FSFILTER.SYS DEVICE=ANSI.SYS DEVICE=LPTDD.SYS FILES=40 BUFFERS=30 LASTDRIVE=Z Note: Assigning LASTDRIVE=Z for VMB purposes allows the FSACCESS in step 1 to assign "M" to drive A. 3. At the C:\ prompt, type MD VMB and press Enter to create the VMB directory for the VMB image. 4. Copy COMMAND.COM from the VMB diskette to the VMB directory. At C:\VMB, type VMDISK A: DOS.IMG and press Enter. This creates an image of the diskette. The Image File is named DOS.IMG and is in the C:\VMB directory. 5. Remove the diskette and return to the Desktop. Creating a VMB Desktop Icon --------------------------- To create a VMB Desktop icon: 1. Select OS/2 System. 2. Select Command Prompts. 3. Move the mouse pointer to the DOS Full Screen icon. Press and hold Ctrl+MB2 (mouse button 2) and drag the icon to the Desktop; then release Ctrl+MB2. 4. Close Command Prompts and OS/2 System. 5. Change the DOS settings for the VMB icon: a. Select the icon created above. b. Press mouse button 2 to display the menu. c. Select Settings to open the Settings notebook. d. Select Session. e. Select DOS Settings. f. Change the following settings: EMS_MEMORY_LIMIT to (Default is 2048) DOS_UMB to ON DOS_HIGH to ON DOS_STARTUP_DRIVE to C:\VMB\DOS.IMG XMS_MEMORY_LIMIT to (Default is 2048--minimum) g. Use the following settings for applications that use DOS Protected Mode Interface (DPMI): DPMI_MEMORY_LIMIT to 4 (Minimum requirement) DPMI_DOS_API to ENABLE Note: There might be other settings you want to change, but don't make them until the VMB is running. 6. Select Save. 7. Select General and change the Title field to VMB or the name you want to call your Desktop icon. 8. Close the window. 9. Select the new DOS VMB Desktop icon. 10. To exit the VMB from within the VMB, create the batch file, X.BAT (containing the following line) in the VMB directory: C:\OS2\MDOS\EXIT_VDM 11. Save the file. 12. Type X at the command prompt. Note: If you have problems with the preceding steps, check all of your file and directory names, especially those for the DOS settings. If you need help: 1. Open Master Help Index. 2. Select Search Topics. 3. Type Starting from an Image File in the entry field. 4. Scroll to the DOS section. 5. Select Starting from an Image File and read the information. PART 2. MULTI-BOOT VMB GENERAL GUIDELINES Creating Multi-Boot VMB CONFIG.SYS and AUTOEXEC.BAT Files --------------------------------------------------------- The Multi-Boot VMB is for systems with the Boot Manager setup: DOS Version 6.0 or later in the C partition and OS/2 in a different partition. Create the following AUTOEXEC.BAT and CONFIG.SYS files in the root directory of the C (DOS) partition. Note: Use a text editor to create files. Replace the < > symbols around "Menu," "Normal," and "OS2" with brackets [ ]. These characters are misinterpreted because of the way the files are stored on the IBM LAN. Note: Use the following instructions to create the VMB. Make sure it is running before you add other files, drivers, and statements for your specific applications, networks, and so on. AUTOEXEC.BAT File: @ECHO OFF PROMPT $p$g GOTO %CONFIG% :NORMAL C:\DOS\SMARTDRV.EXE PATH C:\DOS SET TEMP=C:\DOS LH C:\DOS\MOUSE.COM LH C:\DOS\DOSKEY GOTO END :OS2 SET COMSPEC=C:\DOS\COMMAND.COM PATH C:\;C:\DOS; LH DOSKEY LH D:\OS2\MDOS\MOUSE.COM GOTO END :END CONFIG.SYS File: