Computing.Net > Forums > Linux > Hard drive help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Hard drive help

Reply to Message Icon

Name: bsewell
Date: April 29, 2004 at 01:38:55 Pacific
OS: Slackware 9.1
CPU/Ram: pentium 4 1.7GHz, 512 DDR
Comment:

This is for everyone who for some reason have to format their hard drive again because they have messed up linux or windows XP. I've seen requests on how to do this quite a few times in the forum so here is how to do it. From the 4 times I have had to do this, I have not had a single problem with this and this should be fool-proof. Never the less, I have done simple instructions line-by-line for people to follow.

You will need the following for this:
1) A windows 98 boot-disk with DEBUG.exe on it. If you do not have a windows 98 boot-disk then you can use a blank floppy diskette and download a boot-disk creator from here: http://www.bootdisk.com/bootdisk.htm . If you don't have DEBUG.exe then you can copy it from a windows computer by searching for it using Find.

2) Careful concerntration

How to make a hard drive back to its factory state:
1) Insert windows 98 bootdisk

2) When your computer turns on, press the key to enter the BIOS. This is ussually DEL on most computers.

3) Select the floppy drive as 1st boot up device, followed by the hard drive.

4) Save the changes. Reboot your computer.

5) Let the windows 98 boot disk ask whether to start computer with or without a CD-ROM. Choose it to start without a CD-ROM, since you are not required to use a CD-ROM.

6) Once it reaches the command prompt, typically <C:\WINDOWS\> , type 'a:' so you see this: <A:\>.

7) Type in the following:
format c:

8) A warning will come up asking whether you are sure you want to do this. Select Y and press ENTER.

9) Wait for the formatting to finish. When it asks for a Volume Label just press ENTER.

10) Type in the following:
debug

11) At the '-' prompt, type the following, followed by pressing ENTER:
f 9000:0 200 0

12) Press 'a' and press ENTER.

13) Type in each line exactly, pressing ENTER everytimg you come to the end of a line:
mov dx,9000
mov es,dx
xor bx,bx
mov cx,0001
mov dx,0080
mov ax,0301
int 13
int 20

14) Press ENTER

15) Press 'g' and press ENTER. Provided you entered everything correctly, the computer will display "Program terminated normally".

16) Press 'q' and press ENTER.

17) Check that the command prompt has <A:\>. If not then type:
a:

18) Type in the following:
format c:

19) A warning will come up asking whether you are sure you want to do this. Select Y and press ENTER.

20) Wait for the formatting to finish. When it asks for a Volume Label just press ENTER.

And there you have it folks. You are now able to install windows or linux again, having successfully made your hard drive empty and getting rid of the linux partition information.

References:
http://www.linuxgazette.com/issue63/okopnik.html
http://www.bootdisk.com/bootdisk.htm

Ben,
Pentium 4 1.7GHz, 512 LB Cache
512 DDR RAM PC2700
ATI Radeon 9200SE 128 DDR RAM
Western Digital 80GB 7200 RPM



Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: April 29, 2004 at 03:18:32 Pacific
Reply:

The hard drive's "factory state" will be completely unpartitioned and unformated. To get it like this just delete all the partitons with fdisk (either the linux version or DOS....sometimes the DOS version can have problems with linux partition). You might also be able to carry out a low level format via your BIOS or manufacturers tools.

Why bother formating a partition to FAT when you want to install linux as it will have to delete the partition and use it's own partition type and file system? (eg linux swap has a partition type of 82, linux ext2 uses type 83) The same goes for windoze NT/2000/XP, you can delete, create and format partitions during setup. fair enough if you want to install win9x.

I have NEVER needed to use debug to format drives to FAT, EXT2, reiser etc.

I'm not flaming, but I think a lot of the above seems pointless.....


0

Response Number 2
Name: taurus
Date: April 29, 2004 at 04:31:33 Pacific
Reply:

There is an easy way and a hard way to do things and it looks like you are doing it the hard way, real hard way!!! Either fdisk or cfdisk in Linux can achieve what you want to do so what's the point besides wasting a little time...

taurus


0

Response Number 3
Name: Wolfbone
Date: April 29, 2004 at 05:29:59 Pacific
Reply:

I agree with 3Dave and taurus. If you go look at the referenced linuxgazette article, it points out the easy way to wipe the mbr and/or partition the drive is to use a floppy sized Linux distro like Tom's Root-Boot.

The procedure as given seems pretty eccentric and long-winded to me - but then anyone who has 'had to do it 4 times' probably enjoys doing it.



0

Response Number 4
Name: Dlonra
Date: April 29, 2004 at 10:21:44 Pacific
Reply:

what could be simpler and safer than typing x86 assembler code (with no misteaks) under windoze? of course, linux-only users need to purchase some version of win.

to make things simpler the 5th time - How about saving your boot-sector(s) to diskette for restore.
Or even fdisk -l to a file which you print out?


0

Response Number 5
Name: bsewell
Date: April 29, 2004 at 16:33:49 Pacific
Reply:

Dlonra, not entirely true. I have given a link to download a boot-disk creator if you look at the top.

This was only supposed to be a solution to do in DOS. It assumed that a user may not have created a linux boot-disk. To me, this personally is a pretty easy method in terms of I know what is happening all along. Last time I tried a linux-solution for this I ended up messing up the hard drive.

Ben,
Pentium 4 1.7GHz, 512 LB Cache
512 DDR RAM PC2700
ATI Radeon 9200SE 128 DDR RAM
Western Digital 80GB 7200 RPM


0

Related Posts

See More



Response Number 6
Name: Dlonra
Date: April 29, 2004 at 17:18:33 Pacific
Reply:

bsewell,
as 3Dave said, are you describing a procedure that will intentionally result in your drive "be completely unpartitioned and unformated"?

Does this mean you will have to reinstall everything:,losing personal data, settings and custom software previously installed?

If so, there are better ways, many of them described above.

BTW, if your goal is to wipe the disk, what does "messing up the hard drive" mean?



0

Response Number 7
Name: bsewell
Date: April 29, 2004 at 23:10:33 Pacific
Reply:

dl0nra, yes about leaving the drive unpartitioned and unformatted.
So what does "messing up the drive" do? Hmm let's say you still have linux on your computer and want to get rid of it. You have followed the advice of Computing.net that linux is not for beginners for computers so you have decided to install windows XP/2000. You up in the setup cd, and when setup says the disk needs to be partitioned, you choose it to be in NTFS file system. Later on when you restart the computer after setup has finished copying the files over, you have to re-boot. Co-incidently the computer says "Invalid Partition Table". Hmm so you say I will format c:\ again and hope this works. WRONG since once you have formatted the hard drive again and try to access c:\ you get "Error reading drive C:\. Abort, retry, ignore". Viola, your new hard drive is now useless.

Now back to the original post, this is for those who don't have another OS installed except for DOS. Of course you can just un-install lilo but what about the users who forgot to do so?
Don't reply back to this as this is going major off-topic and to be honest I can't see any grateful-ness for me even bothering posting this so people don't make the same mistake I did. Good day.

Ben,
Pentium 4 1.7GHz, 512 LB Cache
512 DDR RAM PC2700
ATI Radeon 9200SE 128 DDR RAM
Western Digital 80GB 7200 RPM


0

Response Number 8
Name: 3Dave
Date: April 30, 2004 at 02:45:40 Pacific
Reply:

A linux partition of type 0x81-0x83 shouldn't be formatted to FAT but instead deleted and different partition created for FAT with a type 0xb-0xf. That's probably why you were getting "Invalid Partition Table" as the file system differs to the partition type.

FYI a list of partition types:
http://www.win.tue.nl/~aeb/partitions/partition_types-1.html



0

Response Number 9
Name: Ronald
Date: April 30, 2004 at 21:15:59 Pacific
Reply:

I find that fdisk works great or cfdisk a floppy based distro like HAL 91 is great for this.
To completely wipe the drive a nuke boot disk is the best route let it run over night it will write 1s and 0s to the drive over and over.
Then you can sell donate or partition format and install your favorite distro like Slack or Fedora


0

Response Number 10
Name: Dlonra
Date: May 1, 2004 at 09:28:24 Pacific
Reply:

for those who have only DOS or DOS/windows installed, as I did 15 years ago: DOS/windows fdisk will "clean up" a mis-formatted (partition table damaged) hard drive. boot DOS from floppy, run fdisk, erase all paritions if you really need to.
Other than fdisk and Norton utilities, circa 1985, I was able to restore (numerous times) my drives from my own stupidity, viri and some hardware problems.
During this time, I did become, unfortunately, facile in retyping hex partitions table if I needed to restore rather than erase.

KISS

PS: I too often neglect this imperative: back up your important files - Yeah, but do it


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Hard drive help

Bootable hard drive? www.computing.net/answers/linux/bootable-hard-drive/30330.html

crashed hard drive! Help! www.computing.net/answers/linux/crashed-hard-drive-help/23329.html

boot from hard drive www.computing.net/answers/linux/boot-from-hard-drive/5416.html