Microsoft KB Archive/247804

= How to Remove Linux and Install Windows on Your Computer =

Article ID: 247804

Article Last Modified on 3/1/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition

-



This article was previously published under Q247804



For a Microsoft Windows XP version of this article, see 314458.



SUMMARY
This article describes how you can remove the Linux operating system from your computer, and install a Windows operating system. This article also assumes that Linux is already installed on the hard disk using Linux native and Linux swap partitions, which are incompatible with the Windows operating system, and that there is no free space left on the drive.

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



MORE INFORMATION
To install Windows on a system that has Linux installed when 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 the Windows operating system.

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 this process completely removes the Linux operating system installed on your computer. If you intend to restore the Linux operating system at a later date, verify that you also have a good backup of all the information stored on your computer. Also, you must have a full release version of the Windows operating system you want to install.

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:
 * The hard disk Master Boot Record (MBR).
 * 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:  Remove 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 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 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 as 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 a bootable CD-ROM for the Windows operating system on your computer, and then press CTRL+ALT+DELETE to restart your computer.</li></ol> </li> Install Windows. Follow the installation instructions for the Windows operating system you want to install on your computer. The installation process assists you with 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) Also, Linux recognizes more than forty different partition types, such as:
 * 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 than the one mentioned above. The preceding method is used in this article because the Linux operating system is already functioning and there is no more room on the hard disk. There are methods of changing partition sizes with software. Microsoft does not support Windows installed on partitions manipulated in this manner.

Another method of removing an operating system from the hard disk and installing a different operating system is to use an MS-DOS version 5.0 or later boot disk, a Windows 95 Startup disk, or a Windows 98 Startup disk that contains the Fdisk utility. Run the Fdisk utility. If you have multiple drives, there are 5 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, choose option 3 ("Delete partition or logical DOS drive"), and then choose option 4 ("Delete non-DOS partition"). You should then see the non-DOS partitions you want to delete. Typically, the Linux operating system has two non-DOS partitions, but there may be more. After you delete one partition, use the same steps to delete any other appropriate non-DOS partitions.

After the partitions are deleted, you can create partitions and install the operating system you want. You can only create 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

If you are installing Windows NT 4.0 or Windows 2000, the Linux partitions can be removed and new partitions created and formatted with the appropriate file system type during the installation process. Windows allows you to create more than one primary partition. The largest partition that Windows NT 4.0 allows you to create during installation is 4 GB because of the limitations of the FAT16 file system during installation. Also, the 4-GB partitions use 64-KB cluster sizes. MS-DOS 6.x and Windows 95 or Windows 98 do not recognize 64-KB cluster file systems, so this file system is usually converted to NTFS during installation. Windows 2000, unlike Windows NT 4.0, recognizes the FAT32 file system. During the installation of Windows 2000, you can create a very large FAT32 drive. The FAT32 drive can be converted to NTFS after the installation has completed if appropriate.

Additional query words: kbfaqw2ksetup

Keywords: kbhowto kbsetup KB247804

-

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

© Microsoft Corporation. All rights reserved.