This tutorial will show you the basics on how to use the command-prompt-based program called diskpart. I will be showing how to format HDDs and USBs using this utility. If you have any questions. How to perform a secure disk wipe with Windows 10's Format command by Greg Shultz in Software on February 8, 2017, 5:46 AM PST No need to track down a third-party hard drive wipe utility.
I am trying to come as close to a low level format as possible so I wrote zero's to my HD using the 'clean all' command in diskpart.exe. I also fixed the master boot record using the bootrec.exe 'bootrec /fixmbr' command. Afterwards, I became worried that I may have erased the bad sector map so I tried to run chkdsk but ran into problems. Primarily, I was told that the drive was write protected which seemed strange because I am able to install windows. Perhaps I was not using an elevated command prompt with administrator permissions? I did not assign a drive letter beforehand or use a drive letter when running chkdsk (although I did try '0' and 'disk 0') so perhaps that was the source of the problem.
Perhaps I should ask whether Windows 7 checks for bad sectors on a HD while installing?
Ultimately, what I need to know is whether performing the 'clean all' command in diskpart erases the map of bad sectors or not because I am worried about malware hiding in that portion of the hard drive. If 'clean all' doesn't erase that portion of the drive then I need to figure out how to do so (preferably by booting to Windows 7 and/or DOS command line). If 'cleam all' does erase the map of bad sectors, then I need to figure out how to recreate it. Any help will be appreciated. Thanks in advance.
What is the DOS debug script to low level format a hard drive?
barlopbarlop2 Answers
I haven't tried this but here is what i've found..
I remember reading, maybe from scott mueller's UGRP book, maybe from david dick's PC support handbook, maybe from some odd article in an old magazine, that you can do a low level format on a hard disk drive with debug. I see a link about it here http://www.fdisk.com/fdisk/HardDrive.htm (he says he's hard it should be done on SATA, though if it was my hdd then I'd risk it. another link not specific to SATA, said the worst that can happen is it formats the hard drive)
there are some debug scripts mentioned there. I haven't tried them.
Here is an MS link on doing a low level format with debug
http://support.microsoft.com/kb/60089
One link mentioned that the worst that can happen is you format your hard drive.
Another link mentioned
From what i've read, the script seems to work on the BIOS of the Hard Disk Controller. (which I think is the green PCB that people change for an identical or one of identical chpiset, when their hard drive doesn't power up).
This link mentions it
http://www.computerhope.com/jargon/l/lowlevel.htmand this link looks excellent and provides the following scripts
http://www.computerhope.com/rdebug.htm#4
The fdisk.com link mentions a bunch of links
http://support.microsoft.com/kb/q106419/
There seems to be issues, it mentionsWARNING: Some computers require the use of third-party hard-disk- partitioning software because the system ROM BIOS does not fully support the drive parameters of the hard disk that is being used or because the hard disk has more than 1024 data cylinders. If you are unsure if your system supports your hard disk, consult your hardware manufacturer or the manufacturer of your partitioning software before proceeding.alsoMS-DOS version 3.3 can address multiple hard-disk partitions, with a primary DOS partition of up to 32 MB and an extended DOS partition containing logical drives of up to 32 MB each; and MS-DOS versions 4.0, 4.01, 5.0, 6.0, and 6.2 can address multiple hard-disk partitions with sizes up to 2 gigabytes (GB).
Here is the Dell linkhttp://support.dell.com/us/en/kb/document.asp?DN=TT1011054but it's broken.. most haven't included it but fortunately it looks like the script is still available herehttp://www.allquests.com/question/2211276/Windows-Defragmenter-corrupts-disk.html
http://support.dell.com/us/en/kb/document.asp?DN=TT1011054, and is copied here:
barlopbarlopOn a Western Digital controller you just got into debug and typed:
And that would low-level format the drive for most WD and Seagate drives of the time.Then you partition it with FDISK, and Format it: