I reinstalled Windows XP on a friend's computer. It was nuked with viruses and malware, so I booted with a Ubuntu live CD and used GParted to make a new partition (recovery), move all of their files onto the partition, and erase the primary.

After reinstalling Windows XP, I moved their files back onto the C: drive, and went to disk management to remove the parition. However, the D: partition now has a system flag, even though Windows is installed on the C: drive, with the boot flag and settings, and there is NOTHING on D:

How can I safely remove it (Windows won't let from the GUI) without losing access to the XP install, so I can recover the space from growing the C partition?

Here is a picture of the partitions:

Partition Layout In Windows Screenshot

Update: I am informed removing the system partition would ruin the boot loader; can I get an example or walkthrough on how I can reclaim this space? I don't want to be figuring it out "on the fly" when I finally go to fix this problem.

  • the picture is too small. Use a service like tinypic or imageshack to upload and post it here. Anyway, You can use the Recovery Console of XP disk and try BOOTCFG /REBUILD or fixmbr and fixboot commands. That MIGHT fix the problem.. – Bibhas Feb 12 '10 at 13:48
  • Whoops, thought you were able to click all sizes! :s Let me fix that. – Urda Feb 12 '10 at 14:36
  • OK How is the new link? – Urda Feb 12 '10 at 14:37
  • The "Boot" drive is where the OS is. The "System" drive is where the boot loader is and where Windows is expecting the BIOS to kickstart the boot sequence. support.microsoft.com/kb/314470 – Chris Smith Aug 18 '11 at 4:04

I would suggest using your LiveCD again to remove the partition if it is indeed empty. Then use Windows to recreate it as needed.

  • The System partition is the one that contains NTLDR and Boot.ini; if you remove it like this, your system will no longer boot! – Stephen Jennings Feb 12 '10 at 16:27
  • What can I do to fix this? How would I restore it to boot? I want to reclaim the space... Stephen if you could write up an answer for me that would be great. – Urda Feb 17 '10 at 15:56
  • I agree with the original poster. Removing the 2nd partition from a LiveCD might render the disk unbootable, but then inserting an XP CD and doing a repair install should fix the problem (if the procedure actually causes one). – Nicholaz Feb 17 '10 at 16:09
  • OK, I may have a game plan. Will be trying this soon. Please keep the notes coming, the last thing I want to do is explode the system – Urda Feb 17 '10 at 20:49
  • I am marking this as solved, because I believe with 90% certainty that this will correct my issue when I finally get a chance to sit in front of the computer. – Urda Feb 24 '10 at 15:33

Have you looked at the boot.ini file (hidden/system file in C:) with an editor? It contains the entries of the Windows boot loader, maybe there's something still pointing there.

Basically, the boot sequence is: Masterboot record (fixed by a fixboot /MBR or similar process) looks for active partition (the LiveCD can mark the 1st partition active, so you can fix that) which loads NTLDR which loads the boot.ini which presents the boot menu (or if there is only one entry boots from that).

If indeed something in that sequence is on the 2nd partition it can be fixed (a XP repair install cures nearly everything that can go wrong).


How can I safely remove it (Windows won't let from the GUI) without losing access to the XP install, so I can recovery the space by growing the C partition.

If you used a Linux Live-CD to do your work, then you may already know how Linux sees delineates partitions.

If there is one SATA hard drive with two partitions, Linux would show them as follows:

/dev/sda1   which is the first partition, probably C: under Windows
/dev/sda2   which is the second partition, probably D: under Windows

The thing to do would be to completely wipe the virus-ridden partition and then let a partition table editor do its job. I would wipe the hard drive using dd.

I would boot my PLD Rescue CD and key in the command:

dd if=/dev/urandom | pipemeter | dd of=/dev/sda2 && dd if=/dev/zero | pipemeter | dd of=/dev/sda2

This would fill the second partition on the hard drive with random data, and then go back and zero it all out. You don't have to fill the partition with random data, and skipping this step saves time. It's up to your personal preference.

If you just want to zero the second partition, use the following command:

dd if=/dev/zero | pipemeter | dd of=/dev/sda2

And again, just let the partition table editing tool do its own work.

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.