Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Installation

...


Code Block
apt-get install dosemu

...

Starting DOSEmu


Code Block
> dosemu

Configuring

...

Configuration Files

DOSEmu will create a hidden folder under the home directory of the user.

...

The boot.log is your logfile!

Mounting a Drive

You can mount a folder as a drive in dosemu but updating the autoexec.bat file and adding the following:

lredir g: linux\fs\media\psf\Home\dev\dosemu


vi ~/.dosemu/drive_c/autoexec.bat

Code Block
@echo off^M
rem autoexec.bat for DOSEMU + FreeDOS^M
path z:\bin;z:\gnu;z:\dosemu^M
set HELPPATH=z:\help^M
set TEMP=c:\tmp^M
blaster^M
prompt $P$G^M
unix -s DOSDRIVE_D^M
if "%DOSDRIVE_D%" == "" goto nodrived^M
lredir del d: > nul^M
lredir d: linux\fs%DOSDRIVE_D%^M
:nodrived^M
rem uncomment to load another bitmap font^M
rem loadhi display con=(vga,437,2)^M
rem mode con codepage prepare=((850) z:\cpi\ega.cpx)^M
rem mode con codepage select 850^M
rem chcp 850^M
rem lredir e: linux\fs/media/cdrom c^M
lredir g: linux\fs\media\psf\Home\dev\dosemu^M
unix -s DOSEMU_VERSION^M
echo "Welcome to dosemu %DOSEMU_VERSION%!"^M
unix -e^M


Restricting a User

TODO: What does restricting a user mean?

> sudo vi /etc/dosemu/dosemu.users

...

> sudo sysctl -w vm.mmap_min_addr=0


Debuging Errors

If we experience an error, we can look in dosemu's boot.log file. This file is located in ~/.dosemu.

Looking at the log file, you should pay special attention to all WARNING and ERROR log entries.


For Example, in the following log file you would notice the WARN entries:

Code Block
DOSEMU-1.4.0.8 is coming up on Linux version 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64
Compiled with GCC version 4.9.2 -m64
WARN: vm86plus service not available in your kernel
WARN: using CPU emulation for vm86()
CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K))
CONF: reserving 48Kb at 0xF4000 for 'r' (Dosemu reserved area)
CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)
CONF: reserving 8256Kb at 0x100000 for 'x' (Extended memory (HMA+XMS))
Registering HWRAM, type=e base=0x419b3000 size=0x400000
CONF: reserving 4096Kb at 0x419B3000 for 'e' (VGAEMU LFB)
CONF: reserving 12Kb at 0xC0000 for 'V' (VGAEMU Video BIOS)
SERIAL $Id$
CONF: detected layout is "us"
CONF: detected alternate layout: auto
CONF: reserving 16Kb at 0xE4000 for 'E' (EMS page frame)
CONF: reserving 16Kb at 0xE8000 for 'E' (EMS page frame)
CONF: reserving 16Kb at 0xEC000 for 'E' (EMS page frame)
CONF: reserving 16Kb at 0xF0000 for 'E' (EMS page frame)
CONF: reserving 132Kb at 0xC3000 for 'U' (Upper Memory Block (UMB, XMS 3.0))
TIME: using 9154 usec for updating ALRM timer
======================= ENTER CPU-EMU ===============

*       Fault out of DOSEMU code, cs:eip=33:4a6724, cr2=11cf, fault_cnt=1
ERROR: EMU86: error 96
leavedos(e_vm86|1210) called - shutting down
======================= LEAVE CPU-EMU ===============


From this log file, we can see the following 2 warnings:

WARN: vm86plus service not available in your kernel
WARN: using CPU emulation for vm86()


Googling this warning results in the following conclusion:

Some Linux Distributions also disabled VM86 syscall in their kernel versions, so you need to build your own kernel that enables this important functionality.

https://github.com/leecher1337/ntvdmx64/issues/49

We will need to find a linux which has VM86 enabled in order to run this application.


Commands


CommandDescription Example
lredirMount a folder as a drive
lredir d: linux\fs\${home}

...