Click to See Complete Forum and Search --> : How do I erase a Linux partition?
MailGirl
08-15-2001, 11:43 PM
I installed Redhat 7 on one of my computers to mess around with (first time ever using Linux). Now I'd like to wipe the hard drive clean so I can install Windows.
Using a Windows boot disk, I can start fdisk (after a format c: ) and see the partitions: PRI DOS and EXT DOS. Fdisk can't delete any of them...it says: "Cannot delete Primary DOS Partition on drive 1 when an Extended DOS Partition exists" and "Cannot delete Extended DOS Partition while logical drives exist." I tried to delete any logical drives, but it says that there are none. I guess that the EXT DOS is the Linux partition, and fdisk is just getting confused because it can't recognize it?
Can someone please tell me how to wipe my hard drive? I can't figure it out. :(
[ 15 August 2001: Message edited by: MailGirl ]
Malakin
08-15-2001, 11:56 PM
The dos fdisk utility is rather useless. You can get a newer one here that will do the job though: http://www.23cc.com/free-fdisk/
I'm not much of a windows user these days but can't you just boot off of the windows cd and do stuff like partitioning?
MailGirl
08-16-2001, 12:04 AM
Downloading now, thank you! :)
As far as using Windows to partition...I think they expect you use use fdisk, as that's what's on the boot disk.
[ 16 August 2001: Message edited by: MailGirl ]
Malakin
08-16-2001, 12:14 AM
I read your message, sent you a copy, hit refresh and now I see you don't need it, oh well :)
MailGirl
08-16-2001, 12:29 AM
Yeah, my ISP has been having intermittent DNS problems lately. Thanks.
Formatting the hard drive now...going from a Celeron 466 to an Athlon 1400, I'm so excited! :)
lilrabbit129
08-16-2001, 01:20 AM
actualyl i think you can still delete partitions usig the win fdisk.. try using the delete non dos partition option.. it works for me anyway
hope that helps!
Malakin
08-16-2001, 02:03 AM
I had the same problem before and the ms version of fdisk I was using definitely wouldn't delete some partitions.
Edit: This includes trying to do an "fdisk /mbr" and then trying to remove the partition. The version of fdisk I was using was from win98se so it wasn't an old version either. Choosing "non dos partition" wouldn't work. I see some people suggesting partition magic, it's nice but rather expensive if all you want to do is remove and create some partitions.
you can also use your install disk for Linux and when it gets to the partition part,use it to delete the partitions..Then you can abort the install and be free of them...I always wondered if that worked but never tried it, guess I might start doing it that way :)
Ranish Partition Manager looks interesting, I'll have to give it a try sometime. http://www.users.intercom.com/~ranish/part/
[ 16 August 2001: Message edited by: idealego ]
jolphil
08-16-2001, 09:28 AM
Hi,
You should have some good ideas now how to get rid of the Linux partitions..Just to throw in a few more..First you can get Ranish Partition manager(free) that will do it..You can also use your install disk for Linux and when it gets to the partition part,use it to delete the partitions..Then you can abort the install and be free of them...Finally I am curious about the free dos fdisk Idealego suggested.Just how do you go about putting it on a floppy..Do you make a windows system disk then extract free dos fdisk to the floppy? Also did you delete the windows fdisk from the floppy first? Good Luck on the partition delete..
bdg1983
08-16-2001, 10:16 AM
I've downloaded the freedos fdisk zip file and it seems you need to compile it.
Have a dos 6.?, Win95 or Win98 boot disk ready and copy the compiled freedos fdisk and whatever other files it needs to the disk. I would guess replacing the ms fdisk or just rename the ms fdisk to i.e. fdiskms.com
Correction... There is already a binary fdisk.exe included in the package. I don't know if compiling is really necessary. Guess you just need to read the include documentation.
[ 16 August 2001: Message edited by: mdwatts the 3rd ]
cperry42975
08-16-2001, 10:29 AM
Actually if you do an fdisk /mbr or formay /mbr you should be able to then remove the partition with fdisk
Dunceor
08-16-2001, 10:30 AM
I have been haveing the same problem and I've been looking for a solution for some days now but can't find it either.
To find some info on my quest to remove the linux check this on another BBS:
http://www.undergroundnews.com/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=4&t=000183
So I hope u can help me more because i can't remove it :(
// Dunceor
cypunk06
08-16-2001, 10:37 AM
Just thought I would add my 2 1/2 cents in. I am a mandrake install king :D
I have reinstalled and formatted to the brink of insanity. The best way I have found, as long as windows is still there is fdisk /mbr <master boot record> which will default back to windows. Once in windows, get partition majic,it will allow you to kill the linux partition and give it back to windows.
Hope this helped..........
Dunceor
08-16-2001, 10:53 AM
Well the thing is that since i can't delete the linux partition and only the MBR there is only 24 mb for windows to install on and that isn't enough as u understand. So just deleting the MBR doesn't help. It did just remove my /boot :P
// Dunceor
bdg1983
08-16-2001, 11:50 AM
I've heard about the dos/win fdisk being able to delete ext2 partitions though I've never tried it. It's supposed to work if you select non-dos partition.
Worth a try?
If it does work, then also do 'fdisk /mbr' and then reboot, run fdisk again and create all the fat32 partitions you need. Next format and away you go until the next time you get fed up and want to install Linux again. ;)
FoBoT
08-16-2001, 12:28 PM
Originally posted by jolphil:
<STRONG>First you can get Ranish Partition manager(free) that will do it..</STRONG>
i agree , it works well and is easy to use http://www.users.intercom.com/~ranish/part/
ghost logical partion occur when you install a *nix partion on top of an extended dos partion or you format the partion without deleting the existing partion first --i format the ghost partion as ufs from freebsd then deleted it---but fdisk has to delete the extended dos first but if it sees a drive inside it it assumes it is a logical drive but then when you try to delete it says that isnt one because no logical drives are there
cypunk06
08-16-2001, 10:22 PM
whoa....DON"T DELETE THE MBR.....just type in dos
fdisk /mbr
that SHOULD get you into WIN.
then once in WIN, do what needs to be done.
Last resort: use windows debug mode to reset the drive - basically blanks it completely so you can start your partition creation from scratch. Works great, though comes with a disclaimer that it may screw upo your drive. Never has so far.
Here's what you do (part of what is below is what is written at the prompt, should be easy enough to figure out what you type in):
Boot to Win startup disk. Type in debug at the A: prompt
-F 220 L1000 0 (ENTER)
-A CS: 100 (ENTER)
xxxx:0100 MOV AX,301 (ENTER)
xxxx:0103 MOV BX,200 (ENTER)
xxxx:0106 MOV CX,1 (ENTER)
xxxx:0109 MOV DX,80 (ENTER) <---"80" for hd1, "81" for hd2 >
xxxx:010C INT 13 (ENTER)
xxxx:010E INT 20 (ENTER)
xxxx:0110 (ENTER) <-------BLANK LINE "VERY IMPORTANT" >
-G (ENTER)
Program terminated normally
- (CTRL)-(ALT)-(DEL) to reboot system
Now you have to f-disk and format and reinstall the operating system.
UltraMagnus
08-17-2001, 12:54 AM
Umm, a windows bootdisk will work. You have to delete the extended/non-dos partitions first. I have always used the Windows disk to wipe out my hardrive. I'm not really sure all this debugging, download this and that is really necessary but all help is always appreciated. Later.
boberan
08-18-2001, 12:00 PM
This uses the debug utility and it is a little and you dont have to type much.
This will while the whole HDD so dont do it if you have stuff you dont want to loose.
copy the following into notepade and call it whiphdd.txt or something. After the copy you may need to hit enter after each line, not sure.
a 100
int 13
rax
0301
rbx
0200
f 200 l 200 0
rcx
0001
rdx
0080
p
q
Put in a new floppy go to start run and type "sys a:"
Then copy debug.exe and whiphdd.txt to the floppy.
then boot to the disk and type the following
from the A: prompt.
"debug < whiphdd.txt"
That will whip your hdd pretty quick. I use it when fdisk cant del primary when locical drive exists and there are no locical drives left. It kind of is a handy disk to keep around.