old-www/HOWTO/DOSEMU-HOWTO-11.html

216 lines
8.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>The dosemu HOWTO: Problems and fixes</TITLE>
<LINK HREF="DOSEMU-HOWTO-12.html" REL=next>
<LINK HREF="DOSEMU-HOWTO-10.html" REL=previous>
<LINK HREF="DOSEMU-HOWTO.html#toc11" REL=contents>
</HEAD>
<BODY>
<A HREF="DOSEMU-HOWTO-12.html">Next</A>
<A HREF="DOSEMU-HOWTO-10.html">Previous</A>
<A HREF="DOSEMU-HOWTO.html#toc11">Contents</A>
<HR>
<H2><A NAME="s11">11. Problems and fixes</A></H2>
<H2><A NAME="ss11.1">11.1 Security issues</A>
</H2>
<P>A full featured Dosemu needs to be suid root, e.g to access ports.
Most dos programs don't need this however so when running under X you
usually do not need to run dosemu as root.
Dosemu runs as suid "root" only where it is needed, and releases this right
thereafter. But with DPMI, the Dos client programm can access the whole user
space, hence also can modify the dosemu code itself. Use of the 'secure'
option in /etc/dosemu.conf disables this.
There are several other important security considerations discussed in the
Security section of the README.txt file.
<P>
<H2><A NAME="ss11.2">11.2 dosemu says "ERROR: general protection" and terminates when I run some program</A>
</H2>
<P>This will happen if your program uses DPMI and you do not have DPMI
enabled. Try changing the line
<PRE>
$_dpmi = (off)
</PRE>
in /etc/dosemu.conf to
<PRE>
$_dpmi = (nnnn)
</PRE>
where nnnn is the number of kilobytes of memory you wish to give to
the DOS program (e.g. Doom requires about 4000 kilobytes). If you do
this, you should not run dosemu as root (see the Security Issues section) -
it is better not to run dosemu as root whenever possible, in any case.
<P>Another likely cause is that your program uses VCPI (see EMUfailure.txt
for more details) or some other means of switching to protected mode
(other than DPMI), in which case it will never work under dosemu.
<P>If none of these is the case, see section 1.14 I have a program that
fails, not listed in EMUfailure.txt.
<P>
<H2><A NAME="ss11.3">11.3 Dosemu dies when booting. I have Win95 installed.</A>
</H2>
<P>Dosemu relies that the Dos-Version on the hdimage and the Drive you map
to contain command.com are the same. If not, dosemu will crash sooner or
later. With the dual boot option Win95 offers when pressing the F4,F5 and
F8 Keys with the "Starting Win95" text, versions on the Win95 drive may
swap. Take special care for command.com. Let your shell variable in
config.emu point to the correct static version of command.com, e.g.:
shell=c:\win95\command.com c:\ /P /E:1024 (97/02/28)
<P>
<P>
<H2><A NAME="ss11.4">11.4 Dosemu hangs! How can I kill it?</A>
</H2>
<P>Switch to another console and type dosdebug, then type kill (it may
take a while but will work eventually).
<P>
<H2><A NAME="ss11.5">11.5 Dosemu crashed and now I can't type anything.</A>
</H2>
<P>Daniel Barlow(jo95004@sable.ox.ac.uk) reported (95/4/8) that
<P>If you have no terminal or network access that you can use to log in,
you may have to press the reset button. If you can still get a usable
shell somehow, run "<CODE>kbd_mode -a</CODE>" to switch the keyboard out of
raw mode, and/or "<CODE>stty sane</CODE>" on the console so that you can see
what you're typing.
<P>A useful thing to do is to use a script to run dosemu, and run
"<CODE>kbd_mode -a</CODE>" automatically right after dosemu. When dosemu
crashes, the script usually will resume running, and execute the
"<CODE>kbd_mode -a</CODE>" command.
<P>
<H2><A NAME="ss11.6">11.6 I've enabled EMS memory in dosemu.conf but it does not help.</A>
</H2>
<P>Rob Janssen (rob@pe1chl.ampr.org) reported (94/7/11)
<P>Don't forget to load the provided ems.sys from the config.sys file.
<P>
<H2><A NAME="ss11.7">11.7 How do I get rid of all those annoying "disk change" messages?</A>
</H2>
<P>(94/8/11)
<P>Grab and install <CODE>klogd</CODE>. Try
<PRE>
sunsite.unc.edu:/pub/Linux/system/Daemons/sysklogd1.2.tgz
</PRE>
<P>
<H2><A NAME="ss11.8">11.8 Why won't dosemu run a second time after exiting in console mode?</A>
</H2>
<P> Aldy Hernandez (<B>aldy@sauron.cc.andrews.edu</B>) reported
(94/7/8) that
<P>You should disable your video and/or BIOS caching.
<P>
<H2><A NAME="ss11.9">11.9 Why will dosemu run in a term but not in the console?</A>
</H2>
<P>JyiJiin Luo (<B>jjluo@casbah.acns.nwu.edu</B>) reported (94/4/19)
that
<P>I experienced exactly the same problem before. I figured out all the
video shadow in my AMI BIOS must be disabled. Now dosemu runs fine on
my system.
<P>
<H2><A NAME="ss11.10">11.10 How can I speed up dosemu?</A>
</H2>
<P>In some cases it is useful to play with the value of the
<CODE>HogThreshold</CODE> variable in your <CODE>dosemu.conf</CODE> file.
<P>
<P>Daniel Barlow(<B>jo95004@sable.ox.ac.uk</B>) reported (95/4/8) that
<P>HogThreshold should now be set to approximately half of the BogoMips
value that the system reports on boot.
<P>
<P>
<H2><A NAME="ss11.11">11.11 My CDROM drive has problems reading some files under dosemu.</A>
</H2>
<P>Vinod G Kulkarni (<B>vinod@cse.iitb.ernet.in</B>) reported
(94/4/7) that
<P>When a CDROM is mounted from linux and used from within dosemu (mapped
drive), there could be some problems. The CD-ROM driver (iso9660) in
the kernel tries to find out the type of the file (i.e. binary or
text). If it can't find, it tries to guess the type of the file using
a heuristic. This heuristic fails under some circumstances when a
(almost) text file is to be treated as binary. (I do not know if it
is a bug or feature.)
<P>The result of this is that if you copy such a file from CD-ROM (from
linux itself, and not necessarily dosemu), the resulting file will be
usually bigger than original file. (Blanks get added before
<CODE>^J</CODE>,<CODE>^M</CODE>.) So a program running in dosemu gives an error or
hangs, which may be mistaken as problem of dosemu.
<P>
<P>Rob Janssen (<B>pe1chl@rabo.nl</B>) reported (94/8/10) that
<P>The way to solve this is to turn off conversion altogether. Pass the
option "<B>-o conv=binary</B>" to the mount command mounting the
CD-ROM, or use the following in <B>/etc/fstab</B>:
<PRE>
/dev/cdrom /cdrom iso9660 conv=binary,ro
</PRE>
No patches to the kernel are necessary.
<P>
<H2><A NAME="ss11.12">11.12 How do I see debugging output?</A>
</H2>
<P>Daniel Barlow(<B>jo95004@sable.ox.ac.uk</B>) reported (95/4/8) that
<P>As of dosemu 0.60, debugging output is redirected to a file specified
on the command line. Use "<B>dos -D+a -o /tmp/debug</B>" to log all
debug output to <B>/tmp/debug</B>. There should no longer be any
need to redirect <CODE>stderr</CODE>.
<P>
<P>
<H2><A NAME="ss11.13">11.13 Why are my keystrokes echoed ttwwiiccee??</A>
</H2>
<P>Nick Holloway (<B>alfie@dcs.warwick.ac.uk</B>) reported (94/2/22)
that
<P>After running dos after playing with some stty settings, I was getting
doubled key presses. I can now reveal what the reason is!
<P>It only happens when dos is run on the console with 'istrip' set. This is
(I think) because the raw scancodes are mutilated by the 'istrip',
so that key release events look like key press events.
<P>So, the input processing needs to be turned off when using the scan
codes on a console (it wouldn't be a good idea to do it for tty lines).
<P>
<H2><A NAME="ss11.14">11.14 Dosemu scrambles my screen?</A>
</H2>
<P> For those graphics cards not fully supported in dosemu, with allowed
console graphics a dosemu crash may leave your console in a scrambles and
nearly unusable way. To prepare for that situation, Spudgun
&lt;spudgun@earthlight.co.nz&gt; posted the following solution. First save your
registers when running on the console
~&gt; cat /usr/bin/savetextmode
~&gt; restoretextmode -w /etc/textregs
~&gt; restorefont -w /etc/fontdata
Then, when a crash happened, run following script:
restoretextmode -r /etc/textregs
restorefont -r /etc/fontdata
restorepalette
<P><B>If it doesn't fix it nothing will</B>
I also found having an X server running sometimes put my Vid card's
registers into a strange state where this script made things worse
I think since changing X servers and/or running savetextmode on a vt while X
was running helped. (97/04/08)
<P>
<H2><A NAME="ss11.15">11.15 MS FoxPro 2.6 won't run</A>
</H2>
<P>FoxPro 2.6 doesn't run on network drives. Alexey Naidyonov
&lt;growler@growler.tsu.tula.ru&gt; states on that problem:
And I guess your FoxPro files are on lredir'ed disk, yeah? The matter is that
FoxPro doesn't run on such disk, but when I said disk { partition ... } in
/etc/dosemu/conf, it runs.
<P>
<P>
<HR>
<A HREF="DOSEMU-HOWTO-12.html">Next</A>
<A HREF="DOSEMU-HOWTO-10.html">Previous</A>
<A HREF="DOSEMU-HOWTO.html#toc11">Contents</A>
</BODY>
</HTML>