% Linux Installation and Getting Started    -*- TeX -*-
% msdos.tex
% Copyright (c) 1992, 1993 by Matt Welsh <mdw@sunsite.unc.edu>
%
% This file is freely redistributable, but you must preserve this copyright 
% notice on all copies, and it must be distributed only as part of "Linux 
% Installation and Getting Started". This file's use is covered by the 
% copyright for the entire document, in the file "copyright.tex".

\section{Accessing MS-DOS Files}
\label{sec-msdos-mount}
\index{MS-DOS!accessing files from}
\index{files!MS-DOS}
If, for some twisted and bizarre reason, you would have need to access
files from MS-DOS, it's quite easily done under Linux.

\index{MS-DOS!mounting partion under Linux}
\index{mount@{\tt mount}!to mount MS-DOS partition}
The usual way to access MS-DOS files is to mount an MS-DOS partition or
floppy under Linux, allowing you to access the files directly through the
filesystem. For example, if you have an MS-DOS floppy in 
{\tt /dev/fd0}, the command
\begin{tscreen}
\# {\em mount -t msdos /dev/fd0 /mnt}
\end{tscreen}
will mount it under {\tt /mnt}. See Section~\ref{sec-floppy} for more
information on mounting floppies.

You can also mount an MS-DOS partition of your hard drive for access
under Linux. If you have an MS-DOS partition on {\tt /dev/hda1}, the
command
\begin{tscreen}
\# {\em mount -t msdos /dev/hda1 /mnt}
\end{tscreen}
will mount it. Be sure to {\tt umount} the partition when you're done
using it. You can have your MS-DOS partitions automatically mounted
at boot time if you include entries for them in {\tt /etc/fstab}; 
see Section~\ref{sec-manage-fs} for details. For example, the following
line in {\tt /etc/fstab} will mount an MS-DOS partition on {\tt /dev/hda1}
on the directory {\tt /dos}. 
\begin{tscreen}
/dev/hda1\ \ \ \ \ /dos\ \ \ \ \ msdos \ \ \ \ \ defaults
\end{tscreen}

\index{MS-DOS!using Mtools to access files}
The {\tt Mtools} software may also be used to access MS-DOS files.
For example, the commands {\tt mcd}, {\tt mdir}, and {\tt mcopy} all
behave as their MS-DOS counterparts. If you installed {\tt Mtools},
there should be man pages available for these commands. 

\index{MS-DOS!running programs from Linux}
\index{MS-DOS!emulator}
Accessing MS-DOS files is one thing; running MS-DOS programs from 
Linux is another. There is an MS-DOS Emulator under development for
Linux; it is widely available, and even distributed with SLS. It can
be retrieved from a number of locations, including the various
Linux FTP sites (see Appendix~\ref{app-ftp} for details). The MS-DOS 
Emulator is reportedly powerful enough to run a number of applications,
including Wordperfect, from Linux. However, Linux and MS-DOS are vastly
different operating systems. The power of any MS-DOS emulator under
UNIX is somewhat limited.

\index{Microsoft Windows!emulator}
In addition, work is underway on a Microsoft Windows emulator to run
under X~Windows. Watch the newsgroups and FTP sites for more information.
