Safely delete Linux partition from within XP.Few months ago, i tried to learn linux and later on i gave up the idea of using it. These days, i'm using linux on "VMware workstation". VMware workstation lets anyone(esp. software tester,virus maker,software developver etc) install any OS and try their guinea-pig application out there. I used to install plain win 98 with no antivirus inside VMware workstation and install application with virus/malwares. Now, trying them to disable or make those virus vanish is real tough job but you'd learn how to tackle threats in real life application. Anyway, happy to know that any virus inside that virtualisation layer won't come out to our real desktop and won't affect at all. So, anyone can try anything inside the VMware workstation.
Well, my motive of writing this post is because when i didn't know about this VMware workstation, just to learn new things, i once installed Fedore Core 3 on my system. There was XP and i installed Fedore Core Linux on second partition. I was panicked, since i was doing that looking each step from printed papers. Later i didn't want that linux at all and i really wanted to have my XP untouched. Lets check it out, how to remove the linux partition so easily. If you try yourself without knowing what you are doing,you'll corrupt your XP boot files and the only way left would be fresh re-install of XP.
Please follow the steps i'm showing here if you are about to remove those hazardous OSes from XP:
1. Delete partition with linux using Windows computer management. (run->compmgmt.msc)
2. Boot from the relevant XP CD. Access 'Recovery console'(that console will look like MS-DOS prompt but you can't use any of the DOS command out there)
3. Give the following commands out there:
fixboot c: (and enter)
fixmbr (and enter)
Reboot and check if XP is booting properly or not. If not, partition tables are corrupt. So, 'fixmbr' command is useleses. Lets try another method, this time, we are going to make that corrupted partion as ACTIVE and see if it works.
1. Access the 'Recovery Console'(to start this console, please follow above step 1 and 2)
2. type "DISKPART" without quotes (and enter)
3. now type "list disks" without quotes(and enter)
(will show no of harddisks, if there is only one harddisk, then the returned message will show 0 )
4. To select that harddisk, type " select disk 0 " without quotes (and enter)
5. Type "List partitions" without quotes(and enter)
6. Type "Select partition 1' to select your C: drive. (and enter)
7. Type "active" without quotes(and enter)
8. To make the partition inactive, use the same approach above and type "inactive" without quotes
9. Type "exit" to leave diskpart.
Note: btw, follow above steps only if your C: drive's system and boot files are intact else it's useless.
One more Note:
"ntldr not found" message
Due to virus and some sort of problems, 'ntldr' loader file gets deleted. Some people re-install entire XP to fix this type of problem. But, we can use the same commands in Recovery Console as mentioned in above steps.
using 'fixboot c:' command
This will simple install the ntldr and other necessary files to XP root from the XP CD.