Low-level format

How do I create a debug proggy that performs a low-level format?

HypermaniakAsked:
Who is Participating?
 
t0t0Connect With a Mentor Commented:
Seems like we're from the same old school speedguns....

Hypermaniak, you should be able to obtain a low level format utility from the drive's manufacturer....

Also, take a look at SpinRite - a HDD utility for mucking about with the low level stuff.

Finally, be aware that some drives should NOT be low-level formatted....

Have you considered writing your own low-level formatter using DOS BIOS routines?.... It's not rocket-science stuff....and it's fun....

-g 8000 is a ROM BIOS low-level formatting routine....don't hear of it nowadays though...
0
 
SunBowCommented:
Mostly you don't. Mainly because each HD has different requirements, and the option is not available in BIOS, which is about the lowest level any proggie can go.

How this disk access function can be called debugging, I have not a clue.  This is not about distributing trojans, is it?  Low-level utilities require hands on. By definition. Forget any thought on distributions.
0
 
HypermaniakAuthor Commented:
No...not distributing trojies.  Just tryin to learn about debug DOS programming.  I did a low-level format on my HD once, but I forgot what I did.  I remember that I used debug to do it tho.  I just forget the sequence that I was told.  I figured that it might be a useful tool if I caught a viri anytime soon because of the different attacks out there nowadays (with SirCAM, CodeRed, etc.)
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
speedgunsCommented:
When you did that low level format using Debug, I am assuming that you entered several lines of ASM code which set some registers, then called a bios interupt to perform the format.   Not exactly the same as creating
a Program. further, if you created a program using Debug, what would stop it from getting the virus?  Why wouldn't Debug be affected?  Wouldn't you rather clean the disk than re format it?  in any event,

you could check out the PINK SHIRT book or go to

http://www.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html

for a list of interupts. including Bios.
0
 
HypermaniakAuthor Commented:
No...not distributing trojies.  Just tryin to learn about debug DOS programming.  I did a low-level format on my HD once, but I forgot what I did.  I remember that I used debug to do it tho.  I just forget the sequence that I was told.  I figured that it might be a useful tool if I caught a viri anytime soon because of the different attacks out there nowadays (with SirCAM, CodeRed, etc.)
0
 
XTermCommented:
Low level formatting newer disk is dangerous, since they might get damaged.
If you want to clean your disk (I mean really clean), find a windows version (for bootfloppy) of GNU dd, or (even better) get a linux resque disk with dd.

For the primary master (prolly the place of your first disk the command is:
dd if=/dev/zero of/dev/hda bs=1M
It will take a very long time, but your disk will be *empty*.
A better way is to simply
mkfs.msdos /dev/hdax -F 32
To high-level reformat the disk. (This also removes any viruses present.)
0
 
t0t0Commented:
I did something like this some years ago in debug....

I think you have to fire up debug and issue the following command:

G 8000

(if memory serves me right)....


0
 
HypermaniakAuthor Commented:
I'm not interested in the high level format stuff...that is eay enough to accomplish on my own.  

Must clean out entire system.  RAM signatures and all.
BIOS resident memory...the works.

Just figured it as a handy tool to know.

BTW, what does -g 8000 do?

0
 
speedgunsCommented:
G is for GO,   which will begin executing the instruction at <address> which in this case is 8000 Hex.
It seems I remember something like this too.  Perhaps sitting at ROM address 8000 is a routine which
will do a low level format?
0
 
speedgunsCommented:
G is for GO,   which will begin executing the instruction at <address> which in this case is 8000 Hex.
It seems I remember something like this too.  Perhaps sitting at ROM address 8000 is a routine which
will do a low level format?
0
 
HypermaniakAuthor Commented:
OMG! I totally forgot to award points for the answer!
0
 
FlamingSwordCommented:
> -g 8000 is a ROM

Wow! Someone here really used Debug?
0
 
speedgunsCommented:
Congrat's t0t0,  Perhaps I am not the only one around here with my own copy of the PINK SHIRT Book! Yes, I am from a fairly old school,  But the really good stuff, you can't learn in school,  You gotta fire up MASM and try it out.  I actually used to do all of my Assembly stuff from within QuickC which for the money was a heck of a dos dev environment.  But Alas,  Gone are the days of simple <1K TSR's to do stupid dos tricks,  Now adays, you really gotta know something prior to attempting anything analogas in WinDoze.
0
 
t0t0Commented:
Thanks hypermaniak.... Did you have a go at writing your own low level formatter in the end?....

Yeah, speedguns, those were the days eh?....


0
 
FlamingSwordCommented:
> Gone are the days of simple

yeah, yesterday it had to be at least a few MB, now it has to be > 1GB or no one thinks there is any value

my 1st PC defaulted 4KB RAM, upgrade eventually allowed ~ 60k disk

1st work computer - 32 k words (not bytes)
0
 
FlamingSwordCommented:
> Must clean out entire system.  RAM signatures and all.
BIOS resident memory...the works.

???

Hypermaniak, I do hope you heeded the cautions. There is some geometry involved, and no one solution that fits all of the drives models.

If this is also for excessing equipment, you may need to simplify. I've seen that done, contractually.
0
 
HypermaniakAuthor Commented:
yes i did, i tried various debugs in testbed harddrives, as well as contacting the HD manufacturer about settings and addresses prior to doing it on the real thing. It final string ended up to be like a 4 stage string set with a whole lotta numbers involved that i dun really remember anymore :OP heehee!  Worked perfectly (after a few trials and errors)  but many thanx to your contributions...and speedguns, if you would like some points as well, send me an e-mail via maniak@tankpolice.com and I will get a bogus question  set up to have you answer and award you some pts.

And TSRs were the bomb!  Still are.  God exposure to modern day WinOS and modern day "power users" because they are so unaware of DoS skills, that neat little harmless pranks can be pulled off via 1 or 2 TSRs in the boot files.
0
 
HypermaniakAuthor Commented:
Also the PC manufacturer's top level trouble ticket helped a bit too ^_^
0
 
speedgunsCommented:
Thanks Hypermaniak,  But I'm All Set,  Just Glad you got it working.
0
 
HypermaniakAuthor Commented:
thanx a bundle speed :O)
0
 
SunBowCommented:
If you coded that much, I suggest considering tucking the few bytes in your pocket. Take home and wrap it with some I/O to run a pretty wipedisk proggie. Off boot diskette.

In olden times Norton had a useful one. Nowadays companies are upgrading so much that they have decent PCs and HDs going out the door to auctions and donations, but they want/need something to certify that corpo secrets (and licenses) are removed prior to dumping old equipment. I hear nothing of Symantec big marketing here, so IMO there's a buck to be made, if you keep it simple and don't try to charge a fortune. Perhaps model / success rate of the dude that did pkZip. Many do simple fDisk and run, or wipe only first sector. Bit too simple.

Anyway, glad it worked out for you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.