Remove Windows 8 and keep Ubuntu installed using Wubi

My laptop came with Windows 7 installed. I updated it to Windows 8. I have installed Ubuntu using Wubi. Now I want to remove Windows 8 and use only Ubuntu. Is it possible to remove Windows 8 without losing data in Ubuntu?


Solution 1:

Yes, it is possible, but may be tricky depending on how you installed Ubuntu.

In ubuntu, install utility gparted using sudo apt-get install gparted.

Run sudo gparted, choose your drive (most likely /dev/sda) and take a look at all partitions you have. If your setup was more or less normal, you should see at least 2 big partitions - one of ext4 type (Linux/Ubuntu), and another of NTFS type (Windows). Using gparted, delete NTFS partition to reclaim space taken by it. Theoretically, you can resize your ext4 partition to encompass whole drive space, but practically you cannot do that on running system (but you can do it from Live CD or using Parted Magic USB stick).

To make is safe and easy, you can simply create another ext4 partition occupying space of old NTFS partition, and then mount it into some empty directory, like /data (mkdir it first!). To make this partition mount permanent, you should add a line like this into /etc/fstab:

UUID=b516743e-a3df-42d4-a5af-e8a358c1c8be /data ext4 defaults 0

To find UUID for all partitions (including just created ones), simply inspect output of command:

ls -l /dev/disk/by-uuid

One word of caution: try to not resize of move your /boot partition. If you do, it is not catastrophical, but you may have to run Ubuntu boot-loader recovery - because this may screw up boot-loader (grub) configuration. If your root Linux partition / is separate from /boot, it is should be safe to resize it (but still DO BACKUP!).