SDB:How to Uninstall Linux

Şuraya atla: kullan, ara


Version: 4.4

Concern

You want to uninstall Linux entirely.

Procedure

First, make a backup of all your important data! In case DOS or Windows 3.x/95/98/ME is also installed on your machine, create a system boot floppy for this operating system.

Note: If you do not have a functional SUSE LINUX installation, skip the following sections and proceed with the instructions below under Generic Method.

From SUSE LINUX 9.0

  1. Start the YaST2 Control Center and select
    • Hardware (from SuSE 9.1 on choose: System)-->
    • Partitioning
  2. Delete all Linux partitions including the Linux swap partition. The extended partition "Win95 Ext'd (LBA)" can also be deleted, provided it no longer contains any logical drives.
  3. Partitions of another operating system that were resized during the installation can be restored to the original size in order to make use of the entire hard disk space. Select the partition whose size you want to increase, click Resize, and select the new size with the slider. Confirm with OK.
  4. Complete all changes in the partitioning dialog with Next and confirm the subsequent security query with Yes. The changes will be applied.
  5. To remove LILO or GRUB (if it is installed in the MBR), the original boot code that was in the MBR prior to the installation of SUSE LINUX can be restored. To do this, change to the following YaST module:
    • Boot Loader Setup ->
    • Reset (bottom right) ->
    • Restore MBR of Hard Disk

After a security query, the boot code in the MBR is rewritten. The partition table remains unmodified. If another operating system is installed on your machine, it should boot automatically the next time the machine is powered on.

SuSE Linux 7.3 to 8.2

  1. Start the YaST2 Control Center and select
    • Hardware -->
    • Partitioning
  2. Delete all Linux partitions including the Linux swap partition. The extended partition "Win95 Ext'd (LBA)" can also be deleted, provided it no longer contains any logical drives. Confirm the changes with Next, and confirm the subsequent security query with Yes. The changes will be applied.
  3. To remove LILO or GRUB (if it is installed in the MBR), the MBR must be rewritten. This can be done with the fdisk utility of your alternative operating system. If you use DOS or Windows 3.x/95/98/ME, boot the machine with a DOS rescue floppy and start fdisk with:
 fdisk /mbr

The command for OS/2 is:

fdisk /newmbr

SDB:Uninstalling the Boot Manager LILO from the MBR

  1. Subsequently, you can boot your operating system without LILO or GRUB and repartition the free space according to your needs.

Up to SuSE Linux 7.2

  1. Boot from the first boot CD as if it were a new installation and select the item Manual installation from the start menu. If this option is not available in previous versions of SuSE Linux, enter manual at the boot prompt. Alternatively, you can use the included boot floppy.
  2. Select the language, screen resolution, and keyboard layout. Follow the new installation routine until you reach the point where the hard disk is partitioned. Then select:
    • Start installation / system -->
    • Start installation/ update -->
    • CD-ROM -->
    • Yast1 - text based -->
    • Installation using expert mode -->
    • Installation settings -->
    • Configure hard disk partitions.
  3. Delete all Linux partitions by pressing F4 and confirm with Continue. A window reading "Writing new partition table ..." will be displayed. After deleting the Linux partitions, abort the installation process by pressing Abort and reboot.
  4. To remove LILO or GRUB (in case it is installed in the MBR), the MBR must be rewritten. This can be done with the fdisk utility of your alternative operating system. If you use DOS or Windows 3.x/95/98/ME, boot the machine with a DOS rescue floppy and start fdisk with:
 fdisk /mbr

The command for OS/2 is:

fdisk /newmbr

If you use Windows 2000/XP, uninstall LILO or GRUB as described in the article SDB:Uninstalling the Boot Manager LILO from the MBR

  1. Subsequently, you can boot your operating system without LILO or GRUB and repartition the free space according to your needs.

Generic Method

  1. Boot the rescue system (e.g., from the first SUSE LINUX CD). Log in to the rescue system as root (no password is required). The Linux partitions can be deleted with fdisk.
  2. First, get an overview of the partitions by entering:
fdisk -l

The output might look as follows:

rescue:~ # fdisk -l
Disk /dev/hda: 255 heads, 63 sectors, 1655 cylinders
Units = cylinders of 16065 * 512 bytes
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        18    144553+  82  Linux swap
/dev/hda2            19      1655  13149202+   f  Win95 Ext'd (LBA)
/dev/hda5            19        22     32098+  83  Linux
/dev/hda6            23      1655  13117041   83  Linux
  1. Start fdisk in interactive mode by entering the device name of the hard disk as a parameter. For example, if the hard disk to edit is connected as primary master (as in the above example), enter the following command:
fdisk /dev/hda
  1. fdisk supports the following options:
m    list the available commands
p list the partitions
d delete a partition
q quit the program WITHOUT saving changes
w save the changes and exit fdisk  These commands can be used to delete the Linux partitions (ID 83) and the Linux swap partition (ID 82). To delete a partition, press "d" and then ENTER. The system will ask you which partition to delete. To delete the last partition (/dev/hda6) in the example above, enter "6" and press ENTER. The extended partition "Win95 Ext'd (LBA)" can also be deleted, provided it no longer contains any logical drives. To save the information, press "w" and then ENTER.
  1. To remove LILO or GRUB (if it is installed in the MBR), the MBR must be rewritten. This can be done with the fdisk utility of your alternative operating system. If you use DOS or Windows 3.x/95/98/ME, boot the machine with a DOS rescue disk and start fdisk with:
     fdisk /mbr

The command for OS/2 reads

     fdisk /newmbr

If you use Windows 2000/XP, uninstall LILO or GRUB.

  1. Subsequently, you can boot your operating system without LILO or GRUB and repartition the free space according to your needs.

Additional information:

If you want to delete ALL partitions, you can overwrite the MBR. Just to make sure: The following procedure overwrites the MBR completely with zeros, i.e. the partition table along with all data on the hard disk will be deleted.

Proceed as follows:
Start the rescue system from the SUSE LINUX CD (or boot floppy), log in as root, and enter the following command:

    dd if=/dev/zero of=/dev/hda bs=512 count=2

Subsequently, a new MBR can be created with the fdisk of DOS:

    fdisk /mbr

or, in the case of OS/2, with:

    fdisk /newmbr

<keyword>uninstall,remove,deinstallation</keyword>