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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to format HD - but it's partitioned!!!! 1

Status
Not open for further replies.

christheprogrammer

Programmer
Jul 10, 2000
258
CA
Hi All,
I partitioned my HD awhile ago (Using Partition magic) and installed linux on one of the partitions and win98 on the other. Now I want to rebuild the entire thing (reformat-repartition-reinstall both OS's). The problem is neither Partition Magic nor fdisk will free up the linux partition. With Partition Magic, I get an error in the batch file that it automatically creates for you. FDisk simply doesn't see the linux partition. HOW CAN I FORMAT THE ENTIRE DRIVE?
Thanks for any response
Chris
 
Hi Chris,


My first thought would be to find out the manufacturer of the HD and get hold of a low level format utility for it.

This will totally blow it away, as I as sure you are aware, use it with a bit of respect.

Apart from that sorry out of ideas.... ???
 
do you have a linux boot disk? If you do then make sure that you the linux fdisk on it and then use that program to wipe out the partition. This may work. It seems odd that windows fdisk can get rid of the partition. If you are nervous using the linux fdisk, then you could try doing an install to get to diskdruid if you are using RH or Mandrake and have it clean out the partition, then reboot and put the windows disk back in.....


Good luck....
 
Thanks Troy,
Unfortunately I used Partition Magic to wipe out the linux partition. So I can't boot Linux anymore. PM sees the space, but calls it 'unused' and tries to free it. But like I said, the automatically-generated batch file screws up after it's about 5% done. Thanks, though for your input!
Chris
 
If all else fails, you may want to try and use debug to "zero" or clear the partition tables. Use this as a last resort.

Use FORMAT A: /S to create the system floppy diskette.
Copy DEBUG.COM, FDISK.COM, SYS.COM, FORMAT.COM.
Boot from the diskette, and enter DEBUG to start the debug
utility, and enter the following lines followed by the <ENTER> key:


F 200 L 200 0
a 100
mov ax,301
mov bx,200
mov cx,1
mov dx,0080 (Note: use 0081, 0082, 0083 for 2nd, 3rd, 4th harddisk respectively)
int 13
int 3
(hit ENTER to enter a blank line here)
G=100
q

This is a tidbit I picked up from the net not too long ago.

 
While dxd's solution will probably solve your problem, it may look a little intimidating... even though I am looking forward to trying it myself.

On your problem, are you sure that fdisk does not see a 'non-dos' partition? Delete that if that's the case. And it should work fine. I know it's happened to me.

Even though you can't boot to the linux part, you should still be able to make/use a linux boot disk to wipe the drive prior to an install, then just discontinue the install after you have made the changes.

Last but not least, you could use the boot disks for an NT installation and wipe the drive as if it were prior to an installation then discontinue the install.

Hope this helps,
Peace
 
Boot with a Dos floopy and try the FDISK /MBR command. This will take care of Linux in the boot record. Then you can format the drive. If your DOS floppy doesn't have FDISK /MBR, a Linux boot floppy may.
 
I think that dxd might be pointing you toward a winning solution, not as good as a full low-level format but pretty effective in a pinch. The problem on your drive is probably coming from a single byte in the boot record. Offset 1D2h of the boot record contains the Operating System Indicator for the second partition of the hard drive. If that byte contains an incorrect value, FDISK and Partition Magic refuse to deal with the partition (I've been there and hated every moment).

Dxd's debug code will wipe your boot record, giving FDISK a chance to create new partitions.

Stay on the safe side: make sure you have only one hard drive connected when you run the script.
 
ALT is the man! [sig]<p>John D. Saucier<br><a href=mailto:jsauce@netadvances.com>jsauce@netadvances.com</a><br> [/sig]
 
Thank you everyone for your input. I used the code written by dxd and it worked - sort of. The code seemed to make the operating system 'lose itself' and allowed me to re-format. The linux partition still existed however, even after I re-installed win98. Luckily, I wanted to re-partition and install linux anyway so it all worked out. Thanks a bunch!

Cheers
Chris [sig][/sig]
 
There is a program out there on the net called Ranish Partition Manager you can get it here I had the same problem and it reconized the linux partition and let my do what ever I wanted with the partition tables
Great program..... [sig][/sig]
 
I agree with the previous comments that you need to use either LINUX fdisk or LINUX disk druid, to delete all the partitions. Find this on the linux install diskette or CD ROM. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top