HardDrive detection

Hello, I'm new to this board and it's been roughly 87 years since I programmed in assembler. I have been tasked at work to come up with an assembler program that fits on a bootable floppy drive and kicks off as soon as the PC boots. The program needs to find all harddrives on the computer and run random overwrites to the entire HD that conform to a DOD spec for destroying magnetic media. Sounds like fun until the rubber hits the road. I cannot figure out how to detect all the drives on the PC, should I just start with B: assuming my floppy is in A:, or is there a way to get the current drive letter and then just skip it as I go through each disk? I guess I could just try to write at track 0, cylinder 0, sector 0, and see if there's an error? If there's an error then that drive letter is not valid and move on to the next drive letter?

Anyway, I know there's KillDisk out there and that conforms to the correct DoD spec but the customer wants a custom program that first does some encryption checking so a COTS product just won't cut it. If anyone knows of any freeware source code out there that I can take a look I'd be very grateful. Thanks a bunch!!

Comments

  • i remember that in the source code of Lilo and of the Linux's kernel bootloader there's such a piece of code ...

    just try to look in the arch/i386/bootblock.S of the linux kernel source tree...
  • Hmmm, I'm not sure where to even start looking for that code. I'm a Windoze user. But thanks for the tip. :)

    : i remember that in the source code of Lilo and of the Linux's kernel bootloader there's such a piece of code ...
    :
    : just try to look in the arch/i386/bootblock.S of the linux kernel source tree...
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories