delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/03/03:28:59

Date: Tue, 3 Jun 1997 03:22:54 -0400 (EDT)
From: "Mike A. Harris" <mharris AT blackwidow DOT saultc DOT on DOT ca>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp AT delorie DOT com
Subject: Re: Exclusive access to drive
In-Reply-To: <Pine.SUN.3.91.970603092431.29063G-100000@is>
Message-ID: <Pine.LNX.3.95.970603030911.3019B-100000@capslock.com>
Organization: Total disorganization.
MIME-Version: 1.0

On Tue, 3 Jun 1997, Eli Zaretskii wrote:

> > 1) CHKDSK is WRITTEN specifically to work WITH W95, by
> > syncronizing with 95's internal drive caching, etc and locks
> > parts of the disk.
> 
> If so, it should also run and do the same from a DJGPP program.  And btw, 
> the person who started this thread said that they tried to lock the disk 
> before launching CHKDSK, to no avail.

Hmmm.  Where do you think the problem lies then?  CHKDSK? or
DJGPP, or DPMI?  I don't have anything handy to actually do solid
testing with....
 
> > 2) CHKDSK or W95 is broken and will eventually trash your disk.
> 
> If so, this could also happen when you run it from the DOS box.

Ok, well then it must be in the DPMI code or in DJGPP no?
 
> > If CHKDSK runs in W95 it is either broken, or it is specifically
> > designed to do so.  If it doesn't run from within a DJGPP app,
> > then Windows is either protecting it for some reason (probably a
> > very valid one) or else it or windows has a problem with the fact
> > that a DPMI program is running it, or the DPMI program has a
> > problem with it itself.
> 
> My problem is exactly these ``or''s: I don't understand what is it that 
> Windows could want to protect itself from that doesn't exist when you run 
> CHKDSK from COMMAND.COM in a DOS box.  And I don't buy the assumption 
> that CHKDSK is broken, not when we are talking about v7 of the OS 
> (although this might happen, of course).

I agree.  It must be in DJGPP or DPMI then.  Nonetheless I still
feel a strong bias against any software that writes directly to
the HD under a multitasking OS. (Including running it by clicking
on an icon, running out of DOS box, or anything else.)  Very
dangerous IMHO and I've seen lots of people lose their drives
with NDD and Speedisk under W3.1 & W95.
 
> > See above.  Running any program that accesses the RAW hard disk
> > in WRITE mode under a multitasking operating system - wether the
> > program was written for it or not, and you are asking for
> > trouble.
> 
> When you run CHKDSK without the /F switch, it's not a READ-ONLY mode, so 
> nothing bad should happen.  At the most, you will see messages that say 
> your disk has errors, but without /F CHKDSK won't repair them.

Ok, that sounds safe to me, but any writes are very BAD IMHO.
 
> > I'd say that whatever is causing the problem is doing
> > you a favour.
> 
> Just to remind you: this thread started when a user (not me) who is
> writing a shell complained that CHKDSK won't run from his/her shell.  I
> told right there that it is not wise to run CHKDSK from Windows, so we
> actually agree here.  However, I'd be much better off without such
> ``favours'', thanks a lot!

I agree, but my comments were meant more for the author and not
meant for you.  It's just that I replied to your message and not
the original.  Sorry for any confusion.

> (Btw:  does `fsck' on Unix fail to even start
> when you run it in multi-user mode? I don't think so.)

Yes, it does.  I had a problem the other day (my first Linux
crash due to a bug in 2.0.30) and when I rebooted, fsck came up
and said "fsck:  Warning: please reboot and run fsck manually".

The *ONLY* way for me to fix the disk was to install a second
Linux installation as UMSDOS on my DOS drive (A and AP disksets)
and fsck my ext2 drives from it.  fsck runs ok to *check* the
drives at boot, but it wont run to correct errors if any are
found unless they are non-serious and can't effect the system.

So, it doesn't matter which OS it is.  One cool thing about Linux
and fsck though is that fsck can check unmounted fs's and fix
them safely.

I feel very safe about letting fsck do whatever it pleases, but
(and I'm sure you'll agree with this latter statement) I DONT
feel safe about any DOS/WIN multitasker doing the same.  Read
only is ok though.

It'll be interesting to see why this problem manifests itself.

Mike A. Harris        |             http://blackwidow.saultc.on.ca/~mharris
Computer Consultant   |                  Coming soon: dynamic-IP-freedom...
My dynamic address: http://blackwidow.saultc.on.ca/~mharris/ip-address.html
Email: mharris at blackwidow.saultc.on.ca  <-- Spam proof address

URL: Intel                               http://www.intel.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019