Data recovery and disk repair questions and discussions related to old-fashioned SATA, SAS, SCSI, IDE, MFM hard drives - any type of storage device that has moving parts
Post a reply

Is DOS disk C: on master or slave, primary or secondary HDD?

July 6th, 2014, 12:40

1. Laptop's BIOS allows to boot from either primary or secondary HDD. Once the user boots into DOS, the first partition of the HDD booted from is assigned disk letter C:, and the other HDD's first partition is assigned disk letter D:, provided it is formatted, of course. The problem is, sometimes you tell the BIOS to boot from a secondary HDD, but it sees that the secondary HDD is not bootable or something, and automatically switches to booting from the primary HDD, without letting the user know it switched. So, there is never a complete certainty as to which HDD was booted from. Once the user is under DOS and can access the C: disk, how can he programmatically determine if disk C: actually belongs to the primary or the secondary HDD? Could somebody post an assembly language code?
2. The same question for master and slave HDDs.
3. The same question for SATA HDDs. The BIOS allows to boot from any of the three SATA HDDs. Once the user is under DOS, how can he determine which of the three HDDs disk C: belongs to?

Re: Is DOS disk C: on master or slave, primary or secondary

July 6th, 2014, 14:20

I don't know how to answer your question directly, but I would choose appropriate Volume Names for each partition using the DOS Label command, eg ...

    LABEL x: IDE_PM_PAR1
    LABEL x: IDE_PM_PAR2
    LABEL x: IDE_PS_PAR1
    LABEL x: IDE_SM_PAR1
    LABEL x: SATA1_PART1
    LABEL x: SATA2_PART1

You could then identify the physical drive by typing ...

    VOL x:

Re: Is DOS disk C: on master or slave, primary or secondary

July 6th, 2014, 21:12

That won't help much in my situation. I have two almost identical hard drives, they have identical partitions and identical volume labels. I want to create a backup by copying one hard drive onto the other sector by sector. I need to know exactly which hard drive is primary and which is secondary, so I don't end up copying the copy onto the original. Also, volume labels won't help in a case of sector-by-sector copying of unformatted and unpartitioned hard drives.
When you boot from a secondary hard drive, BIOS makes it look like it is HDD 1, even though it is physically connected to a secondary HDD slot, and the other hard drive, physically connected to the primary slot, becomes HDD 2. I need to be able to figure out which hard drive is which by using a DOS interrupt or reading / writing to or from some ports. Is it possible?

Re: Is DOS disk C: on master or slave, primary or secondary

July 7th, 2014, 8:15

Greetings !

Buy a RAID card and connect the drives as RAID 1 (mirror).

Changing the volume label of one drive sounds fine as well, because it will not afect the drive content neither the files you store.

You can use the "dir" command to check what files are present on the directory.
Post a reply