1

I installed Ubuntu 12.04 alongside Windows 7 in Wubi. Now I want to increase the size of the linux partition.

I thought I just needed to transfer it from Wubi to a real partition by following the steps from
this Ubuntu Forums post.

I am completely new to Ubuntu and having some doubts, so before proceeding I thought I would ask for some suggestions.

My main Windows 7 and Wubi drive is C: which has 200GB occupied with 43GB free space left.
Other partitions are D:, E:, G:.

My plan is as follows:

  1. Create a free space between C: and D:, of about 100GB using Windows disk management
  2. Log into Ubuntu and using GParted to allocate that free space to ext3 type
  3. Grab a little space of about 10GB for the swap partition and also make it ext3 type
  4. Use the wubi_move script and select the partition for Ubuntu and swap

After all that I reboot and everything will work like magic!

Now my questions:

  1. Is there anything wrong with this approach?

  2. What happens to the old Wubi partition?
    Assuming current Wubi occupied space in C: is 20GB.
    Will this 20GB be transferred or what will happen?

  3. What is "GRUB"? Do I need to be concerned about it?

My current

    sudo fdisk -l

Output:

    sriramana@ubuntu:~$ sudo fdisk -l

    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x0008d134

    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *    31145984   522350591   245602304    7  HPFS/NTFS/exFAT
    /dev/sda2       522353475   675450879    76548702+   f  W95 Ext'd (LBA)
    Partition 2 does not start on physical sector boundary.
    /dev/sda3       826107904   976769023    75330560    7  HPFS/NTFS/exFAT
    /dev/sda5       522356736   675450879    76547072    7  HPFS/NTFS/exFAT
ram
  • 11
  • is there any reason you want to use ext3 instead of ext4? – mchid Sep 20 '15 at 02:29
  • No...i even don't know what ext means... – ram Sep 20 '15 at 03:05
  • Do you have 4 Primary Partitions ("Basic Disks" in Windows disk management) ? Be careful, If your Windows uses old partition style with a "Master Boot Record", it converts "Basic Disks" to "Dynamic Disks" by default if you need more than 4 partitions on one disk. But IMHO "Dynamic Disks" don't work. – ngng Sep 20 '15 at 06:49
  • Why do you need to transfer Wubi installation? You could make a fresh install of Ubuntu to partition (you only need 30-50GB free space on disk). Let Ubuntu create the partitions it needs in the free space, you don't need to create and format partitions. – snayob Sep 21 '15 at 00:27
  • @ngng I freed a space of 70GB, between D: and F:, the D: is an extended partition while the C:,F: are a primary partitions. C: is the boot drive. – ram Sep 21 '15 at 14:39
  • @snayob thats sounds nice, so what do I do with the wubi installation then? Suppose I have scattered free space of 10+10+10 GBs between drives won't that cause problems? Don't we need to collect all the free space into a single big free space?? – ram Sep 21 '15 at 14:41
  • @ram An extended partition should work. It is possible to create more than one logical partitions within an extended partition. If your existing logical partition (D:) doesn't use the whole space of the extended partition, you can create additional logical partitions within the extended partition. Partition type of a swap partition is not ext3, it is "linux-swap". The size of the swap partition depends on the size of your RAM. What is the size of your RAM ? – ngng Sep 21 '15 at 19:58
  • @ngng size of my RAM is 4GB – ram Sep 22 '15 at 14:59
  • 1
    @ram A little bit more than 4GB should be enough for the size of your swap partition: How to decide on swap size 10 GB is too much. – ngng Sep 22 '15 at 19:51

1 Answers1

1

Nothing happens to your old Wubi when you migrate. It is purposefully left untouched. It is not a partition, but a virtual partition (a file C:\ubuntu\disks\root.disk).

The principle of the migration is that you make an exact copy* of your Ubuntu install, *except that the old one is a Wubi install and the new one is a normal dual boot.

The migration doesn't help with partitioning, but it will check and prevent you from doing something stupid. E.g. trying to use an ext3 partition as swap. Or migrating to an extended partition. Or wiping out your Windows partition. Or migrating to a partition that isn't empty.

Don't refer to that old ubuntuforums thread. Instead you'll find the latest info at https://help.ubuntu.com/community/MigrateWubi.

The steps to migrate are described there. Use the script. If you do it manually then you don't get any of the checks and you can easily do damage if you make a mistake. But of course if you would like to do it manually, there is a link there to the instructions.

Finally GRUB is the bootloader used by Ubuntu. You don't have to install it when you migrate, but you should. If you choose not to, then you can only get to the migrated install from your Wubi GRUB menu. And you'll have to install it manually later (this is easy enough). I can't go into all the details, but basically when you install GRUB you are giving Ubuntu the control of booting your computer - right now Windows has control - and if you don't install it, you need to boot via Windows, Wubi ... (and that means that your new install isn't in control and when it gets e.g. a new kernel, it won't be added to the Wubi GRUB menu). So, I'd recommend you just accept the default and install it.

If you want more help, edit your question with the output of sudo fdisk -l. Also, I always recommend a backup of important data, and a rescue disk (such as an Ubuntu DVD/USB). There are good reasons for doing this other than partitioning (e.g. hard drive failure) and it's always better to play it safe.

For partitioning, you're sitting on a large Windows primary partition of around 300GB, then an extended partition of 95 GB and another primary partition of 95GB. Ubuntu cannot install itself into free space scattered around... that is something you have to do yourself. In this case there is no real 'free' space as it's all contained inside existing partitions. What the Ubuntu installer can do is split the 300GB partition and create a new primary partition out of that space and install into that. Or split the logical partition '/dev/sda5'.

If you are migrating, or need more options, you will have to manually create free space by shrinking an existing partition, and use it to create a new primary partition; or expand the extended partition to absorb the new free space and then create more logical partitions. It's up to you to decide and how you choose to do it depends on your current usage, as well as how much space you would like for your Ubuntu install.

bcbc
  • 6,026
  • Would you recommend this Wubi migration route or uninstall Wubi+ make a fresh install route? – ram Sep 22 '15 at 15:02
  • I would recommend it if you have everything configured the way you like it. If it's just a 'vanilla' setup you can just reinstall. If you need to uninstall Wubi to make space then that's a factor as well. Really up to you. – bcbc Sep 22 '15 at 15:18
  • I have edited my original question with sudo fdisk -l output – ram Sep 23 '15 at 17:51
  • Also incase of fresh install, if my free unallocated space is scattered arount, will ubuntu install itself in those free space or do we need to collect them all together into a giant free unallocated space? – ram Sep 23 '15 at 17:53
  • @ram I updated my answer. I'd suggest doing some research on partitioning at this point. There is a lot of info and guides available that go beyond the scope of this question. – bcbc Sep 24 '15 at 01:16
  • I successfully migrated to a 85GB space and 5GB linux swap. Now can I safely uninstall my old wubi installation? Using Control Panel> Add/Remove>Unistall Ubuntu? – ram Sep 24 '15 at 06:55
  • @ram Yes. If you installed GRUB when you migrated, you can remove the Wubi one as you described. – bcbc Sep 24 '15 at 23:39