Home Wiki > SDB:Uninstalling the Boot Manager GRUB from the MBR
Sign up | Login

SDB:Uninstalling the Boot Manager GRUB from the MBR

tagline: openSUSE sitesinden


Version: 8.1

Situation

You want to remove GRUB from the MBR (Master Boot Record) of the hard disk.

Procedure from SUSE LINUX 9.0 on

As of SUSE Linux version 9.0, YaST creates a backup of the MBR during the installation. Thus, the MBR can be easily restored in case you want to remove the boot loader GRUB from the MBR. For this purpose, start YaST and select the dialog:

  • System
  • Boot Loader Setup
  • Reset

Then select "Restore MBR of Hard Disk" to overwrite the boot loader GRUB.

Procedure up to SUSE LINUX 8.2

Since GRUB does not make any backup of the MBR during the installation, it can only be uninstalled by overwriting the MBR with a different boot manager. Therefore, the MBR must be rewritten using a different operating system.

Using a DOS or Windows 9x/ME Boot Floppy

In case you have DOS or Windows 9x/ME on your system, you can use fdisk for this purpose. Create a rescue disk in DOS or Windows 9x/ME, use it to boot the computer, and execute fdisk as follows:

     fdisk /mbr

The MBR will be rewritten and GRUB will be uninstalled.

Using an OS/2 Boot Floppy

If you use OS/2, the corresponding command is:

     fdisk /newmbr

Using Windows XP

In Windows XP, you can uninstall GRUB as follows:

Boot from the Windows XP CD and press the "R" key during the setup in order to start the Recovery Console. Select your Windows XP installation from the list and enter the administrator password. At the input prompt, enter the command "FIXMBR" and confirm the query with "y". The MBR will be rewritten and GRUB will be uninstalled. Press "exit" to reboot the computer.

Using Windows 2000

In Windows 2000, you can uninstall GRUB as follows:

Boot from the Windows 2000 CD and press the "R" key during the setup and then the "K" key in the following menu in order to start the Recovery Console. Select your Windows 2000 installation from the list and enter the administrator password. At the input prompt, enter the command "FIXMBR" and confirm the query with "y". The MBR will be rewritten and GRUB will be uninstalled. Press "exit" to reboot the computer.

Using Freedos

If none of the above-mentioned boot media is available, a floppy or CD image from a free DOS system can be downloaded from http://freedos.org/freedos/files/. You can create the CD image with any burning program on any operating system. Just make sure not to create a data CD but a CD image.

Creating the floppy image with Linux:

Enter the following command (or equivalent) in a root shell:

dd if=/tmp/fdos1440.img of=/dev/fd0

Creating the floppy image with Windows:

The directory /dosutils/rawrite/ on the first CD/DVD includes the program rawrite.exe that can be used to write the image to a floppy. Copy this program to the directory containing the file fdos1440.img.

Insert a floppy in the drive and start rawrite.exe. Enter the file fdos1440.img as the source file and confirm with Enter. Then enter the name of the floppy drive (usually "A") as the write medium. The image will be written to the floppy.

Boot from this CD/floppy and select "1" for "Boot FreeDOS Setup" first and then "3 - Clean Boot" from the start menu. Start fdisk with:

     fdisk /mbr

By doing this, the boot loader GRUB will be overwritten. <keyword>grub,bootmanager,bootloader,uninstall,remove,mbr</keyword>