How can we download Linux

Removing Linux and installing Windows on your computer

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

Summary

This article describes how to 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 drive with Linux-owned partitions and Linux swap partitions that are incompatible with the Windows operating system, and that there is no more free space on the hard drive.

Windows and Linux can coexist on the same computer. Consult your Linux documentation for more information.

additional Information

To install Windows on a system that has Linux installed, if 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 performing any of the steps in this article, make sure you have a bootable floppy disk or CD for the Linux operating system, as this process will completely remove the Linux operating system installed on your computer. In addition, if you want to restore the Linux operating system at a later date, you should make sure that you have an adequate backup of all data stored on your computer. You must also have a full version of the Windows operating system to be installed.

In Linux file systems, a "superblock" at the beginning of each disk partition indicates the base size, shape, and status of the file system.


The Linux operating system is usually installed on a partition of type 83 (Linux native format) or type 82 (Linux swap partition). The Linux Boot Manager (LILO) can be configured to start via:

  • The hard disk's master boot record (MBR).

  • The root folder of the Linux partition.

The Fdisk tool supplied with Linux can be used to delete the partitions. (However, there are other utilities that work as well, such as Fdisk in MS-DOS 5.0 and later. You can also delete the partitions during the installation process.) To remove Linux from your computer and install Windows:

  1. Remove Linux-owned partitions as well as swap and boot partitions used by Linux:

    1. Start the computer with the Linux setup 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.

    2. At the command prompt, type p, and then press ENTER to view partition information. The first item to be displayed is information on hard disk 1, partition 1. The second element is information on hard disk 1, partition 2.

    3. At the command prompt, type d, and then press ENTER. You will then be prompted for the partition number that you want to delete. Type 1, and then press ENTER to delete partition 1. Repeat this step until all partitions are deleted.

    4. Type w and then press ENTER to write this information to the partition table. You may get some error messages (as information is being written to the partition table). However, these are not important at this point because the next step is to restart the computer and then install the new operating system.

    5. At the command prompt, type q, and then press ENTER to exit the Fdisk tool.

    6. Insert a bootable floppy disk or CD-ROM for the Windows operating system into your computer, and then press CTRL + ALT + DELETE to restart the computer.

  2. Install Windows. Follow the installation instructions for the Windows operating system that you want to install on your computer. The installation process will help you create the appropriate partitions on the computer.

Examples of Linux partition tables

Single SCSI drive

Multiple SCSI drives

Single IDE drive

Multiple IDE drives

Linux also recognizes more than 40 different partition types, for example:

  • FAT 12 (type 01)

  • FAT 16> 32 M primary (type 06)

  • FAT 16 Extended (type 05)

  • FAT 32 without LBA primary (type 0b)

  • FAT 32 with LBA Primary (type 0c)

  • FAT 16 with LBA (type 0e)

  • FAT 16 with LBA Extended (Type 0f)

Note that aside from the ones mentioned above, there are other methods to remove the Linux operating system and install Windows. The method described above is used in this article because the Linux operating system is already functional and there is no more free space on the hard drive. There are methods of changing partition sizes using software. The installation of Windows on partitions edited in this way is not supported by Microsoft.


Another method of removing an operating system from your hard drive and installing a different operating system is to use an MS-DOS version 5.0 or later startup 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 five options. Choose option 5 to select the hard drive that contains the partition you want to delete. Next (or if you only have one hard drive) choose option 3 ("Delete partition or logical DOS drive") and then choose option 4 ("Delete non-DOS partition"). You should now see the non-DOS partitions that you want to delete. Typically the Linux operating system has two non-DOS partitions, but there can be more. After deleting a partition, use the same steps to delete additional non-DOS partitions, if necessary.


After deleting the partitions, you can create partitions and install the desired operating system. With Fdisk from MS-DOS 5.0 and higher, Windows 95, or Windows 98, you can only create a primary partition and an extended partition with multiple logical drives. The maximum size for the primary partition under FAT16 is 2 gigabytes (GB). The maximum size for logical drives under FAT16 is also 2 GB. For more information, see the following Microsoft Knowledge Base article:

105074 MS-DOS 6.2 Partitioning Questions and Answers
If you are installing Windows NT 4.0 or Windows 2000, the installation process can remove the Linux partitions and create new partitions and format them with the appropriate file system type. You can create more than one primary partition on Windows. Windows NT 4.0, due to the limitations of the FAT16 file system during installation, allows you to create a partition of 4 GB or less during installation. In addition, 4 GB partitions use 64 KB cluster sizes. MS-DOS 6.x and Windows 95 or Windows 98 do not recognize 64K cluster file systems. Therefore, this file is usually converted to NTFS during installation. Unlike Windows NT 4.0, Windows 2000 recognizes the FAT32 file system. You can create a very large FAT32 drive during Windows 2000 installation. The FAT32 drive can be converted to NTFS after the installation is complete.