How to uninstall a dual boot, linux partition

Matthew Vona
I usually write about chemistry, often mixed in with various technical topics, including Open Source. But this particular problem had haunted me for some time and I never found a really good article outlining how to solve it. So, after finally figuring it out I thought I'd write it down for anyone else having the same problem.

I have a single personal computer which I installed an old version of Red Hat on as a dual boot. I wanted instead to install to hard disk Scientific Linux. So...how to uninstall the Linux partition?

The Problem:

You have a dual boot system running Linux and Windows, but you want to remove the Linux partition and possibly install a different flavor of Linux.

The Solution:

This solution is very simple, but will only work if the Linux distribution you installed uses the LiLo boot loader (which includes most if not all automatically installed Linux distributions including SuSE, Mandrivia, etc.)






  • First, boot into the linux OS you wish to remove from your system.


  • Second, open a root terminal. You can do this by opening any terminal and typing SU at the command line, followed by your root password.


  • Third, type the command 'lilo -u -v'. What this does is uninstalls the boot loader and reinstalls the boot sector that it originally replaced. We assume that you have installed your Linux dual boot only once onto a windows machine. If this is not the case, then you may need a different solution.


  • Fourth, type 'reboot' at the command prompt.


  • When your system reboots, it will boot directly into Windows. Go into your Device manager for the hard drive which contained the Linux logical volumes, right click on it and view its properties, logical volumes, (usually labeled hda, hdb, etc.) and delete them by highlighting them and hitting the Delete key. DO NOT delete the C: drive :) This should leave you with only your windows logical volume and some free space on your hard drive.




What you do next depends upon what you intend to do.





    If you want to install another flavor of Linux as a dual boot, simply insert the image into your CD and reboot. You are done.

  • If you want to just run Windows, you can use free software to increase the size of your existing windows partition to reclaim the lost disk space such as Ultimate Boot CD. For a comprehensive list, go here.





MJV
Print Email
Bookmark and Share

Matthew Vona

Matthew is a co-owner and writer for ChemicalAnalysis.com and has worked as a forensic scientist and environmental scientist.

Got Debt?  Get Debt Wise.