Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the DOS debug script to low level format a hard drive?

share|improve this question
    
not that useful but I posted it in relation to this question superuser.com/questions/194396/how-to-do-a-low-level-format –  barlop Apr 30 '11 at 13:37
1  
Is a low-level format even possible these days? –  grawity Apr 30 '11 at 18:39
1  
@grawity, nope; not generally. Most drives manufactured from the past 1.5 decades no longer support it. Most of the links in the answer below are simply about filling the first bunch of sectors with zeros, thus wiping out the partition tables and such. I think the OP may need to brush up on what an actual llf is. –  Bobson Nov 21 '11 at 2:25
add comment

1 Answer

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.htm and this link looks excellent and provides the following scripts
http://www.computerhope.com/rdebug.htm#4

Erase all hard drive information

This debug routine is used to erase all partition information on the hard disk drive and is only recommend for experienced users or users who are unable to delete the partition information through fdisk.

In the below debug routine, only type what is in bold from line 3 to 8, you will get a response if typed in properly. If you get a response continue to type the bold text as shown below in the below example.

A:\>debug <enter>
-F 200 L1000 0 <enter>
-A CS:100 <enter>
xxxx:0100 MOV AX,301 <enter>
xxxx:0103 MOV BX,200 <enter>
xxxx:0106 MOV CX,1 <enter>
xxxx:0109 MOV DX,80 <enter>

(80 for hd 0 or 81 for hd 1 )

xxxx:010C INT 13 <enter>
xxxx:010E INT 20 <enter>
xxxx:0110 <enter>
-g <enter>
Program terminated normally
-q<enter>

Once this debug routine is complete, reboot computer and all partitions should be erased. Before anything can be installed back onto the computer you must run Fdisk and recreate the partition as well as format the hard disk drive.

Additional information about fdisk can be found on our fdisk page.
Additional information about format can be found on our format page.
Erase hard drive and clear CMOS

Before doing the below routine ensure that you read our disclaimer as well as are sure that this is safe to do on your hard drive. Some computer hard drive manufacturers may void your warranty or this may cause damage to the hard drive when doing the below example. This routine is useful in clearing DDO and removing possible viruses. If this routine completes successfully it will erase everything from your Hard drive as well as your reset your CMOS values.

In the below debug routine, only type what is in bold from line 3 to 17, you will get a response if typed in properly. If you get a response continue to type the bold text as shown below in the below example.

A:\>debug <enter>
-fcs:200 400 0 <enter>
-acs:100 <enter>
-xxxx:0100 mov ax, 0 <enter>
-xxxx:0103 mov ax, cx <enter>
-xxxx:0105 out 70, al <enter>
-xxxx:0107 mov ax, 0 <enter>
-xxxx:010a out 71,al <enter>
-xxxx:010c inc cx <enter>
-xxxx:010d cmp cx,100 <enter>
-xxxx:0111 jb 103 <enter>
-xxxx:0113 mov ax,302 <enter>
-xxxx:0116 mov bx,200 <enter>
-xxxx:0119 mov cx,1 <enter>
-xxxx:011c mov dx,80 <enter>
-xxxx:011f int 13 <enter>
-xxxx:012l int 20 <enter>
-xxxx:0123 <enter> (without typing anything.)
-g <enter>
program terminated normally
If you are doing this debug routine to clear out a possible virus turn off your computer and wait and turn back on.
-q <enter>
Once back at DOS, reboot your computer

When your computer comes back on from doing the above you will get an error message as booting up the computer, such as Invalid Configuration. You must enter CMOS and set the time and date, save, and reboot again. Once rebooted, you will then need to run fdisk and recreate the partitions. Once created, you will then need to format the hard drive and proceed as normal.

The fdisk.com link mentions a bunch of links
http://support.microsoft.com/kb/q106419/

There seems to be issues, it mentions WARNING: 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. also MS-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 link http://support.dell.com/us/en/kb/document.asp?DN=TT1011054 but it's broken.. most haven't included it but fortunately it looks like the script is still available here http://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:

"MS-DOS?? Partition Removal Debug Script 

CAUTION: This debug script is for advanced users only. Its purpose is to remove all formatting and partitioning information from your hard disk when FDISK is unable to do so. THIS WILL ALSO REMOVE ALL DATA AND PROGRAMS FROM THE DRIVE. REPEAT: The next steps will remove all data from hard-disk drive. We URGE YOU to make a back-up of any data and programs that you wish to save before proceeding. REMEMBER: ALL DATA WILL BE LOST! Be sure you have the necessary bootable media and files to reboot your system and install your operating system (boot disk with CDROM drivers, MSCDEX, FDISK, FORMAT, SYS, etc). 

Turn on the computer. When the message Starting MS-DOS?? appears press [F5]. If you are using Windows?? 95, when the message Starting Windows 95 appears press [F8]. Then select Command Prompt Only. 
At the DOS command prompt, type the following:
debug[Enter]
where [ENTER] is to press the enter key once. 
CAUTION: Performing the following will remove all data from your hard disk drive.

NOTE: Type the following bolded text only. You will receive an error if you type anything other than the bold text. The non-bolded text represents what will appear on your screen once you press [Enter] after typing each command.

-F 200 L1000 0 [Enter] 
-A CS:100 [Enter]
xxxx:0100 MOV AX,301 [Enter] 
xxxx:0103 MOV BX,200 [Enter] 
xxxx:0106 MOV CX,1 [Enter] 
xxxx:0109 MOV DX,80 [Enter] 

NOTE: ( -- "80" for hd 0, "81" for hd 1 ) 

xxxx:010C INT 13 [Enter] 
xxxx:010E INT 20 [Enter] 
xxxx:0110 [Enter] 
-G [Enter] 
"Program terminated normally" 


Turn off the computer. On the next startup the hard drive will need to be partitoned and formatted. "
share|improve this answer
    
Dell had a dos utility during the Win98 days that zero'ed the first 1K of the hard drive, essentially wiping all partitions without the time consuming low level format, it was called Clean1K, hard to find but I have a copy....support.dell.com/support/topics/topic.aspx/la/shared/support/… –  Moab Apr 30 '11 at 18:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.