Drives directory
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
Quoted 10 lines · Jan Willem Stumpel
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
Quoted 4 lines
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
Quoted 6 lines · Bart Oldeman
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
Some further questions about booting
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
Re: Some further questions about booting
Quoted 11 lines · Jan Willem Stumpel
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 c3) go to $HOME/.dosemu and do
mvdrive_cdrive_c.orig
ln -nsf $HOME/olddosdrive_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.
Quoted 4 lines
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