Installation guide
Appendix B.
Removing Red Hat Enterprise Linux
To uninstall Red Hat Enterprise Linux from your x86-based system, you must remove the Red Hat
Enterprise Linux boot loader information from your master boot record (MBR).
Note
It is always a good idea to backup any data that you have on your system(s). Mistakes do happen
and can result in the loss all of your data.
In DOS and Windows, use the Windows fdisk utility to create a new MBR with the undocumented
flag /mbr. This ONLY rewrites the MBR to boot the primary DOS partition. The command should
look like the following:
fdisk /mbr
If you need to remove Linux from a hard drive and have attempted to do this with the default DOS
(Windows) fdisk, you will experience the Partitions exist but they do not exist problem. The best
way to remove non-DOS partitions is with a tool that understands partitions other than DOS.
To begin, insert the Red Hat Enterprise Linux CD #1 and boot your system. Once you have booted
off the CD, a boot prompt appears. At the boot prompt, type: linux rescue. This starts the rescue
mode program.
You are prompted for your keyboard and language requirements. Enter these values as you would
during the installation of Red Hat Enterprise Linux.
Next, a screen appears telling you that the program attempts to find a Red Hat Enterprise Linux install
to rescue. Select Skip on this screen.
After selecting Skip, you are given a command prompt where you can access the partitions you would
like to remove.
First, type the command list-harddrives. This command lists all hard drives on your system that
are recognizable by the installation program, as well as their sizes in megabytes.
Warning
Be careful to remove only the necessary Red Hat Enterprise Linux partitions. Removing other parti-
tions could result in data loss or a corrupted system environment.
To remove partitions, use the partitioning utility parted. Start parted, where /dev/hda is the
device on which to remove the partition:
parted /dev/hda
Using the print command, view the current partition table to determine the minor number of the
partition to remove:
print