I created a partition for Ubuntu so I could dual-boot Windows Vista with it. However, Windows is no longer necessary and I want Ubuntu to take up the entire hard drive. I was wondering how to safely resize the Ubuntu (11.10) partition and take Windows out all together, without having to reinstall Ubuntu and lose all of the files.


First, you should be aware that whenever doing dynamic partition resizing, there is a small chance of data loss. So you should make sure that all your documents and any other important files (e.g., music, videos, ebooks) are backed up first. And of course, you should make sure to copy/move any documents and other important files out of your Windows partition, too, as they will be lost when you remove that partition.

It is not safe to edit a physical disk's partition table from within an operating system that is running from a partition on that same physical disk. So rather than removing the Windows partition while booted into the installed Ubuntu system, you should boot from the Ubuntu live CD. Select Try Ubuntu rather than Install Ubuntu.

Then run the GParted Partition Editor (search for gparted in the dash and click the search result to run it). Remove your Windows partition (its partition type is NTFS). Then expand your Ubuntu partition to fill up the remaining space on the drive. If there is an extended partition (which is a kind of container for other partitions, to allow you to have more than four partitions on a disk with a traditional "msdos" partition table) and the Windows partition was outside of it, then you may need to expand the extended partition in order to expand the Ubuntu partition within it.

Apply your changes in GParted and reboot the system. You're unable to boot back into the Ubuntu system installed on the hard drive, then reinstall the GRUB2 boot loader to the Master Boot Record by using any of the techniques detailed here.

|improve this answer|||||

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