Link to home
Start Free TrialLog in
Avatar of fred hakim
fred hakimFlag for United States of America

asked on

How to read data from an old DOS HDD

My client asked me to get the programs and data from an old PC.   Its an old 386/486 that defines the tracks, sectors and cylinders in the bios.   (an IDE drive with no partition table).   I tried connecting its drive via USB to a newer PC, but none of the data is visible using windows 7, Windows XP, DOS 6.22, Hiren's boot disk, etc. on the newer PC,  probably because there is no partition table.  Its too much data (over 30gb) to try to copy with 750kb or 1.4mb diskettes and those PCs don't have CD drives.  

I was able to get a sector by sector image copy to a USB drive -- And plan to try to restore it to a newer drive, but I doubt that will solve anything -- since it will probably restore without a partition table.  

Many years ago I used to have all sorts of great DOS based tools for this sort of thing.  Some may still exist in my basement or one of the software archive sites, but at my age, I don't remember which to use or how they worked.   I'm guessing an old pre-Windows XP might be able to read this data and be able to write to a partitioned drive (I don't believe those old versions knew about USB).    

Any help would be much appreciated.
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

a partition table exists on every drive after it is formatted/initialized
The sector table is used by the controller itself. What you could try is a PCIe IDE controller i.e. https://www.amazon.ca/StarTech-com-Express-Controller-Adapter-PEX2IDE/dp/B000YAX13Y
For that age of drive / machine you can try Spinrite. It might work.

https://www.grc.com/sr/spinrite.htm
Avatar of fred hakim

ASKER

This drive was from back in the day where the heads, cylinders and tracks were selected in the PC bios.  The bios had about 50 or so types of HDDs predefined.  Each type had different values.  If I remember right, they did not have partitions the bios told the PC how to boot the disk. These were DOS based HDDs and early versions of Windows worked with them.  I'm thinking circa Windows 3 was the last  DOS based version and probably the last that worked with this sort of drive/bios. . .  

At least that's what I'm thinking, since when I connected the disk via USB adapter, windows 7 and Linux couldn't mount it, but I was able to see the physical drive and do a sector by sector copy of it.   I have a system with an IDE controller around here somewhere. I'll give it a try.
The track layout and the partitions are not the same things.  The track layout determines where the hardware controller finds the data and the partitions is used by the OS software to organize the disk.  All of my DOS era drives have partitions in addition to the track layout parameters.
TestDisk  https://www.cgsecurity.org/wiki/TestDisk

Try the StepByStep Tutorial to get yourself familiar with it   https://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

Model of hard drive?  You should be able to look up the heads, sectors, cylinders of that on the Interwebby.  Or the BIOS should have those.
I take it back.  Disks could be partitioned back in the early DOS days as early as 1984 with fat16.    Also I tried to restore the sctor by sector image, that did not work.  I'll have to get the  original hard drive, to see if I can connect it to a newer PC with an IDE port.  Can't do that for a couple days.  

One point I failed to mention above, the disk I'm trying to read boots up into DOS on the OLD PC.  So it must be readable at least by some old standard.
back in the day one used fdisk to partition the system, you'd then format the disk either with system or you could add sys afterwards.
Avatar of Dr. Klahn
Dr. Klahn

Possibly easier:  Put KERMIT-DOS on the old system and Kermit out anything useful via the serial port.  It'll take a while but it's straightforward and no fiddling with disk geometry.
I'm not understanding the original post.  On the 386/486 computer, are you able to see everything on the drive?  If so, that could make data recovery much easier.
@ CompProbSolv
I see everything on the drive as long as it is on the old system.   On new systems (connected by USB IDE Adapter)  windows does not mount the drive.  Partitioning and backup tools see a physical disk, but no files or directories.  

@pgm554
I have a PC available running windows 7 that has an IDE port.  I'll try that -- but I need to go to the client site to get the drive. (or I could take the PC out there.)

@DrKahn
Thanks, I downloaded Kermit.  Forgot all about it.  If it gets to doing that way, I can build myself a serial crossover cable. Any I had are long gone.
ASKER CERTIFIED SOLUTION
Avatar of dbrunton
dbrunton
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please keep in mind that your original configuration used autoexec.bat and config.sys to manage your drive's boot up using conventional memory.
>I'm thinking circa Windows 3 was the last  DOS based version and probably the last that worked with this sort of drive/bios. . .  

No W95 still used dos and fat16 as a default format.
M$ broke W95 DOS on purpose so that you couldn't use DR Dos or other 3rd party DOS.(they got sued and lost over that little fiasco)
Folks forget how truly evil they could be.

Win 98 gave you an in place conversion utility to go from fat16 to fat32.
you can probably use laplink :  http://www.laplink.com/pcmover/pcmover.html
Laplink is a good suggestion, if you can find a version that runs in DOS.

Alternately... have you considered buying a network card for the old system, and copying over the network?
You mentioned you were able to do a sector-by-sector copy of it. Some of the tools that let you do that will also let you dump those sectors into a virtual HDD image like VHD. If you can get that copy converted to a VHD or similar format, then most virtual machine software (VirtualBox, etc) would have IDE support that would likely let you boot and access the image. Then from there, you could use virtual networking to copy data pretty quickly to the host machine - all for free.
More than likely your sector by sector copy done on a different computer is almost worthless because of the CHS formatting of the drive.

Back in the day the CHS settings were manipulated to get larger drives to work under 16 bit limits of sector counts... The USB adapters expect the drive to have at least some intelligence to present itself in LBA format. You are going to need to use an older computer and some software for extraction. If the hard drive image has dos 6.22 on it or you can find a copy it has all the software you need with interlink.exe and intersvr.exe. If not I googled laplink 5 and found several links.
can you tell us what OS the old pc was running?  Dos, windows 3.1, win95?
Just seconding some of the comments above....

Not surprising that a new USB/IDE interface won't see the drive properly.  It is likely not coming up with the correct Cyl/Head/Sector combination.  There are a number of ways to determine what was used when the drive was partitioned and formatted (don't trust the standard specs as they may not have been used), but I'd not go down that path when you can read the drive on the old computer.

A PCI-IDE card may work on a newer computer, but you may run into the same C/H/S issue.

Assuming that this is just a single computer, the suggestions to copy from the old computer over a cable (serial, parallel, Ethernet, etc.) to a newer computer is likely the most reasonable approach.  The actual time to copy may be long, but your time could be far less than if you try to read the drive in a newer computer.
Spinrite helps when the drive can't properly read the sectors. Spinrite works independently of filesystem. The issue here seems to be trying to figure out the disk geometry, which is an entirely different class of problem. I am so glad that I haven't have to deal with cr@p like this for a long time.
Doesn't the BIOS of the old machine show the disk layout in use? Not sure how to translate that to a newer controller, though.

Back in the old days we could put a network card in a machine and connect it to network. You would need to find an old ISA NIC card though. Transferring via Kermit or XModem isn't a bad idea.

How big can the hard drive be? Got an old zip drive?
I agree with the comment about Spinrite and the real issue here.

Even if you knew the CHS settings (which can be read), you likely can't set them on any modern IDE adapter.
And using something like spinrite on a mistranslated drive might really corrupt things...
Linux might be able to read the disk (though you may PCI-IDE card)

Download a linux boot image and give it a try, can't hurt
even back then we had some tools that allowed a dual boot
linux of W95 might work

and partionMagic  was a big help in the 90s
and what model is the PC?  
are the cards configured with jumpers?
I just realized something.  It can't be 30GB of data from a disk that runs DOS 6.22.  That version of DOS only supported 4 partitions of 2GB max as I recall regardless of what the actual disk capacity was.  ??
(Sweeping the cobwebs...)
Good point, Dave.  Maybe it's 30M?

In any case, I think that there have been good suggestions here.  Keep the drive in the old computer in which it works and transfer through serial, parallel, or LAN.
Thanks for all the suggestions.  I'm going to try  a bunch of these options.  I think I have an old laplink Parallel port cable, I'll try to find it  and see if it works with interlink or file maven, or whatever I can get to work first.  

I already tried Linux, but it wouldn't mount the drive (using the USB/IDE adapter on a newer PC) -- I'll try that too from an older PC and older Linux (but new enough to connect a USB stick).   When I get out to the site  (a couple days from now) I'll check the bios CHS settings, DOS version, CPU and Disk physical size -- just to be sure we are not guessing about stuff.  

This job has me digging thru old boxes of stuff with plenty of dust and cobwebs.   And all of you digging thru old solutions as well.  I want everyone to know how much I appreciate your time.
and post disk model as well, with pc details, and OS
I was on site yesterday for some other work and I collected some information about the system.  

Gateway 486/33c  (can't be sure its all original inside, but it all looks old)  
MSDOS 6.22
80486 cpu 32bit
Phoenix Bios ver:  0.10  g17-2    (1985-1990)  
Base memory         640 kb
Extended mem   15,360 kb

Drive 1 boot drive , drive number 80
Western Digital  515mb  model wdc ac2540h  
Type 16    1048 cylinders, 16 heads,  63 sectors 512 bytes per sector

Everything reads/writes  OK when drive in in the system.  
ran chkdsk and scan disk no errors  found.

Unable to get model number of IDE controller, but its an add in card plugged into the motherboard.  These are not PCI slots, Can't remember what we called those slots.  

I was not able to pull the hard drive to try it in an older PC, not enough time.  But I will be out there again next week and should have more time.
They are called ISA slots.  Does the machine have Windows 3.1 running on it?  If it does and you can find a network card, you can install MS-TCP and/or Windows for Workgroups and have an acceptable network connection.
Most like ISA slots being that old.
Does owner of the box realize you can't always get the programs back from just the hard drive?
Data yes, but the programs would most likely have to be reinstalled on a new box to actually work.
Yep... ISA.   it was in my ferite cores somewhere, just needed a nudge, thanks.

This is MSDOS 6.22   No windows 3.x is installed.  I have Windows 3.1 install disks, but I really don't want to chance that the install could cause  a problem with their DOS factory automation software.  Its possible the windows install might mess with config.sys, autoexec.bat,  or loadin their ram drive,  which are configured for their software.  Last thing I want to do is shut down their line.

My plan next week is to try the hard drive in a newer PC with an IDE port --  50/50 chance it will work.  If not,  I'll try to get File Maven or Interlink to work over a null modem cable.  If those fail, then  I'll  save their configuration files to diskettes and give windows a try.
What exactly are they trying to do?
Just get newer hardware?
How does the old PC interface to whatever hardware it is controlling?
I assume the owner is unwilling to upgrade this ancient machine for economic reasons...

If the box communicates in certain ways you might be able to virtualize the dos box. That way it will become fairly hardware independent.

I think you can still virtualize serial ports, but if the box also connects to the controlled system by a proprietary card of some kind you might be stuck.
imo you best start copying the data with floppies - since the disk is only 515 Mb total.
 ( btw  you can run a dir to find the free space left)
the disk usuallly was something like 120 MB
other ways may be possible, but not easy to install on such a pc
> the disk usuallly was something like 120 MB

Floppies... were 1.2MB or 1.44MB for 3.5" disks.   There was a rarely used 2.88MB version, and a 'superdisk' that was 120MB, but that was very unusual, and I would not expect to find it on any particular machine.

Trying to copy 500MB onto even 3MB floppies would be extremely painful, both in time, and the chance of a bad disk rendering all the rest of the data unrecoverable.
thomas -please read what i posted, his data may be lower than 20 MB
I think part of the issue is that the owner of the box might think that just copying the programs off will make them installable somewhere else, which isn't always the case.
i doubt he can put it on a VM even...
DOS  programs, unlike most of the stuff we see today .aren't too hard to transfer to a new system as unlike the more modern Windows stuff,registries and shared dlls aren't as critical when transferring to another dos based computer.

Only time I've seen issues are from the old copyguard days when a hidden file was transferred from the install floppies and had to be uninstalled to install it to a different device.

And even then you could hack it if you knew what you were looking for.
I have to wonder what piece of equipment was robust enough to last this long. Must be pretty well made. Running on dos it has to be over 10 to 12 years old.
To answer some of your questions.  

They have two old PCs running two duplicate production lines.   The one I'm working on is a gateway 486/33c  I described above.  The line interface is via serial port.   We are attempting to swap in newer hardware, still running the same DOS 6.22 based software.  Timing may be a big issue in this environment.  As far as I can see their app was not big on using handshakes (DTR, DSR, RTS, CTS ) effectively, its often difficult to get it working with the shop after booting up.  It often takes a few tries (reboots) to connect up and get synced.  

Their ultimate goal should be to rewrite this stuff, but for now, they just want some newer PCs.  Those old ones are built like tanks. The power supply in the Gateway must weigh 20-30 pounds alone.  To get a newer PC running I need a copy of the old drives (or all the files and directories on the old drive).    If you don't want to follow this whole thread,  the issue is this old drive was not mounting when connected to a newer PC.  Neither Linux, nor Windows nor even DOS could see its files, when I connected the drive via USB IDE adapter.  Some disk tools did see the physical drive.
Viewing the disk and copying the files properly depends on the old BIOS that recognized the CHS settings.  Newer PCs do not use that method and will not support that drive.  The newest machine that I have that will support that was made around the year 2000.
Random And Possibly Silly Thoughts:

You could try a newer serial cable between computer and device.  Old one may be a "bit" tired.

Also consider what speeds the serial port is communicating at.  You could try a slower speed if the hardware permits.  That could solve timing problems.

Now you can get a more modern machine running with DOS 6.22.  That's easy enough to do.  Disks can be found on the Interwebby if you don't have them.  A simple fdisk and format c: or let the DOS installation procedure occur.  Then it is a matter of carefully copying everything across from the old machine to the new machine - I've suggested File Maven but other utils exist.

If the old software doesn't have any copy protection then that should be fairly easy to do.  You have to check the old CONFIG.SYS and AUTOEXEC.BAT files with the new machine to see what they are doing and adjust if necessary.  The old one has 16MB so it is possible that the application is using extended memory so check carefully those two files.
You nailed it Dave.  That is the issue.   I'd like to be able to read this drive from a newer system with either a USB port or a normal hard disk that I can use to save off the files -- without using over a 120 diskettes.   Once I can access the files its a nobrainer to set up a newer DOS 6.22 PC.
@Dbruton

Sorry to confuse things,  I mentioned the timing issue only to say this app may be impossible to get running from a virtual PC environment, not to solicit any solutions.  Its worked this way for them for many years.  

You are also correct about setting DOS6.22 on a newer PC.  That is the goal.  I have a newer PC already set up with DOS 6.22 ready to roll.  The issue is how to get the stuff from the old dinosaur CHS hard drive.  Your File Maven suggestion is number 2 on my list of options for next week.  Number one is to try connecting the drive directly (no USB adapter) to an IDE port on a newer PC.   Option  number 99  is to  format  120 diskettes -- as Nobus wisely suggests.  You can read above of the stuff in between.
The best thing to try would be using intersvr and interlink over a null modem cable on the old ps connected to the new pc...This should let you copy everything across.

http://www.easydos.com/intersvr.html

Intersvr/interlink is part of dos 6.22 so you should have what you need
You might want to check on add-in cards on the old machine.  Anything that has a cable connected on the rear panel must be checked.  Parallel ports and standard serial ports aren't found on 'new' machines.  And USB serial ports often don't work like you might want.  USB is a packet driven network protocol and a poor driver can really mess up your serial comms.  And old ISA plug-in cards won't work either!
OK, I just left the customer site.  Everything is copied over to the newer (586) PC and its working great.   Plugging the old CHS drive into a newer PC with IDE ports did not work, as many of us suspected.    After experimenting with many of the suggestions provided on a couple PCs in my office,   FileMaven was second best option.  It worked great with a null modem serial cable (easy to make) running at 115,200 bps.  

Three big reasons for file maven:  First, the package was small enough to fit on a 7.22kb DOS bootable diskette.  I was able to boot up from the diskette and start FileMaven without messing with anything on the customer PC.   Second the full screen, dual directory interface was not too painful to navigate both the local and remote drives and directories.   Third, I could select entire directories (including all files and child directories) to transfer in one job.     At 115,200 bps it still took a few hours to complete, but way better than many hundreds of diskettes.

Once I copied everything to a folder on a newer PC, it was simple to get the new PC up and running.  I also backed it all up for them on their network and on USB sticks.  

I really appreciate all the help.  I'm pretty sure a lot of cobwebs got cleared out as you came up with all these great suggestions.   I'll get back later tonight to give some credit to all of you that helped me out.
Thanks Guys, I really appreciate the time you spent helping me remember all those old DOS quirks.  One nice thing about this job was I got to play with a lot of neat stuff I had long ago totally forgotten.  There were a few apps and tools I ran across, while rummaging through my basement, I may try to resurrect. .  The one thing I have to say was nice about DOS is how forgiving it was when it came to differences in hardware and how simply applications worked and were installed (pretty much just copy and execute).