Solved

Low-level format

Posted on 2001-08-08
21
373 Views
Last Modified: 2008-03-06
How do I create a debug proggy that performs a low-level format?

0
Comment
Question by:Hypermaniak
  • 7
  • 5
  • 3
  • +3
21 Comments
 
LVL 24

Expert Comment

by:SunBow
ID: 6364698
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
 

Author Comment

by:Hypermaniak
ID: 6368318
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
 
LVL 1

Expert Comment

by:speedguns
ID: 6368435
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
 

Author Comment

by:Hypermaniak
ID: 6368447
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
 
LVL 2

Expert Comment

by:XTerm
ID: 6375755
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
 
LVL 16

Expert Comment

by:t0t0
ID: 6378289
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
 

Author Comment

by:Hypermaniak
ID: 6380126
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
 
LVL 1

Expert Comment

by:speedguns
ID: 6380871
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
 
LVL 1

Expert Comment

by:speedguns
ID: 6380872
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
 
LVL 16

Accepted Solution

by:
t0t0 earned 100 total points
ID: 6381180
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Hypermaniak
ID: 6772260
OMG! I totally forgot to award points for the answer!
0
 
LVL 3

Expert Comment

by:FlamingSword
ID: 6772288
> -g 8000 is a ROM

Wow! Someone here really used Debug?
0
 
LVL 1

Expert Comment

by:speedguns
ID: 6772299
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
 
LVL 16

Expert Comment

by:t0t0
ID: 6772512
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
 
LVL 3

Expert Comment

by:FlamingSword
ID: 6773115
> 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
 
LVL 3

Expert Comment

by:FlamingSword
ID: 6773122
> 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
 

Author Comment

by:Hypermaniak
ID: 6775519
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
 

Author Comment

by:Hypermaniak
ID: 6775523
Also the PC manufacturer's top level trouble ticket helped a bit too ^_^
0
 
LVL 1

Expert Comment

by:speedguns
ID: 6776964
Thanks Hypermaniak,  But I'm All Set,  Just Glad you got it working.
0
 

Author Comment

by:Hypermaniak
ID: 6786613
thanx a bundle speed :O)
0
 
LVL 24

Expert Comment

by:SunBow
ID: 6802451
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bunnyEars challenge 6 99
count7 challenge 12 101
tvirtualstringtree freeze when load too manny images 10 52
How to obtain Administrator permission when you are the Administrator 6 62
RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now