which will get rid of LILO--it overwrites the master boot record (MBR) of your first hard drive, where LILO resides. The "lock" command allows "raw" writing to disk, which is normally disallowed on more recent DOS versions as an antiviral measure. The problem with FDISK/MBR is that it does not report back any success or failure, so it is better to proceed it with the "lock" command. After this you can remove the Linux partitions using the DOS "FDISK" utility to re-claim the hard drive space.
Apparently, MS FDISK does not always cope with removing the Linux partitions. In this case, I may use linux fdisk. The simplest may be to boot from the Linux installation floppy/CD, and to remove the partition using the Linux partitioning tool when it pops up during the "installation" procedure. After that I abort the "installation" and Linux is gone.
If you still have problems, here are the ultimate solutions for zeroing the MBR
Note: The following advice will completely wipe your Master Boot Record (MBR), which contains all your partition information. DO NOT DO THIS unless you know that this is exactly the result you want -- it will leave your hard drive in an unbootable state, in effect bringing it back to "factory-fresh", i.e., empty of data and requiring partitioning and formatting.
Linux-based solution. If you can boot Linux -- say via boot floppy -- you can simply invoke "dd":
dd if=/dev/zero of=/dev/hda bs=512 count=1
This fills up the MBR with zeros. Obviously, you have to be root to do this.
DOS-based solution . Boot with a DOS floppy that has "debug" on it; run
At the ‘-‘ prompt, "block-fill" a 512-byte chunk of memory with zeroes:
f 9000:0 200 0
Start assembly mode with the ‘a' command, and enter the following code:
Press to exit assembly mode, take a deep breath -- and press "g" to execute, then "q" to quit "debug". Your HD is now in a virgin state, and ready for partitioning and installation.
Easiest way uninstall linux is probably from a Windows XP CD. Once you boot from the CD follow the instructions until you get to the part where you see all the partitions on your hard drive. You must delete all your linux partitions. The primary partitions you'll probably see are
linux ext3, linux ext2, linux swap.
You should delete all these partitions to remove.
Boot from your Windows XP CD and after windows loads type r to get to the Recovery Console. Once you in the the Recovery Console you'll probably be prompted to type the administrator user name and password.Put admin or administrator as the user name and nothing as the password and it usually works.
Now were in recovery console all we have to do is type
this command will re-write the Master Boot Record, therefore removing Grub.
Now just type shutdown -r this will restart the computer. Remove the Windows XP CD. Now when the computer starts you should be greeted with the all familiar Windows Startup Screen.
or you can use the following procedure
Boot up with your Windows XP disc.
Select the option Recovery Console.
At the prompt, type the following command
Restart your computer.