View Single Post
  #8  
Old December 17th 17, 04:38 AM posted to microsoft.public.win98.gen_discussion,microsoft.public.windowsxp.general
Paul[_6_]
external usenet poster
 
Posts: 41
Default New HDD, has corrupted Data - AGAIN

wrote:
Ok, As most of you know, I had a partition go bad on one of my drives
and I lost much of the data on it, because I did not have a current
backup. I got rid of that hard drive, even after a re-format showed it
to be usable and not have bad sectors.

This is an old IBM brand computer from about 2001. which originally came
with Windows 2000. I've upgraded this machine many times and have used
it for years. I do have Win2000 dual bootable on it, but 95% of the time
I boot and use Win98se. (I have this crossposted to the XP group because
of the lack of activity on the Win98 group).

Anyhow, after that partition got damaged, I unplugged that second hard
drive (Slave drive) and just used the first drive (bootable one). The
first drive is a 120gb with four partitions. The second drive was also a
120gb with three partitions. The partition that went bad, was the G:
partition (first partition on second HDD).

I have not had any problems with the first HDD at all.

After removing that defective second HDD, I put it aside hoping to
recover data from it, and I plugged a 160gb HDD into the second IDE
connector and partitioned it. It did not take long for that second drive
to give me error messsages showing data corruption. I did not have much
on that drive, so I just copied it to space on the first HDD. I did
however, suspect that was because I know that Win98 does not allow
drives larger than 120gb (actually 132gb).

I bought another 120gb drive, and just recently installed it. I had not
yet put my original data back on it, nor my rebuilt data from G: (which
I all have on en external USB drive).

This new drive was partitioned into three partitions again. (G: H: I.
The G: pattition was still empty. The H: partition I was using for
downloading, and contained about 25 downloads, mostly just small .JPG
files and a few .PDF files.

The I: partition contained a copy of my Agent newsreader which I copied
there, as a backup, while I was changing some of Agent's settings.

Yesterday I was defragging the first drive's partitions, when I decided
to defrag the H: partition, since I had moved around some of the
downloaded files. DEFRAG told me this partition had errors and I needed
to run Scandisk. Scandisk reported crosslinked files between the
DOWNLOAD folder and the RECYCLED folder. (Note, I DO NOT use the
Recycled folder, I have it set to immediately delete files.

I ran NORTON DISK DOCTOR (rather than Scandisk) to fix this, and it did
fix it, but then said that the RECYCLED folder existed but had no space
on the HDD. I could not delete the Recycled folder. Since I had already
copied all my downloads to another place (as a backup), I just
reformatted that H: partition.

For the heck of it, I ran DEFRAG on the I: partition (which only
contained a backup of my AGENT folder. -Once again, I got a notice to
run Scandisk, which showed duplicates of ALL these files in the RECYCLED
folder. And said it contained crosslinked files. Since I did not need
that backup of Agent anymore, I just reformatted that partition too.

Why is this second HDD getting all corrupted? This is a new drive, and I
also replaced the IDE cable with a new one (with 80 wires, rather than
the old one that had 40 wires).

I'm starting to wonder if the motherboard itself is failing (or at least
the built in IDE board portion of it).
I do have the drive jumpers set properly, to MASTER on the first HDD and
to SLAVE on the second drive.

I have run two HDDs on this computer for years with no problems. Now it
seems I can not run a second SLAVE drive.

Any ideas what might be causing this?


When you got the new 120GB drive (the one with G,H,I on it),
did you clean if off after connecting it ?

At least on WinXP, you have "diskpart" command. Which runs
from an Administrator group account. You can select a disk,
then issue a command of "clean all", which overwrites every sector.

A second way to clean a new disk, is to use "dd".

http://www.chrysocome.net/dd

dd --list # Gives details about your disks, and
# hints at the labels to use

dd --list 2 list_of_disks.txt # Record in a text file, the details
# of your disks. The program writes to
# STDERR, which is FID number 2 of a
# command line program.

(200KB or so)

http://www.chrysocome.net/downloads/dd-0.6beta3.zip

Once you have the size information for the device, you
craft a command for it. Let's take my smallest drive as
sample material for this.

In Disk Management, my disks go 0,1,2. The third disk
is 2, and the identifier here is also "2". I confirm,
by comparing the sizes of disks I see in disk management,
with the disk numbers and sizes here, that I'm absolutely
sure about what identifier to use for the command. If
you make a mistake, you can do a lot of damage with
"dd.exe". It doesn't ask you to confirm anything,
it doesn't warn you in any way about what you're
going to be doing.

\\?\Device\Harddisk2\Partition0 --- Partition 0 is the pointer to
link to \\?\Device\Harddisk2\DR2 the entire disk.
Fixed hard disk media. Block size = 512
size is 500107862016 bytes --- The size of the entire disk
\\?\Device\Harddisk2\Partition1
link to \\?\Device\HarddiskVolume1
Fixed hard disk media. Block size = 512
size is 20974431744 bytes 19.53GB partition
\\?\Device\Harddisk2\Partition2
link to \\?\Device\HarddiskVolume2
Fixed hard disk media. Block size = 512
size is 14435366400 bytes 13.44GB partition
\\?\Device\Harddisk2\Partition3
link to \\?\Device\HarddiskVolume3
Fixed hard disk media. Block size = 512
size is 44794874880 bytes 41.72GB partition
\\?\Device\Harddisk2\Partition4
link to \\?\Device\HarddiskVolume4
Fixed hard disk media. Block size = 512
size is 419900544000 bytes 391.06GB partition

The size of the disk, can be factored by small integers.
From memory, I happen to remember a "convenient" size for
this disk is 221184 byte commands.

221184 / 512 = 432 sectors (an evenly divisible sector-related size)
(256KB is a ballpark target for a size, on an older HDD)
(Setting the size to 512 bytes only, makes it slooow.)

500107862016 / 221184 = 2261049 chunks

So the number does divide evenly into the size of the disk
as well. (I use the Linux program factor.exe to factor
the number and figure out what a reasonable size might be.)

OK, so now comes the fun part. I want to do two things:

1) Remove any existing data.

2) "Probe" the disk, doing realistic write operations.
If there is something wrong with the geometry of the
disk, there is an HPA or DCO, there is a disturbance
in the force, I want the command to detect something
is wrong.

In an Administrator command prompt, I can try

dd if=/dev/zero of=\\?\Device\Harddisk2\Partition0 bs=221184

Now, normally the command would have "count=2261049" to
make the command do a fixed amount of writing. However,
we want the command to keep writing, until it runs out
of disk drive. If we do it this way

dd if=/dev/zero of=\\?\Device\Harddisk2\Partition0 bs=221184

then after a couple hours, the command stops and spits out
a couple lines. We hope the two lines are exactly 2261049,
and the command has figured this out the hard way, by
writing each sector.

If the command reports some other number of completed
chunks, that means there is an "issue" with the setup.
The value of the numbers printed out, will hint at what
the issue is. Is it the 137GB disk limit ? Is it a
64GB disk limit ? What limit did we hit ? Or,
did the disk pass, and we wrote exactly 2261049 chunks
of 221184 bytes each ?

Your drive is smaller than mine, and you will have a
different set of numbers. You'll have to work out
a value for the blocksize.

If you need help, just paste the same sort of section
that I did, into a post, and I can cook up a command
for you.

The dd.exe program only has one bug. If you erase USB
sticks with the program, the program does not successfully
detect the end of a USB key. Thus, you cannot use this sort
of "probing" command with a USB stick...

dd if=/dev/zero of=\\?\Device\Harddisk2\Partition0 bs=221184

Instead, with a USB stick, you have to write a precise
quantity of bytes, using the count field too.

dd if=/dev/zero of=\\?\Device\Harddisk2\Partition0 bs=221184 count=2261049

That way, it doesn't do anything disconcerting, like "write past
the end" of the USB stick. That kinda scared me, the first
time it happened.

Anyway, that's a little test case I use occasionally, when surpassing
canonical capacity limits on computers. I used to test disk
capacity by copying files over and over again, but that
gets really old fast. Having a command to use up all
the bytes, is a lot simpler.

Paul