First you have to see whether there are a lot of user programs and data that absolutely must be kept. If not, use FORMAT and cut the Gordian knot!
If so, then as follows:
XP (OR 2000) file format must be FAT32
You also need to see whether it's a single system or a dual system with 98.
If it's a single system, under DOS you can delete all folders and files related to XP OR 2000. If messages like "file not found" "access denied" etc. appear, before deleting use attrib -s -r -h /s to remove system, read-only, and hidden attributes. Also, in DOS, if no long filename (LFN) support program is loaded, folder or file names longer than 8 characters are represented by "the first six characters (ignoring spaces)" plus "~1", and you must type the file extension. Use "del" to delete files, and "deltree" to delete folders.
They are:
Folders:
windows
program files
documents and settings
The following two are on every drive:
system volume information
recycled (in 2000 it is recycler)
Files:
ntldr
boot.ini
ntdetect.com
bootfont.bin
pagefile.sys
Also some related .txt and .log files
Do not delete application programs and data files unrelated to the system.
After that, reboot and you can install a new operating system. But you will need to reinstall applications.
***************************************
If it is a dual system with 98:
You need to keep these under the system directory:
ntldr
boot.ini (if you don't want the dual-boot menu to appear and want to enter 98 directly, you can change default= to the 98 one, and change timeout=xx to 0)
bootsect.dos
io.sys
msdos.sys
config.sys
command.com
autoexec.bat
Then you can go straight into 98.
--------------------------
If you still want to wipe out the three files ntldr boot.ini bootsect.dos, that's also possible, but it's a bit risky. It's best to rename them first, then use debug to write bootsect.dos into the system boot sector, as follows:
debug
-nc:\bootsect.dos
-l 0
-w 0 2 0 1
-q
This writes bootsect.dos into the system boot sector. Reboot and try it; if the system can enter, then you can delete those three files.
If not, just change the three filenames back.
------------------------
Multi-system setups are more or less the same.