Uninstall or Remove Linux

If You are running windows and linux as dual boot for some reason you wanted to “uninstall” Linux, you could run any one of the following two methods (from under DOS or MS Windows):

Method 1

LOCK C:

FDISK /MBR

which will get rid of LILO–it overwrites the master boot record (MBR) of your first hard drive, where LILO resides. The “lock” command allows “raw” writing to disk, which is normally disallowed on more recent DOS versions as an antiviral measure. The problem with FDISK/MBR is that it does not report back any success or failure, so it is better to proceed it with the “lock” command. After this you can remove the Linux partitions using the DOS “FDISK” utility to re-claim the hard drive space.

Apparently, MS FDISK does not always cope with removing the Linux partitions. In this case, I may use linux fdisk. The simplest may be to boot from the Linux installation floppy/CD, and to remove the partition using the Linux partitioning tool when it pops up during the “installation” procedure. After that I abort the “installation” and Linux is gone.

If you still have problems, here are the ultimate solutions for zeroing the MBR

Note: The following advice will completely wipe your Master Boot Record (MBR), which contains all your partition information. DO NOT DO THIS unless you know that this is exactly the result you want – it will leave your hard drive in an unbootable state, in effect bringing it back to “factory-fresh”, i.e., empty of data and requiring partitioning and formatting.

Linux-based solution. If you can boot Linux – say via boot floppy – you can simply invoke “dd”:

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

This fills up the MBR with zeros. Obviously, you have to be root to do this.

DOS-based solution . Boot with a DOS floppy that has “debug” on it; run

debug

At the ‘-‘ prompt, “block-fill” a 512-byte chunk of memory with zeroes:

f 9000:0 200 0

Start assembly mode with the ‘a’ command, and enter the following code:

mov dx,9000
mov es,dx
xor bx,bx
mov cx,0001
mov dx,0080
mov ax,0301
int 13
int 20

Press to exit assembly mode, take a deep breath – and press “g” to execute, then “q” to quit “debug”. Your HD is now in a virgin state, and ready for partitioning and installation.

Method 2

Easiest way uninstall linux is probably from a Windows XP CD. Once you boot from the CD follow the instructions until you get to the part where you see all the partitions on your hard drive. You must delete all your linux partitions. The primary partitions you’ll probably see are

linux ext3, linux ext2, linux swap.

You should delete all these partitions to remove.

Boot from your Windows XP CD and after windows loads type r to get to the Recovery Console. Once you in the the Recovery Console you’ll probably be prompted to type the administrator user name and password.Put admin or administrator as the user name and nothing as the password and it usually works.

Now were in recovery console all we have to do is type

fixmbr

this command will re-write the Master Boot Record, therefore removing Grub.

Finished

Now just type shutdown -r this will restart the computer. Remove the Windows XP CD. Now when the computer starts you should be greeted with the all familiar Windows Startup Screen.

or you can use the following procedure

Boot up with your Windows XP disc.

Select the option Recovery Console.

At the prompt, type the following command

fdisk /mbr

Restart your computer.

Sponsored Link

5 thoughts on “Uninstall or Remove Linux

  1. mm on my harddisk there only Linux installed and forgot my pass so want to install windos XP! but boot from xp disk, there are only black screen nothing else. what can i do? please help me!?

  2. I had looked at many sites regarding removing Linux from my computer. I found yours and your clear and concise explanation made it simple; thank you and keep up the good work.

Leave a comment

Your email address will not be published. Required fields are marked *