EEVblog Electronics Community Forum

Products => Computers => Vintage Computing => Topic started by: jmelson on March 25, 2022, 09:32:28 pm

Title: How to clone DOS drive?
Post by: jmelson on March 25, 2022, 09:32:28 pm
I have an old system that runs DOS 6 that runs an X-ray fluorescence machine in a lab.  I am trying to replace the ancient computer with a modern one.
I have cloned the IDE hard drive onto a modern SATA drive, but I get "missing operating system".  I used dd on a Linux system to copy the whole drive contents, including the MBR, partition table and the main partition.  I can't figure out why I get the missing OS error.

I have seen desciption online that I should run fdisk /mbr from a Win95 CD, but I don't have a good one of those anymore.

Thanks in advance for any ideas.
Jon
Title: Re: How to clone DOS drive?
Post by: Twoflower on March 25, 2022, 09:48:35 pm
Probably the modern computer can't handle the old OS. Especially if the computer has only UEFI with no legacy (old BIOS) support. I think that's the case for Intel Gen 10 Core-I CPUs. And I thing they even dropped some other legacy support since some longer time (e.g. the good old A20 Gate emulation).

One workaround would be to use a VM if the software can work in it.
Title: Re: How to clone DOS drive?
Post by: themadhippy on March 25, 2022, 10:06:05 pm
Quote
I used dd on a Linux system to copy the whole drive contents, including the MBR, partition table and the main partition.  I can't figure out why I get the missing OS error.
Did it copy the hidden files ,seem to recall you had to include the sys command if you wanted to make a bootable disc in the days of dos
Title: Re: How to clone DOS drive?
Post by: jmelson on March 25, 2022, 10:30:37 pm
Probably the modern computer can't handle the old OS. Especially if the computer has only UEFI with no legacy (old BIOS) support. I think that's the case for Intel Gen 10 Core-I CPUs. And I thing they even dropped some other legacy support since some longer time (e.g. the good old A20 Gate emulation).
This is a Celeron CPU, and the manufacturer specifically states it has been tested on DOS, Win95 and Win98.
The message "missing operating system" comes FROM the boot code in the MBR, as one can find it when dumping the first block of the disk.
At least on an older motherboard, I get the SAME message from the SATA disk clone, but the original PATA drive boots up and runs DOS and the application perfectly.  So, the REAL problem here is the way I am cloning the disk.  Something about using dd to suck up the whole disk (not SDA1 but just sda, so it gets EVERYTHING on the original drive including the MBR and partition table) is leaving something not quite right in the clone.  I'm guessing there is some pointer to cyl/head/sector that ends up not pointing to the right disk block.
The fact I get "missing operating system" proves the MBR code is executing, but it is failing to find the OS file for the next phase of the boot.
Jon
Title: Re: How to clone DOS drive?
Post by: Whales on March 25, 2022, 11:00:10 pm
dd'ing the whole disk is a good strategy, assuming you did the entire disk (dd if=/dev/sdx of=/dev/sdy) and not just a partition (dd if=/dev/sdx1 of=/dev/sdy1).  I recommend making a backup to a file (on a modern computer) too.

At a guess:

 * new disk is too big
 * new system has too much ram
 * new system is otherwise too foreign (shouldn't be an issue with IDE boot via BIOS?  edit: but the new disk is SATA, so perhaps check if the BIOS is configured to use IDE emulation or AHCI/RAID/something else for the SATA disks)

I imaged one of my win3.1 boxes a while back and ran into problem #2 whilst trying to virtualise.  Half of the files on the filesystem simply didn't exist, the system would only boot to dos and then complain.  Reducing the RAM magicly fixed this.

For a long time there were HDDs with jumper options to intentionally reduce their reported size.  I believe this was done to workaround software that couldn't handle the high disk size numbers.

It's difficult to get small SSDs/HDDs these days, but you can cheat and use a CF-to-IDE adaptor (CF cards natively implement IDE) or a SD-to-IDE/SATA adapter (probably cheaper and better in the long term, but I have not tried them on old systems/software yet).
Title: Re: How to clone DOS drive?
Post by: granzeier on March 26, 2022, 01:36:56 am
Could you just put a bootable image of MS-DOS 6 onto a thumb drive, boot off of that and then use FDISK and Format to make the new hard drive bootable. After this, you could just copy all the data onto the new system.
Title: Re: How to clone DOS drive?
Post by: james_s on March 26, 2022, 02:22:50 am
This is really digging into the cobwebs in my brain but there is something you have to do to make the partition bootable, I think it was with fdisk. If you want to rule out incompatibility, boot DOS from a floppy or pretty sure you can get a DOS boot CD image and try installing it on a hard drive and see if that works. Format c:/s should format the hard drive and copy the system files.
Title: Re: How to clone DOS drive?
Post by: jmelson on March 26, 2022, 02:51:53 am
This is really digging into the cobwebs in my brain but there is something you have to do to make the partition bootable, I think it was with fdisk. If you want to rule out incompatibility, boot DOS from a floppy or pretty sure you can get a DOS boot CD image and try installing it on a hard drive and see if that works. Format c:/s should format the hard drive and copy the system files.
Right, the partition has a * in the boot flag.  I don't have a floppy drive here that I trust to not destroy the media.  I HAD a Win95 CD but I lost my balance and crunched it!  I have looked for another, but so far no luck.
Jon
Title: Re: How to clone DOS drive?
Post by: jmelson on March 26, 2022, 02:58:52 am
dd'ing the whole disk is a good strategy, assuming you did the entire disk (dd if=/dev/sdx of=/dev/sdy) and not just a partition (dd if=/dev/sdx1 of=/dev/sdy1).  I recommend making a backup to a file (on a modern computer) too.

At a guess:

 * new disk is too big
Yes, the SATA drive is 500G, but I just have one 168Meg partition on it.  So, why should the bootloader care?
Quote
* new system has too much ram
Yes it has a lot, but again, why should the bootloader care?
This mobo only has PATA connectors, so I am using a PATA-> SATA adaptor card.
Quote
* new system is otherwise too foreign (shouldn't be an issue with IDE boot via BIOS?  edit: but the new disk is SATA, so perhaps check if the BIOS is configured to use IDE emulation or AHCI/RAID/something else for the SATA disks)

I imaged one of my win3.1 boxes a while back and ran into problem #2 whilst trying to virtualise.  Half of the files on the filesystem simply didn't exist, the system would only boot to dos and then complain.  Reducing the RAM magicly fixed this.
  I'll see if I can do that.
Quote

For a long time there were HDDs with jumper options to intentionally reduce their reported size.  I believe this was done to workaround software that couldn't handle the high disk size numbers.

Yup, I am using one of those drives on a Win95 system on a pick and place machine.
Quote
It's difficult to get small SSDs/HDDs these days, but you can cheat and use a CF-to-IDE adaptor (CF cards natively implement IDE) or a SD-to-IDE/SATA adapter (probably cheaper and better in the long term, but I have not tried them on old systems/software yet).
Title: Re: How to clone DOS drive?
Post by: mariush on March 26, 2022, 06:18:21 am
Jeesh... can't get small capacity drives... you're kidding. You can get 4GB / 8 GB / 16 GB / 32 GB SSDs for cheap, they make them as boot drives or to store licenses/keys for switches and servers and you can get IDE<->SATA converters that work transparently quite easily.

example : 7$ for 8 GB HP sata SSD module: https://www.ebay.com/itm/393134503570 (https://www.ebay.com/itm/393134503570)

You can even buy small 4/8 GB 44pin IDE drives (44 pin is for laptops) and you can buy a 44pin to 40 pin IDE adapter if you don't want to have converters.
Example :

8$ 2 GB 44pin ide drives harvested from hp thin clients : https://www.ebay.com/itm/324668512777 (https://www.ebay.com/itm/324668512777)

9$ transcend 4GB : https://www.ebay.com/itm/193738886321 (https://www.ebay.com/itm/193738886321)

23$ for the 16 GB version of HyperDisk 40pin IDE : https://www.ebay.com/itm/333540449924 (https://www.ebay.com/itm/333540449924)
SSD DOM 2G 4G 8GB 16GB 32GB 64GB Disk On Module Industrial IDE Flash 40 Pins MLC
Title: Re: How to clone DOS drive?
Post by: james_s on March 26, 2022, 06:31:10 am
Right, the partition has a * in the boot flag.  I don't have a floppy drive here that I trust to not destroy the media.  I HAD a Win95 CD but I lost my balance and crunched it!  I have looked for another, but so far no luck.
Jon

Do you have a CD burner? I can make you an ISO if there isn't one floating around already, I'd bet there is. There is also at least one free DOS clone IIRC.
Title: Re: How to clone DOS drive?
Post by: PKTKS on March 26, 2022, 08:34:19 am
I would replace DOS with modern FREEDOS.

Did that for myself times ago to move deprecated stuff

Positive things ..  support for 32 bit and usb and all GNU tools out of the box

All  DPMI handlers and memory managers available.. 

It should be a 500% improved replacement

Paul
Title: Re: How to clone DOS drive?
Post by: Whales on March 26, 2022, 09:01:13 am
dd'ing the whole disk is a good strategy, assuming you did the entire disk (dd if=/dev/sdx of=/dev/sdy) and not just a partition (dd if=/dev/sdx1 of=/dev/sdy1).  I recommend making a backup to a file (on a modern computer) too.

At a guess:

 * new disk is too big
Yes, the SATA drive is 500G, but I just have one 168Meg partition on it.  So, why should the bootloader care?
Quote
* new system has too much ram
Yes it has a lot, but again, why should the bootloader care?

Those things have been known to affect DOS itself, but I've not disassembled the bootloaders so I can't be sure if it affects those.

Eg bootloader queries the BIOS for C/H/S counts of the primary HDD, then does maths using real mode instructions (16 bit) and overflows.
Title: Re: How to clone DOS drive?
Post by: nightfire on March 26, 2022, 09:46:03 am
The problem could in fact be the Adapter from PATA to SATA- does the mainboard recognize this as a bootable device?

Does this adapter works in a transparent way to the OS? I remember lots of issues in the old days with this stuff...

Another approach could be in the form of industrial spec disk on modules, "DOM" with PATA/IDE interface. Those are still around for decent money and also match the smaller sizes the BIOS of the computer might be better suited for.
Alternatively a simple mechanical adapter from IDE/PATA to compact flash.
Title: Re: How to clone DOS drive?
Post by: DiTBho on March 26, 2022, 09:56:21 am
I would replace DOS with modern FREEDOS

From my experience with Acord x86-guest card ... they are not 100% compatible.
I tried
- DrDOS v7
- MsDOS v5
- MsDOS v6.22
- FreeDOS
Title: Re: How to clone DOS drive?
Post by: PKTKS on March 26, 2022, 11:05:56 am
I would replace DOS with modern FREEDOS

From my experience with Acord x86-guest card ... they are not 100% compatible.
I tried
- DrDOS v7
- MsDOS v5
- MsDOS v6.22
- FreeDOS


in my specific case...  the BIOS was kind enough to provide me that AHCI option  where  AHCI drives are presented as IDE devices...  not SATA...

Fussss  a decent MOBO with such AHCI option...
the drive will be presente in LBA as a regular IDE device...

chances are good

Paul
Title: Re: How to clone DOS drive?
Post by: jmelson on March 26, 2022, 06:11:08 pm
Jeesh... can't get small capacity drives... you're kidding. You can get 4GB / 8 GB / 16 GB / 32 GB SSDs for cheap, they make them as boot drives or to store licenses/keys for switches and servers and you can get IDE<->SATA converters that work transparently quite easily.
Yes, I think this is the key!  The 500 GB drive is too big, over 1024 cylinders.  I saw this on another cloning project, the boot block won't boot from a big drive.
Once I selected the "CLIP" option on the drive that had this feature, it did boot.  I need to do this again for this project.
Jon

Title: Re: How to clone DOS drive?
Post by: jmelson on March 26, 2022, 08:33:20 pm
Well, I don't have another of those drives with the "CLIP" feature, so I tried a 4GB SATA DOM drive.  Surely that would work!  Well, it doesn't!  It shows in the BIOS as having 7000+ cylinders!  That's just crazy, and causes the same problem with the old MBR boot code.
So, I'm still trying to find a solution.
Jon
Title: Re: How to clone DOS drive?
Post by: james_s on March 26, 2022, 09:01:44 pm
What happens if you make a partition smaller than 512MB? I vaguely remember having to use overlay programs on some older machines when larger hard drives became available. I have a 5GB drive in my IBM XT and it works fine, although I'm using a XT-IDE card with modern BIOS on it.
Title: Re: How to clone DOS drive?
Post by: jmelson on March 26, 2022, 10:50:51 pm
What happens if you make a partition smaller than 512MB? I vaguely remember having to use overlay programs on some older machines when larger hard drives became available. I have a 5GB drive in my IBM XT and it works fine, although I'm using a XT-IDE card with modern BIOS on it.
The only partition on the disk is 162 MB.  But, I think the problem is the stupid PATA-SATA adaptor makes some crazy C/H/S settings.
Jon
Title: Re: How to clone DOS drive?
Post by: jmelson on March 27, 2022, 05:05:06 pm
What happens if you make a partition smaller than 512MB? I vaguely remember having to use overlay programs on some older machines when larger hard drives became available. I have a 5GB drive in my IBM XT and it works fine, although I'm using a XT-IDE card with modern BIOS on it.
The only partition on the disk is 162 MB.  But, I think the problem is the stupid PATA-SATA adaptor makes some crazy C/H/S settings.
Jon
Ugh!  The drive that boots up win95 fine in my P&P machine shows up as 65525 cylinders on the new computer.  So,  maybe the diff is the MBR code on that one can handle it.
This is getting confusing!
Jon
Title: Re: How to clone DOS drive?
Post by: james_s on March 27, 2022, 05:59:22 pm
Now I'm getting confused, this is a modern PC with a modern-ish hard drive, the problem is that it's not booting DOS6? I still think the first step needs to be formatting a drive as a bootable system drive and seeing if DOS6 will boot that machine.
Title: Re: How to clone DOS drive?
Post by: nightfire on March 27, 2022, 06:47:28 pm
Sometimes a two-stage approach can help.
Transfer from the original system via dd the contents of the HDD to file (or over the network with a pipe to ssh/scp), and on the final target system you dd back the image via Linux live system.
Title: Re: How to clone DOS drive?
Post by: Twoflower on March 27, 2022, 06:57:00 pm
According to that page: https://tldp.org/HOWTO/Large-Disk-HOWTO-4.html the MS-DOS boot limit 1024 cylinders are allowed (BIOS Int 13 - the 8.5 GB limit). You should check if you can setup in the BIOS the SATA port to CHS (probably currently in AUTO or LBA).

The already mentioned FreeDOS seems to support LBA drives. At least the FreeDOS Wiki says so.

Edit: I missed the posts that you're already aware of that. So nothing new. Sorry.
Title: Re: How to clone DOS drive?
Post by: phs on March 27, 2022, 07:54:59 pm
Yeah, sounds like it could have to do with the size of the drive, and Twoflower's suggestion to use the CHS setting in the BIOS seems to ring a dim bell with me.  That's probably well worth trying.

You likely already know all of this, but just in case it might help someone...  When I clone drives with dd I usually boot the machine containing the source and target drives from a USB stick containing a recent distro like Ubuntu, Debian, etc.  Then, once the machine is booted from the USB drive, examine the source/target drives using fdisk -l.  I then usually mount both drives (unless the target drive isn't formatted), and examine the files using ls, and other commands, just to make sure the files look OK.  Then, I check /var/log/kern.log and do a dmesg to check for any drive errors.

Then, before I launch the dd command, I do a dmesg -c to clear the kernel ring buffer.  Once the dd command is launched (and for cloning the entire drive, you're correct to use /dev/sd[a-z] designation for the source drive), you can issue dmesg commands to watch for any new errors the drive might throw during the dd operation.  Also, you can issue a kill -USR1 <pid_of_dd_command> while dd is running to get a progress status.

This all makes sure that you catch any possible errors indicating that the drive has issues.  And, once the dd command has completed, and dmesg doesn't show any drive errors, you could do a recursive diff of the two drives to verify that the copied files are identical to the source drive's files.

One other thing that might help, if you need to move the cloned drive data to a smaller drive, would be to dd the source drive to an image file and then use udisksctl to set up the image file as a /dev/loop0 device so that you can open it with gparted and resize partitions.  Once the image file is set up the way you want it with gparted you can then use truncate -s, if necessary, to shrink the image file, and then dd it back to another (smaller) target drive.  There are good examples of this procedure available via your favorite search engine, and I can verify this all works quite well, although it's been a while since I've had to do it...

Good luck!
Title: Re: How to clone DOS drive?
Post by: geggi1 on March 27, 2022, 09:50:38 pm
The limitation in MSdos is not Dos, but the FAT16 disc system.
Try a partition that is less than 2GB. Back in the flopppydisc times Dos came on 5 or 6 1,44 discs so you dont need a very large drive.
MSdos can take up to about 9GB  split in several partitions that is 2GB or less.

Use a disc image tool and create a image. Use Rufus to extrect the image to your drive.
Title: Re: How to clone DOS drive?
Post by: jmelson on March 28, 2022, 01:03:26 am
The limitation in MSdos is not Dos, but the FAT16 disc system.
Try a partition that is less than 2GB. Back in the flopppydisc times Dos came on 5 or 6 1,44 discs so you dont need a very large drive.
MSdos can take up to about 9GB  split in several partitions that is 2GB or less.

Use a disc image tool and create a image. Use Rufus to extrect the image to your drive.
The only partition on the disk is 162 MB.  I have been using Linux dd to copy the whole disk rather than the partition (sdd vs sdd1).
Yes, it is FAT16.
Thanks,
Jon
Title: Re: How to clone DOS drive?
Post by: jmelson on March 28, 2022, 01:11:36 am
I would replace DOS with modern FREEDOS.

Did that for myself times ago to move deprecated stuff
I really don't have this option.  I have an antique special device with a large ISA data acquisition card.  We have a fully working, but very old, PATA hard drive from the original computer.  It is an ~ 168 MB drive.  We want to just clone this drive to a new drive, but every attempt I have made has resulted in "missing operating system".  I have now tried this about 20 times, on a wide variety of drives, from 500 GB to 20 GB.  For some reason, the boot code in the MBR just can't boot the copy, but it boots the original drive just fine.
Reinstalling the programs for this special hardware might be VERY difficult, especially if the 20+ year old distribution floppies are no good.  I have not seen a 3.5" floppy drive in quite a while and I wouldn't trust one with irreplaceable media, anyway.
Thanks,
Jon
Title: Re: How to clone DOS drive?
Post by: bw2341 on March 28, 2022, 02:40:37 am
It's been a long time since I used MS-DOS. If I remember correctly, LBA came out many years after MS-DOS. For compatibility, hard drives report a CHS geometry. If you switch the drive to bigger drive, the geometry won't be the same. The entries in the partition table will point to a particular C, H and S as the start of the partition. Since you did a straight LBA to LBA copy, the partition table is now pointing to the wrong LBA as the start of the partition.

You are seeing the "missing operating system" message because the position of first track on the old hard drive will match on the new hard drive. However, as the old drive runs out of sectors and switches to the next head, the new drive still has more sectors. This is where the disk geometry address will get scrambled.

I don't have a particular recommendation for your problem. My first guess would be to try a file level copy instead. I would boot from an MS-DOS installation disk and fdisk, format and sys the new drive on the new computer. After the computer is running properly, I would install the old hard drive into the new machine and xcopy /e or xcopy /s to copy the old drive to the new.

If you are lucky and the software doesn't have copy protection, it should boot properly. Check the config.sys and autoexec.bat files for drivers that could affect the hard disk. Even older MS-DOS systems needed crazy workarounds before larger and larger hard disks were supported.
Title: Re: How to clone DOS drive?
Post by: jmelson on March 28, 2022, 02:46:48 am
It's been a long time since I used MS-DOS. If I remember correctly, LBA came out many years after MS-DOS. For compatibility, hard drives report a CHS geometry. If you switch the drive to bigger drive, the geometry won't be the same. The entries in the partition table will point to a particular C, H and S as the start of the partition. Since you did a straight LBA to LBA copy, the partition table is now pointing to the wrong LBA as the start of the partition.

You are seeing the "missing operating system" message because the position of first track on the old hard drive will match on the new hard drive. However, as the old drive runs out of sectors and switches to the next head, the new drive still has more sectors. This is where the disk geometry address will get scrambled.

I don't have a particular recommendation for your problem. My first guess would be to try a file level copy instead.
I tried this first, but maybe I need to try this with a smaller destination drive.  I'll keep plugging away at it.
Thanks,
Jon
Title: Re: How to clone DOS drive?
Post by: bw2341 on March 28, 2022, 03:00:39 am
If you've already tried a file level copy, how did it fail?
Title: Re: How to clone DOS drive?
Post by: jmelson on March 28, 2022, 03:19:11 pm
If you've already tried a file level copy, how did it fail?
I think I got the "missing operating system".  But, that was some weeks ago, and I was doing it on a larger hard drive.
Now I have found a good 20 GB hard drive, but it reports 65535 cylinders to the BIOS.  Not sure if that will cause problems.
I'm wondering if I can make this boot with LILO or GRUB, but I'll have to supply the right boot information.  I'm guessing it is /DOS/MSDOS.SYS
that needs to be loaded to boot.
Jon
Title: Re: How to clone DOS drive?
Post by: Whales on March 28, 2022, 11:12:14 pm
I've just been looking into alternative bootloaders, but I can't find anything relevant.  Most (all?) do their DOS compatibility by chainloading directly to the MBR already on the disk (not much use here as that is likely what's failing).  Freedos appears to have been designed to allow linux-style bootloader boots, ie it doesn't provide a useful alternative bootloader that you could try and shoehorn in here.  GRUB can make a fake disk from a file via its ramdisk features, but even if that works it prevents you from ever saving your changes back to disk.

What I really wanted to know is whether or not there is a way of overwriting the BIOS' CHS numbers, but it looks like an INT13h is used to query disk geometry from the BIOS, so you will have to patch that interrtupt handler (I'm way out of my depth here, but I presume this means modifying the BIOS.  Or would it be "easy" to write your own handler and override the BIOS' one, then try chainloading the DOS MBR?  Still sounds nasty and hard).

The best solution seems to be trying to get more (smaller) disks with better behaved CHS numbers?  The only solution I've tried successfully before was a CF card (+ a CF to IDE adaptor, which is just a passive connector as CF cards support IDE natively).

Some relevant CHS info from around the web:

GRUB manual (https://www.gnu.org/software/grub/manual/grub/grub.html)
Quote
In traditional disk calls (called CHS mode), there is a geometry translation problem, that is, the BIOS cannot access over 1024 cylinders, so the accessible space is limited to at least 508 MB and to at most 8GB.

Phil Storrs PC Hardware Book (http://philipstorr.id.au/pcbook/book4/hdlimit.htm)
Quote
DOS versions up to and including DOS 3.3 imposed very restrictive limits on Hard Disk Drive Interfaces. The worst limit involved Hard Disk Drives larger than 32 MByte. A Drive larger than 32 MByte had to be split into sections and no section could be larger than 32 MByte. This limitation was overcome in later DOS versions and DOS 6.22 can theoretically address a Hard Disk Drive of up to two tera-bytes (two trillion bytes). The only problem is the 16 bit FAT used by DOS and older Windows Operating Systems, lowers this limit to 2.1 GByte.

This is really only a theoretical limit and in practice a limit of 528 MBytes was imposed by the original BIOS.
Title: Re: How to clone DOS drive?
Post by: Whales on March 28, 2022, 11:21:15 pm
If we are not able to help here, then VOGONs might be a better forum to ask for help in:

https://www.vogons.org/ (https://www.vogons.org/)

They might be able to recommend specific models of parts (SATA<->PATA adapters, SD card<->PATA, CF cards, specific modern disks, etc) that they know work.
Title: Re: How to clone DOS drive?
Post by: jmelson on March 29, 2022, 05:51:31 pm
Well, I finally bit the bullet and built a new DOS 7.1 system, and then loaded all the files that I think will be needed.  With DOS, there is no registry, so just getting all the files in the right place should work.  If not, then I can start copying more stuff.
Thanks, everybody for trying to help!
Jon
Title: Re: How to clone DOS drive?
Post by: Twoflower on March 29, 2022, 06:07:36 pm
Right, DOS doesn't has a registry, but you should check the config.sys and autoexec.bat as they might start some drivers you need. If you run into problems: The order of the commands might be important as well.

Copy this files will probably not work out of the box over several mayor versions. Some manual adaption might needed. They are human readable. But that might look like a lost language. Like latin only few people might be able to read it, even fewer are able to write it. ;-)
Title: Re: How to clone DOS drive?
Post by: james_s on March 29, 2022, 08:33:56 pm
Copying the DOS boot files manually doesn't work, I don't remember the details but something has to be in just the right place. You can use sys c: if you have sys.com or you can format c:/s, both will copy the needed system files and make the drive bootable.
Title: Re: How to clone DOS drive?
Post by: nightfire on March 30, 2022, 10:19:12 am
Yes, the Floppy disk has to be bootable- so the simple way is with the "sys" command, but theoretically you could do it also with tools that modify the mbr like fdisk and then copy stuff like command.com, config.sys and autoexec.bat to the floppy.
Title: Re: How to clone DOS drive?
Post by: jmelson on April 01, 2022, 12:56:26 am
OK, problem solved!  I built a DOS 7.1 system, copied all the files over, and then added in the specific lines from the old CONFIG.SYS and AUTOEXEC.BAT files,  and the special app ran, but did not show the right graphics.  So, I had to install ANSI.SYS and load it in CONFIG.SYS, then the whole thing worked!
Thanks for all the help.
Jon
Title: Re: How to clone DOS drive?
Post by: m k on April 03, 2022, 05:33:48 pm
What happens if you make a partition smaller than 512MB? I vaguely remember having to use overlay programs on some older machines when larger hard drives became available. I have a 5GB drive in my IBM XT and it works fine, although I'm using a XT-IDE card with modern BIOS on it.
The only partition on the disk is 162 MB.  But, I think the problem is the stupid PATA-SATA adaptor makes some crazy C/H/S settings.
Jon
Ugh!  The drive that boots up win95 fine in my P&P machine shows up as 65525 cylinders on the new computer.  So,  maybe the diff is the MBR code on that one can handle it.
This is getting confusing!
Jon

Do you know drive geometries?
You can't use CHS geometry in LBA disk, access is not possible.

Can you connect 2nd drive to that old machine?
You can also connect only that new drive and check its geometry.

Your problem seems to be that you're using Linux in between and it understands more than this old DOS.
You need that original DOS doing the thing.

There's nothing magic with DOS, FORMAT /S D: or SYS D: will do the trick.
Then copying COMMAND.COM if it's missing and you have a functional system disk.
After partitioning the disk first of course, and don't forget to activate the partition.
http://facstaff.uwa.edu/bmoore/340/theBasics/Operations%20of%20FDISK%20The%20Basics%20of%20FDISK.htm (http://facstaff.uwa.edu/bmoore/340/theBasics/Operations%20of%20FDISK%20The%20Basics%20of%20FDISK.htm)

Physical locations of those hidden system files are fixed, no restrictions after that.
But something else in your system can also have a fixed location.
If so then you need to maintain the geometry and duplicate the disk.
Some copy protections had that kind of easter eggs.
Title: Re: How to clone DOS drive?
Post by: SL4P on April 04, 2022, 12:07:57 am
Im jumping in here, having read only 20% of the thread, but what about some attempt with Ghost from the early 2000s?
Playing with the target options, you might get lucky creating a bootable working version of the original image.
If you can get it to load, you may then be able to update any drivers etc that have fallen by the wayside…
Title: Re: How to clone DOS drive?
Post by: BeBuLamar on June 23, 2022, 11:38:04 pm
I generally have to use a floppy disk to partition, set the partition as startup, format the drive with system files. The simply copy the rest over.