"Fossies" - the Fresh Open Source Software Archive
Member "pcemu/programs/lredir.readme" (22 Jan 2001, 4922 Bytes) of package /linux/privat/old/pcemu-1.2.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard
) with prefixed line numbers.
Alternatively you can here view
the uninterpreted source code file.
1 From Tim Bird (Tim_R_Bird@Novell.COM) :
2 (altered slightly by DH - changed 'LINUX\FS' to 'PCEMU\FS')
4 LREDIR is a general purpose DOS redirection utility, specifically
5 implemented for use with the Linux DOS emulator DOSEMU.
7 In general, DOSEMU provides emulation of a DOS disk redirector via the
8 MFS (Mach File System) module of the emulator. This support was originally
9 derived from the redirector for the DOS emulator for Mach.
11 DOS supports installable file systems by issueing callouts to a "redirector"
12 on any functions it receives for files or drives that are registered
13 with it as being non-local. The installable file system support is intended
14 mainly for use by CD-ROM drivers and network clients, so that these file
15 systems may be presented to the DOS user as additional drives. In DOSEMU,
16 MFS uses this mechanism to present a section of the Linux file system to
17 the DOS which is running in the emulator. This means that any subtree in
18 the Linux file system may be redirected and designated as a drive letter
19 under DOS for use in the emulator.
21 In order for DOS to use redirected drives, it must be configured for
22 additional drives. This is done by putting a "LASTDRIVE=Z" statement in
23 the CONFIG.SYS that is used by the emulator upon loading DOS. You can set
24 the LASTDRIVE to any letter of the alphabet. The default is F if none is
25 specified, which means that DOS can only use letters A-F for drives. The
26 example above configures all possible drive letters, A through Z, to be
27 available for use by DOS (and is what I recommend). There is a slight
28 memory penalty for configuring this many drives (about 1K of the
29 conventional memory inside the emulator).
31 To use LREDIR, MFS must first have been enabled using EMUFS.SYS. To do
32 this, load EMUFS.SYS in your CONFIG.SYS, with a line like:
34 device=C:\EMUFS.SYS /usr/src
36 This will initialize the MFS redirector, and create one redirection
37 automatically on the first available drive letter (usually D:). Although
38 EMUFS.SYS can be loaded multiple times to get additional drives, I
39 recommend that you only load it once, and use LREDIR to redirect more
40 drives to other places in the Linux file system as needed.
42 LREDIR can be used to create new redirections, get a list of the current
43 redirections, or to delete a redirection. To create a new redirection,
44 specify the drive letter to use, and the Linux file system path which
45 will become the root of that drive. Since LREDIR is a general-purpose
46 redirection utility, it has a generic syntax which allows it to be used
47 with other redirectors besides MFS (like the NetWare Lite client, or
48 DOS VLM NetWare client). The syntax is:
50 LREDIR drive: server\volume\path
52 For use with the Linux file system, we use PCEMU as the server name,
53 FS as the volume name, and then specify a path from the root of the
54 Linux file system as the location to redirect the drive to. For example:
56 LREDIR F: PCEMU\FS\USR\SRC
58 would create a new redirection for drive F:, where the contents of
59 /usr/src would appear at the root of drive F:. Note that this establishes
60 a root for drive F: which will be enforced by DOS. ie, drive F: cannot
61 be used to access files in /usr or /usr/bin, because those Linux directories
62 are not in the subtree under /usr/src.
64 LREDIR allows you to redirect any drive available to DOS, including one
65 that is currently a physical drive. This means that you can replace one of
66 your startup drives with a redirection. When you delete the redirection,
67 the physical drive will become visible again. This can be used so that
68 the boot diskimage disappears, and is replaced by the mounted MSDOS
69 file system in Linux, with the drive letter and root the same as before
70 Linux was installed. For example on my system, I have a partition
71 with a DOS file system on it. If I boot my machine with a DOS boot
72 diskette, this partition is my C: drive in DOS. When I boot Linux, I mount
73 this partition, using the msdos file system type, at location /dos/cdrive.
75 For this to work right, you actually need two AUTOEXEC.BAT files, one on
76 the boot diskimage, and one in the directory that will become the root
77 of the redirected drive.
79 In the AUTOEXEC.BAT in the boot diskimage I put the line:
81 LREDIR C: PCEMU\FS\DOS\CDRIVE
83 and when DOS runs in DOSEMU, it redirects drive C: to be replaced with
84 the drive C: I booted from. Also, parsing of the AUTOEXEC.BAT file
85 will continue with the AUTOEXEC.BAT (if any) on the redirected drive.
87 People who use LREDIR in this way should be careful because COMMAND.COM
88 will continue parsing the AUTOEXEC.BAT from the redirected drive at the
89 same file offset where it left off in the AUTOEXEC.BAT on the original
90 C: drive. For this reason, it is best to have the LREDIR command on the
91 first line of the original (diskimage) AUTOEXEC.BAT, and have the line
92 be identical in the AUTOEXEC.BAT on the redirected drive. Is this clear
93 as mud?