Ubuntu – How to get rid of Windows during Wubi migration

migrationwindows 7wubi

So I read How do I migrate to a real partition, and/or get rid of Windows entirely?, but nowhere does it tell me how I go about replacing windows entirely. Is there a simpler/faster way than making two partitions, installing Ubuntu on one, and then formatting the other one with Windows on it?

Best Answer

The problem is that your Wubi install is on your Windows partition. So, you can't format it and then migrate the Ubuntu install that was sitting on it before you formatted.

For most people, Wubi is a safe and easy way to try out Ubuntu and then a migration to a dual boot is the next step. For the rare cases such as your own, you can actually copy the virtual disks Wubi uses to an external drive, and then repartition your internal drive and migrate to it using the --root-disk= option. See HOWTO: migrate wubi install to partition for more info.

But basically your steps are as follows (assume /dev/sdb1 is the external drive partition):

  1. From Windows copy your \ubuntu\disks directory to the external drive (as well as any other data you care about)
  2. Boot an Ubuntu CD/USB that is the same architecture as your Wubi install (i.e. 32-bit or 64-bit)
  3. Re-format your internal drive creating an ext4 partition for Ubuntu and a swap partition (I'll assume /dev/sda1 and /dev/sda2
  4. Mount the external partition sudo mount /dev/sdb1 /mnt
  5. Migrate: sudo bash wubi-move-2.1.sh --root-disk=/mnt/ubuntu/disks/root.disk /dev/sda1 /dev/sda2

There's a newer version of the script (available here) that can migrate to separate /boot, /usr and /home partitions, but the 2.1 version can only migrate to a single root partition.

Another way to do this:

Since the Wubi migration script can also migrate a normal Ubuntu install, it's possible to migrate your Wubi install to an external drive. Then prepare the internal drive and migrate Ubuntu back to it. This means you don't need the live CD and also has the benefit that you can confirm the migrated install is fully functional before removing the source.

Related Question