Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can anyone tell me how to delete Ubuntu from a Linux / Windows dual boot system without harming Windows?

I ran sudo fdisk /dev/sda in a linux terminal and got the following output:

  • /dev/sda1 - system
  • /dev/sda2 - Compaq diagnostics
  • /dev/sda3 - HPFS/NTFS/exFAT
  • /dev/sda5 - W95 Ext'd (LBA)
  • /dev/sda6 - Linux
  • /dev/sda7 - Linux swap / solaris

From my online searches, I know how to delete any of these partitions but what I don't know is if I should delete any of the other non-linux labeled partitions to complete the process.

share|improve this question

migrated from unix.stackexchange.com Sep 7 '12 at 13:37

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

4  
Do it from Windows - the disk manager will display what's in use and what not. –  Mat Jun 2 '12 at 10:56
3  
Be careful, you first have to restore the Windows boot loader!!! –  jippie Jun 2 '12 at 11:00
    
About the Windows boot loader, is there anything I can do if I don't have a Winddows CD/DVD ? –  sisko Jun 2 '12 at 12:36
1  
I wanted to flag the question for migration, but somehow it became a "vote to close". I think the solution is probably to "do it from Windows", and that suits SU better. –  phunehehe Jun 3 '12 at 11:02
add comment

2 Answers

When in doubt, leave it alone. To remove Linux, delete the partitions sda6 (Linux) and sda7 (Linux swap). Do not touch the others. While you're at it, make sure that the Windows partition (sda3) is marked as bootable.

This will not give any space back to Windows. If you want Windows to expand, you'll have to do it with Windows tools.

If your system is currently configured with dual boot, it's probably using a Linux bootloader. If you remove Linux, your system will become unbootable. You can try restoring the Windows boot sector by installing the mbr package and running install-mbr:

install-mbr /dev/sda

I don't guarantee that this will work. Your best bet is really to use a Windows installation CD.

share|improve this answer
add comment

This is actually quite easy. Go to Start > Computer

Click on the internal hard drive. In my one, it is C drive.

In this folder, you will see some other folders. Especially windows and Ubuntu.

From this folder delete Ubuntu. This will delete or remove Ubuntu from your computer.

The if you want to connect that free space to your windows, follow these steps.

Start > type in disk management > create and format hard disk partitions > wait to load > on the bottom panel under "disk 0" find internal hard drive(C: on my one as before) > right click on internal hard drive > Extend volume... > choose how much > default is all free space > okay.

share|improve this answer
2  
This is true only assuming that it's a WUBI install. –  gronostaj Aug 31 '13 at 6:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.