15. How to Uninstall Linux

[Warning] Warning

Removing partitions on your hard drive will inevitably result in the loss of all data stored on those partitions. Please make sure you've backed up all of the data you want to keep before proceeding.

If for any reason you want to uninstall Mandriva Linux, you can do so. The process of uninstalling Mandriva Linux is done in two steps:

  1. Remove the bootloader from the Master Boot Record (MBR)

    1. To do so, reboot your computer with the installation CD or DVD (see Section 1, “The Mandriva Linux Installer”).

    2. Choose the Rescue System option.

    3. In the new menu that appears, choose the Restore Windows Boot Loader option, then press Enter to write the MBR with a Windows® one.

  2. Delete all partitions related to Mandriva Linux on your hard drive

    These are usually partitions hosting ext3 file systems and the Swap partition. You can also replace them with a single partition using fdisk.

    1. Still in rescue mode, select option Go to console.

    2. Run fdisk /dev/hda (if the hard disk containing Mandriva Linux is other than the 1st IDE disk, change /dev/hda accordingly).

    3. Use the p command to display partition information, and then use the d command to delete all unneeded partitions.

    4. If you want to create a single partition, use the c command, specify 1 as the partition number, make it use all of the space available, and when asked for the partition type, use the L command to list the supported partition types and choose the one for the OS you plan to install later.

      Some examples:

      • c for a FAT32 (Windows® 9x) partition

      • 7 for a NTFS (Windows® NT/Windows® 2000/XP) partition,

      • 83 for a GNU/Linux partition.

    5. Finally use the w command to write changes back to disk.

  3. Once this is done, just reset or shutdown the machine using the corresponding buttons.