Linux MS DOS discussions
 help / color / mirror / Atom feed
* Drives directory
@ 2007-06-17 11:51 Jan Willem Stumpel
  2007-06-17 15:51 ` Bart Oldeman
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Willem Stumpel @ 2007-06-17 11:51 UTC (permalink / raw)
  To: dosemu

After a fresh install of dosemu 1.4 (I used the Debian package)
there is a directory ~/.dosemu/drives which contains

lrwxrwxrwx 1 jws users   25 2007-06-17 10:54 c ->
/home/jws/.dosemu/drive_c
lrwxrwxrwx 1 jws users   23 2007-06-17 10:54 d ->
/usr/lib/dosemu/drive_z

(I suppose in the .rpm version the link "d" would point at
/usr/share/dosemu/drive_z).

What do these links do? After starting dosemu, the D: drive is
$HOME, not /usr/lib/dosemu/drive_z (which is Z:). It must be the
AUTOEXEC.BAT in ~/.dosemu/drive_c that does this, but why? And how
does it work?

Regards, Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Drives directory
  2007-06-17 11:51 Drives directory Jan Willem Stumpel
@ 2007-06-17 15:51 ` Bart Oldeman
  2007-06-17 18:05   ` Jan Willem Stumpel
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Oldeman @ 2007-06-17 15:51 UTC (permalink / raw)
  To: Jan Willem Stumpel; +Cc: dosemu

On 6/17/07, Jan Willem Stumpel <jstumpel@planet.nl> wrote:
> After a fresh install of dosemu 1.4 (I used the Debian package)
> there is a directory ~/.dosemu/drives which contains
>
> lrwxrwxrwx 1 jws users   25 2007-06-17 10:54 c ->
> /home/jws/.dosemu/drive_c
> lrwxrwxrwx 1 jws users   23 2007-06-17 10:54 d ->
> /usr/lib/dosemu/drive_z
>
> (I suppose in the .rpm version the link "d" would point at
> /usr/share/dosemu/drive_z).

Yes

> What do these links do? After starting dosemu, the D: drive is
> $HOME, not /usr/lib/dosemu/drive_z (which is Z:). It must be the
> AUTOEXEC.BAT in ~/.dosemu/drive_c that does this, but why? And how
> does it work?

CONFIG.SYS cannot see drive Z: yet (a DOS limitation: DOS just assigns
C:, D:, etc) so it temporarily uses drive D: instead to access the
relevant files (ems.sys, lredir.exe, etc). Then the lredir command is
used in config.sys and autoexec.bat to set the drives to what you see
after starting dosemu. D: is set to $HOME because it was there in
1.2.x too.

Bart

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Drives directory
  2007-06-17 15:51 ` Bart Oldeman
@ 2007-06-17 18:05   ` Jan Willem Stumpel
  2007-06-18 13:57     ` Some further questions about booting Jan Willem Stumpel
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Willem Stumpel @ 2007-06-17 18:05 UTC (permalink / raw)
  To: dosemu

Bart Oldeman wrote:

> CONFIG.SYS cannot see drive Z: yet (a DOS limitation: DOS just
> assigns C:, D:, etc) so it temporarily uses drive D: instead to
> access the relevant files (ems.sys, lredir.exe, etc). Then the
> lredir command is used in config.sys and autoexec.bat to set
> the drives to what you see after starting dosemu. D: is set to
> $HOME because it was there in 1.2.x too.

Thanks.. this explains a lot. BTW my DOS knowledge must be getting
rusty. I always thought the LASTDRIVE=Z statement in CONFIG.SYS
was supposed to take care of that. But, yes, I tried it now and it
doesn't. Must read up on it..

Regards, Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Some further questions about booting
  2007-06-17 18:05   ` Jan Willem Stumpel
@ 2007-06-18 13:57     ` Jan Willem Stumpel
  2007-06-23 21:34       ` Bart Oldeman
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Willem Stumpel @ 2007-06-18 13:57 UTC (permalink / raw)
  To: dosemu

Sorry to ask one more question about this... I want to have some
good understanding of these things in order to modernise my
"Dosemu for dummies" page.

With a default .deb or .rpm install of 1.4, I can make the C:
drive equal to the existing C: drive of a previous installation of
dosemu. Say my previous version's C: drive is $HOME/olddos. Then I
can do either

1) create a $HOME/.dosemurc file with a line in it
   $_hdimage = "$HOME/olddos"

2) go to $HOME/.dosemu/drives and do
   ln -nsf $HOME/olddos c

3) go to $HOME/.dosemu and do
   mv drive_c drive_c.orig
   ln -nsf $HOME/olddos drive_c

(BTW which of these 3 methods would be the best?)

This works OK. This I understand, because the "olddos" from my
existing installation is a "pseudo-C:" drive with the proper "boot
files" in it (msdos.sys, io.sys, command.com, or in the case of
freedos: kernel.sys and command.com).

But what I do not understand is how the original C: drive (just
after a fresh install), namely $HOME/.dosemu/drive_c, could work.
It does not contain the .sys files that a DOS boot disk should
have. Just AUTOEXEC and CONFIG. So how can it boot?

Regards, Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Some further questions about booting
  2007-06-18 13:57     ` Some further questions about booting Jan Willem Stumpel
@ 2007-06-23 21:34       ` Bart Oldeman
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Oldeman @ 2007-06-23 21:34 UTC (permalink / raw)
  To: Jan Willem Stumpel; +Cc: dosemu

On 6/18/07, Jan Willem Stumpel <jstumpel@planet.nl> wrote:

> 1) create a $HOME/.dosemurc file with a line in it
>    $_hdimage = "$HOME/olddos"
>
> 2) go to $HOME/.dosemu/drives and do
>    ln -nsf $HOME/olddos c
>
> 3) go to $HOME/.dosemu and do
>    mv drive_c drive_c.orig
>    ln -nsf $HOME/olddos drive_c
>
> (BTW which of these 3 methods would be the best?)

It doesn't really matter in the end. 2) is what "dosemu -install"
does, since it avoids needing to edit the user's .dosemurc.

> But what I do not understand is how the original C: drive (just
> after a fresh install), namely $HOME/.dosemu/drive_c, could work.
> It does not contain the .sys files that a DOS boot disk should
> have. Just AUTOEXEC and CONFIG. So how can it boot?

It's magic :) If dosemu can't find a kernel in C:\ it'll fall back on
the kernel.sys that is installed in $DOSEMU_LIB_DIR/drive_z, loads it
into DOS memory and executes it.

Bart

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-23 21:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-17 11:51 Drives directory Jan Willem Stumpel
2007-06-17 15:51 ` Bart Oldeman
2007-06-17 18:05   ` Jan Willem Stumpel
2007-06-18 13:57     ` Some further questions about booting Jan Willem Stumpel
2007-06-23 21:34       ` Bart Oldeman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox