Partitioning – Expanding Primary Partition When Using WUBI


I have installed Ubunut 12.04 using WUBI. The "Installation size" options I chosen was 18GB i.e the amount of space you want to "give up" for WUBI. That is the space wubi's Ubuntu install is able to use. Wubi creates a disk image (loopmounted device) on your host system in/on which Ubuntu is installed. Now, I am running out of memory in primary partition.

Could anyone help me out to extend/stretch the partition size?

Best Answer

  • -Boot from an Ubuntu Live CD

  • -Mount your NTFS partition that the root.disk file lives. For me it was sda3 but just check in GParted (included on the Live CD) In most cases it is the one that is largest, labeled OS. You must mount it
    with these commands (make sure that you mount the correct drive, if
    yours is sda1 then replace "sda3" in the command with "sda1"):
    sudo mkdir -p /media/win
    sudo mount /dev/sda3 media/win

  • -Check the size of your root.disk (optional) de -h --apparent-size /media/win/ubuntu/disks/root.disk

  • -Run fsck on root.disk fsck -f /media/win/ubuntu/disks/root.disk

  • -Resize root.disk (this command resizes it to 40GB, but you can resize it to whatever you want, ONLY IF YOU HAVE THE REQUIRED SPACE
    ON YOUR HARD DRIVE) resize2fs /media/win/ubuntu/disks/root.disk 40G

  • -Shutdown and boot into your WUBI installation

But if while doing this process some crash happens you can recover deleted files and folders from corrupted or formatted hard disk drive, memory card, SD cards and many more storage device use windows data recovery software

Related Question