Microsoft KB Archive/314458

= How to Remove Linux and Install Windows XP =

Article ID: 314458

Article Last Modified on 10/3/2006

-

APPLIES TO


 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Professional

-



This article was previously published under Q314458



For a Microsoft Windows 2000 version of this article, see 247804.



SUMMARY
This article explains how to remove the Linux operating system from your computer and install Windows XP. This article assumes that Linux is already installed on your computer's hard disk, that Linux native and Linux swap partitions are in use (which are incompatible with Windows XP), and that there is no free space left on the hard disk.

NOTE: Windows XP and Linux can coexist on the same computer. For additional information, refer to your Linux documentation.



MORE INFORMATION
To install Windows XP on a computer on which Linux is currently installed (and assuming that you want to remove Linux), you must manually delete the partitions used by the Linux operating system. The Windows-compatible partition can be created automatically during the installation of Windows XP.

IMPORTANT: Before you follow the steps in this article, verify that you have a bootable disk or bootable CD-ROM for the Linux operating system, because these steps completely remove the Linux operating system from your computer. If you intend to restore the Linux operating system at a later date, verify that you also have a functional backup of all the information stored on your computer. Additionally, you must have a full release version of Windows XP to use during this installation. If you intend to use a Windows XP upgrade CD-ROM, a CD-ROM of a qualifying Windows product must be available. Setup from the Windows XP upgrade CD-ROM will prompt you for this CD-ROM.

Linux file systems use a superblock at the beginning of a disk partition to identify the basic size, shape, and condition of the file system.

The Linux operating system is generally installed on partition type 83 (Linux native) or 82 (Linux swap). The Linux boot manager (LILO) can be configured to start from either of the following locations:
 * The hard disk Master Boot Record (MBR)

-or-
 * The root folder of the Linux partition

The Fdisk tool included with Linux can be used to delete the partitions. (There are other utilities that work just as well, such as Fdisk from MS-DOS 5.0 and later, or you can delete the partitions during the installation process.)

To remove Linux from your computer and install Windows XP, follow these steps:  Remove the native, swap, and boot partitions used by Linux:  Start your computer with the Linux Setup floppy disk, type fdisk at the command prompt, and then press ENTER.

NOTE: For help with using the Fdisk tool, type m at the command prompt, and then press ENTER. Type p at the command prompt, and then press ENTER to display partition information. The first item listed is hard disk 1, partition 1 information, and the second item listed is hard disk 1, partition 2 information. Type d at the command prompt, and then press ENTER. You are then prompted for the partition number that you want to delete. Type 1, and then press ENTER to delete partition number 1. Repeat this step until all the partitions have been deleted. Type w, and then press ENTER to write this information to the partition table. Some error messages may be generated (because information is written to the partition table), but they should not be significant at this point because the next step is to restart the computer and then install the new operating system. Type q at the command prompt, and then press ENTER to quit the Fdisk tool.</li> Insert either a bootable floppy disk or the bootable Windows XP CD-ROM, and then press CTRL+ALT+DELETE to restart your computer.</li></ol> </li> Follow the instructions on the screen to install Windows XP.

The installation process assists you in creating the appropriate partitions on your computer.</li></ol>

Single SCSI Drive
<pre class="fixed_text">  Device Boot Start End Blocks Id System /dev/sda1 * 1 500 4016218 83 Linux native (SCSI hard drive 1, partition 1) /dev/sda2 501 522 176715 82 Linux swap (SCSI hard drive 1, partition 2)

Multiple SCSI Drives
<pre class="fixed_text">  Device Boot Start End Blocks Id System /dev/sda1 * 1 500 4016218 83 Linux native (SCSI hard drive 1, partition 1) /dev/sda2 501 522 176715 82 Linux swap (SCSI hard drive 1, partition 2) /dev/sdb1 1 500 4016218 83 Linux native (SCSI hard drive 2, partition 1)

Single IDE Drive
<pre class="fixed_text">  Device Boot Start End Blocks Id System /dev/hda1 * 1 500 4016218 83 Linux native (IDE hard drive 1, partition 1) /dev/hda2 501 522 176715 82 Linux swap (IDE hard drive 1, partition 2)

Multiple IDE Drives
<pre class="fixed_text">  Device Boot Start End Blocks Id System /dev/hda1 * 1 500 4016218 83 Linux native (IDE hard drive 1, partition 1) /dev/hda2 501 522 176715 82 Linux swap (IDE hard drive 1, partition 2) /dev/hdb1 1 500 4016218 83 Linux native (IDE hard drive 2, partition 1) Additionally, Linux recognizes more than 40 different partition types, including the following:
 * FAT 12 (Type 01)
 * FAT 16 > 32 M Primary (Type 06)
 * FAT 16 Extended (Type 05)
 * FAT 32 w/o LBA Primary (Type 0b)
 * FAT 32 w/LBA Primary (Type 0c)
 * FAT 16 w/LBA (Type 0e)
 * FAT 16 w/LBA Extended (Type 0f)

Note that there are other ways to remove the Linux operating system and install Windows XP. The preceding method is included in this article because of the assumptions that the Linux operating system is already functioning and there is no more room on the hard disk. There are methods for changing partition sizes with software designed for managing partitions. Disk partitioning software may cause instability with the Windows XP installation. Microsoft does not support the installation of Windows XP on partitions manipulated in this manner.

You can also use an MS-DOS version 5.0-or-later boot disk, a Microsoft Windows 95 Startup disk, or a Microsoft Windows 98 Startup disk that contains the Fdisk utility to remove an operating system from the hard disk and install a different operating system. When you start Fdisk and multiple drives are installed on your computer, you are presented with five choices; use option 5 to select the hard disk that has the partition to be deleted. After that (or if you have only one hard disk), select option 3 (Delete partition or logical DOS drive), and then select option 4 (Delete non-DOS partition). You should then see the non-MS-DOS partitions that you want to delete. Typically, the Linux operating system has two non-MS-DOS partitions, but there may be more. After you delete one partition, use the same steps to delete any other appropriate non-MS-DOS partitions.

For additional information about how to use the Fdisk utility, click the article number below to view the article in the Microsoft Knowledge Base:

255867 How to Use the Fdisk Tool and the Format Tool to Partition or Repartition a Hard Disk

After you delete the partitions, you can create partitions and install the operating system that you want. You can create only one primary partition and an extended partition with multiple logical drives by using Fdisk from MS-DOS version 5.0-and-later, Windows 95, and Windows 98. The maximum FAT16 primary partition size is 2 gigabytes (GB). The largest FAT16 logical drive size is 2 GB.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

105074 MS-DOS 6.2 Partitioning Questions and Answers

When you install Windows XP, the Linux partitions can be removed and new partitions created and formatted with the appropriate file system type during the installation process. Windows XP allows you to create more than one primary partition. Windows XP does recognize the FAT32 file system. During the installation of Windows XP, you can create a very large FAT32 drive. The FAT32 drive can be converted to NTFS after the installation has completed, if appropriate.

For additional information about how to multiboot with Windows XP, click the article number below to view the article in the Microsoft Knowledge Base:

306559 HOW TO: Create a Multiple-Boot System with Windows XP

For more information, browse to the following Microsoft Web site:

http://www.microsoft.com/windowsxp/using/setup/expert/russel_september10.mspx

Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Additional query words: kbfaqw2ksetup

Keywords: kbhowto kbinfo kbsetup KB314458

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.