Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone know of a Low-Level Format utility for an IDE drive? 2

Status
Not open for further replies.

Hobbes

MIS
May 11, 1999
53
0
0
US
I'm looking for a utility that will allow me to low-level format an IDE drive that got nuked when one of our sales people spilt coffee on his brand new laptop.&nbsp;&nbsp;I've tried Fdisk, and then formatting the drive, but I start getting bad allocation units about a third of the way through.&nbsp;&nbsp;It's an IBM drive (if that makes any difference).&nbsp;&nbsp;I just hate throwing out a drive if I don't have to.<br><br>Thanks in advance,<br>Hobbes
 
Most of the hard drive manufacturers offer a low-level disk utility at their website. Try to find out who made the drive (I doubt that IBM did it) and see if you can download the software. <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Hi,<br>Recently I go to IBM's web page and found that you can download a utility disk to do the Low-Level format. Simply go to this site and you will get it. <A HREF=" TARGET="_new"> each hard drive manufacturer has it's own Low-Level format utilities. You can download their utility on their web site.
 
Thanks for the information.&nbsp;&nbsp;Of course, I had the manufacturer wrong.&nbsp;&nbsp;The drive is made by Hitachi.&nbsp;&nbsp;So does anyone know where they hide their Low-level format utility programs, I searched their site and got nothing.<br><br>Thanks again,<br>Hobbes
 
Try the following (you need debug.exe on a floppy in your a: drive):<br><br>What you type is boldfaced<br><br><br><b>DEBUG<br>F 200 1000 0<br>a cs:100<br>mov ax,301<br>mov bx,200<br>mov cx,1<br>mov dx,80<br>int 13<br>int 20</b> <br>(hit enter for a blank line)<br><b>g</b><br><br>then reboot and run fdisk<br>
 
I think we would feel better if we knew what some of that Assembly performed, and what items of the CPU instruction are at those address. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
It loads a 3 into AH and 1 into AL (mov ax,301). This prepares it to call Function 3 of Interrupt 13 (Write Disk Sector). A &quot;1&quot; in AL means to write one sector.<br>It loads a 200 into the BX register, which acts as a pointer to the 200th byte in a memory segment (mov bx,200) and since ES wasn't used to point to a memory segment it will end up using 512 bytes (one sector) of conventional memory starting at byte 200.<br>It places a 1 in the CX register, telling Interrupt 13 to write to first sector (mov cx,1) of the first head of hard disk 1 -- C: (mov dx,80).<br>It then invokes Interrupt 13 (int 13), <b>overwriting the boot sector on drive C:</b> with the questionable contents contained at memory address 200.<br>Interrupt 20 (Terminate Program) is invoked to wrap it all up (int 20). Bye-bye hard drive.<br><br><b><font color=red>To all concerned: I would rather blow off my foot with a shotgun than run this little script.</b></font><br><br><br> <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Ah, perhaps I was over-reacting. The script probably wouldn't hurt much if the user was <b>determined</b> to create totally new partitons with FDISK. The 511 bytes of conventional memory following offset 200 consist mostly of zero bytes and a few interrupt vectors. The effect of writing these to the boot sector would be to destroy all partitions and make C: an invalid drive assignment. Not as effective as a low-level format.<br><br>Still, kids, don't try this at home. It will toast you the most. <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
I agree with Alt, running something that performs a overwrite of just the boot sector, will cause tremendous troble when installing some new OS, a low level formater will write 0 bits throughout the entire harddrive, cleaning it off effectively, and saftly without leaving some damaged partition information for the new OS to complain about. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
I've seen that script before.&nbsp;&nbsp;Where I saw it was when the boot sector was messed up in a way that FDISK couldn't remove partitions.&nbsp;&nbsp;The script was to used clear the invalid partition so that FIDSK could create the new one. <p> Jeff<br><a href=mailto: masterracker@hotmail.com> masterracker@hotmail.com</a><br><a href= > </a><br> Of all the things I've lost in life, I miss my mind the most ...
 
Actually... not a bad solution in a pinch. Pardon my alarmist attitude (I get that way when I see uncommented calls to Int 13). The partition problem could be resolved by clearing the byte at 1C2h... but why not kill them all by wiping the entire bootsector (since it requires more work to wipe a byte than it does to wipe a sector)?<br><br>In any case, I'm glad the members see the importance of a thorough disk cleansing, when absolutely necessary (thanks kb244) and that old timers (like MasterRacker) don't chide me when I get excited about a little piece of code.<br><br> <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Thanks to acecce -&nbsp;&nbsp;that piece of code works wonders.<br>I had an old drive that used to have Linux partition on it (Ext2) - Some how the boot sector got corrupted and neither Partition Magic nor Fdisk could delete, recreate, modify, etc anything about it.&nbsp;&nbsp;Way screwed up.&nbsp;&nbsp;That little piece of code cleared the partition info beautifully.&nbsp;&nbsp;<br><br>Thanks again.
 
There ya go... it helped somebody. I'm glad I didn't red-flag it the first time I saw it.<br> <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Ditto-Thanks to acecce! Found myself in the same boat as Madstu. After a couple of failed utilities, the drive was headin' to the garbage...glad I could save it.<br>
 
I'm glad my post was helpful for some people.&nbsp;&nbsp;We've used the routine numerous times where I work with 100% success.<br><br>For those who were so quick to criticize, where was YOUR low level format utility suggestion?<br><br>
 
Read the three posts that preceded yours. &lt;grin&gt;<br><br>Acecce, your suggestion is admirable, and works quite well when the problem is located in the first 512 bytes of the disk, but it doesn't provide the benefits of a low-level format. Those who are interested in performing a low-level format should use only the software provided by the drive manufacturer.<br><br>Again, Acecce, you provided a valuable tip and we thank you. But lighten up. I understand that the code first appeared in a &quot;User to User&quot; tip in a 1991 issue of PC Magazine. Anybody interested in looking it up might find some interesting reading.<br><br>There are no new solutions, only ideas that help. Ideas that fail to help don't end up in the &quot;solution&quot; category.<br> <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Like I said earlier, I'm glad my post was helpful for some people.&nbsp;&nbsp;While my suggestion didn't provide exactly what the original poster asked for, atleast I provided something.<br><br>I've been monitoring some of these forums for quite some time now and have found many useful suggestions.&nbsp;&nbsp;I guess I was just a bit surprised at how quickly some people were to criticize my &quot;script&quot; without providing their own solution.<br>
 
Acecce, nobody was criticizing your tip. A few members&nbsp;&nbsp;(including myself) posted some cautionary comments, mostly because the code included some potentially dangerous calls without comments to explain what was about to happen.<br><br>But the code works, as noted by at least two users. Take it easy.<br> <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top