You are on page 1of 7

mail me if you can help improve this procedure

Dual-Boot removal Procedures - Remove Windows or Linux


Introduction
Many users decide to take a look at Linux and load it on their PC alongside Windows in a dual
boot arrangement.
Having installed Linux in a dual boot arrangement, users may have a positive or negative
experience with Linux. Some of these may later on decide to uninstall / remove Linux. Others
may decide to uninstall / remove Windows. There will obviously be others who decide to keep
both to have the benefit of both worlds. This presents the first two groups of people with a
problem leading to the question how do I remove....?
This procedure attempts to help the readers understand how to remove the unwanted OS from
their PC.

I have excluded all Windows upto Win95, and WinNT from consideration due to obsolesence.
I have also excluded WinME as I have a poor opinion of it and consequently have little
experience of it.
However, in general, the procedures for Win98 should apply equally to Win95 and WinME.
Similarly the procedures for WinXP should apply to Win2K and WinNT. There may be a few
minor differences.
The repair procedures can be understood in more detail if you get a basic understanding of how
Windows and Linux Boots up. A basic understanding of how the MBR is used by Windows and
Linux is given in the file pointed to by the link below. It also contains basic information on the
Linux Boot Loaders (GRUB and LILO). This includes uninstallation information in summarized
form which you can use directly if you are familiar and don't care about the individual case
procedures.
The Boot Process, The MBR and The Boot Loaders
Dual-Boot Configurations
Dual-Boot arrangements come in many shapes and sizes. I will list just a few for illustration.
In this list I will use Linux generically as there are too many flavours to list individually.
1. Win98 and Linux using LILO (LInux LOader ) as the boot loader

2. Win98 and Linux using GRUB as the boot loader

3. WinXP and Linux using LILO as the boot loader

4. WinXP and Linux using GRUB as the boot loader

5. WinXP and Linux using the NT Boot Loader

Removal Process Detail


1. Remove Linux Keep Windows.

Linux Removal depends on which Boot Loader is being used:

1. Linux removal when Linux Boot loader (LILO or GRUB) is being used.

Linux removal in this case requires 2 steps:

1. Remove the Linux Boot Loader


1. If Linux Is still Installed and LILO is installed in the MBR as
BOOT Loader
1. Boot into Linux

2. Open a terminal session and su as root.

3. Run the lilo command using the -u or the -U option. The


device name (optional) must be the second parameter.
The only difference between the two options is that:
lilo -u --- (-u checks the time stamp on the current
MBR)
lilo -U --- (-U does not check the time stamp at all)
/sbin/lilo -u --- (This specifies the full pathname in case
it is not declared)
/sbin/lilo -U
If LILO is installed to the MBR of the master drive on
the primary IDE controller, type
lilo -u /dev/hda --- where dev=device directory, hd=IDE
hard disk, a=master on the primary IDE channel.

If you want to use the command on a SCSI drive, type


lilo -u /dev/sda --- where sd=SCSI drive and a=first
drive in the SCSI chain.
If the drive has multiple partitions, indicate the partition
from which you want to uninstall LILO by adding the
number that corresponds to the partition number on the
drive, starting the count at 1 (not 0).
For example, to remove LILO from the first partition of
the first SCSI drive, type:
lilo -u /dev/sda1 --- (Note that sda is not related to the
SCSI ID number).
2. If Linux Is still Installed and GRUB is installed in the MBR as
BOOT Loader
GRUB has no uninstaller. This is what the GRUB people say
about this lack of it:
"There is no concept uninstall in boot loaders, because if you
uninstall a boot loader, an unbootable machine would simply
remain. So all you need to do is overwrite another boot loader
you like to your disk, that is, install the boot loader without
uninstalling GRUB."
However LILO has an uninstall feature that restores the MBR
that was there before LILO. So come on GRUB why can't you?
Uninstalling the Boot Manager GRUB from the MBR
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.
1. Create a DOS or Windows 9x/ME start-up disk

2. Boot the computer with the DOS or Windows 9x/ME


start-up disk

3. Execute fdisk as follows:


fdisk /MBR
The MBR will be rewritten and GRUB
will be uninstalled.
NOTE: The procedure, shown above, is
not supported by Microsoft
(although they recommend it
themselves) and is performed
strictly at the discretion of
the user.

No liability for lost or


corrupted data accepted.
IMPORTANT: Running fdisk /mbr removes
the disk signature from the MBR.
If the drive is a member of
a Windows fault tolerance set,
the drive is no longer
recognized as a member of that set.

Using Windows XP
In Windows XP, you can uninstall GRUB as follows:

4. Boot from the Windows XP CD and press the "R" key


during the setup in order to start the Recovery
Console.
5. Select your Windows XP installation from the list and
enter the administrator password.
6. At the input prompt, enter the command FIXMBR and
confirm the query with "y".
7. 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:
8. 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.
9. Select your Windows 2000 installation from the list and
enter the administrator password.
10. At the input prompt, enter the command FIXMBR and
confirm the query with "y".
11. The MBR will be rewritten and GRUB will be
uninstalled. press "exit" to reboot the computer.
3. If Linux Is Not Still Installed
This situation arises mainly because the user has (without
thinking) repartitioned the hard drive and deleted the Linux
partitions with the aim of reclaiming them for Windows.
However, the user has failed to realise that the Linux Boot
Loader (LILO / GRUB) is still installed. The first hint of
something being wrong is when attempting to boot to windows
strange effects are observed as the Linux Boot loader tries to

load (for example if you are using LILO, the boot process stops
at: LI). This is because when you removed your Linux
filesystems, you also removed the additional boot loader code
(the "secondary boot loader").
To get over this problem, you need to remove the Linux Boot
loader from the MBR.
To do this follow the same procedure as the one defined above
for removing the GRUB boot loader.

2. Delete the Linux Partitions


This is an area that people often have difficulty with. Particularly when
you have Linux partitions that are contained in the extended partition.
There are a number of different ways of deleting partitions and you
need to be aware of them in order to use the one that most
appropriately fits your given case. Some are complex and some simple.
Select the simpler procedure if it works to minimise the steps you have
to go through.
The different procedures for partition removal are shown here:.
Partition Removal Information. I recommend using the Ranish Partition
Manager method.
2. Linux removal when the Windows NT Boot Loader is being used.

Linux removal in this case requires 2 steps:


1. Delete the Linux Partitions
The different procedures for partition removal are shown here:.
Partition Removal Information. I recommend using the Ranish Partition
Manager method.
2. Remove the Linux from the NT Boot Loader menu
Boot into Windows, Edit your boot.ini file and remove Linux from your
list of OSes to boot.
Editing the boot.ini file
To edit your boot.ini file, open the root partition of your hard drive
(normally C:\) and find the file called "BOOT.INI".
It is normally a read only system file with hidden attributes set. You may
need to unhide system files.
You will also need to enable it to be edited as follows:
Folder > Options. Right-click on the file, select Properties and uncheck
"Read-only" then click OK.
You may wish to take a backup of the file at this point to allow you to

restore if you experience problems.


Open the file in Notepad and under the [operating systems] section you
will find a list of all the installed operating systems.
2. Remove Windows Keep Linux.

Windows Removal depends on which Boot Loader is being used:


1. Windows removal when Linux Boot loader (LILO or GRUB) is being used.
Windows removal in this case requires 2 steps:
1. Delete the Windows Partitions
The different procedures for partition removal are shown here:.
Partition Removal Information. I recommend using the Ranish Partition
Manager method.
2. Remove the option to boot windows from the Linux Boot Loader
1. If the Linux Boot Loader used is LILO, then:

Update the LILO configuration information to remove Windows


as a bootable option.
If you are doing this manually then:

1. Edit the /etc/lilo.conf file and delete the Windows entry.

2. Update LILO (/sbin/lilo -v)


2. If the Linux Boot Loader used is GRUB, then:

Edit the /boot/grub/grub.conf file and delete the Windows entry.


To understand the GRUB and LILO config file formats. Look up Linux
Boot Loader Config Files.
2. Windows removal when the Windows NT Boot Loader is being used.

Windows removal in this case requires 2 steps:


1. Replace the NT Boot Loader with a Linux Boot Loader
Boot into Linux and update your configuration to load the Linux Boot

Loader of your choice into the Master Boot Record (MBR).


2. Delete the Windows Partitions
The different procedures for partition removal are shown here:.
Partition Removal Information. I recommend using the Ranish Partition
Manager method.
Note:
The Windows partitions can either be deleted using the procedure
above, or used as is as a FAT32 storage area for Linux.
If you delete the partitions then you can use the Linux fdisk facility to set
up new Linux partitions.

MAK 2004
End of Document

You might also like