Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I installed ubuntu 10.04 using wubi. I now wish to allocate more disk space to my ubuntu install. Is this possible?

share|improve this question
add comment

marked as duplicate by Nathan Osman, Mik, Eric Carvalho, Eliah Kagan, LnxSlck Feb 17 '13 at 3:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

From the WubiGuide:

How do I resize the virtual disks?

You can use LVPM, at http://lubi.sourceforge.net/lvpm.html

As an alternative, you can use the following script to move /home to a dedicated virtual disk.

Download wubi-add-virtual-disk, open a terminal and run:

sudo sh wubi-add-virtual-disk /home 15000

Where the first argument is the directory to move to a new dedicated disk, and the second argument is the size in MB.

You should now reboot. If you are happy with the result, you can now remove /home.backup. To undo the changes remove /home, copy rename /home.backup to /home and remove the /home line in /etc/fstab.

Note that contrary to previous information, this script is not suitable for moving /usr - experienced users may be able to do this manually, at own risk, following a process similar to that outlined in the file. (Do not rename /usr until the very last moment, as rsync is installed there.)

share|improve this answer
1  
"LVPM currently does not work with installs generated by Wubi 10.04" –  David B Aug 17 '10 at 13:05
1  
There is an update in the Wubi Guide that has a link to a newer Howto (and script) for resizing a current Ubuntu install: ubuntuforums.org/showthread.php?t=1625371 –  bcbc Feb 12 '12 at 5:13
add comment

There are a few options to resize. Source the Wubi Guide.

You can resize by making a duplicate, larger root.disk. The downside is that it doesn't help if you're short on space and it takes a little longer. On the plus side, you have a backup to make sure everything worked and you run it right from the Wubi install.

The other method is to dynamically resize the root.disk in place. The downside is you have to do it from a Live CD/USB, you don't automatically get a backup, and there's no helper script. The plus side is it's blazingly fast and you can increase by a couple of GB rather than find space to duplicate++.

Both methods are documented in the Ubuntu community Wiki.

It's also possible to create a separate virtual disk for your /home directory. This is not discussed here, but can be found in the Wubi Guide.

Resize and Duplicate the root.disk

First download the script wubi-resize-1.6.tar.gz from https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk to your Downloads directory, right-click and choose "Extract here". The rest of the resize is run from the Terminal.

For usage instructions:

cd ~/Downloads/wubi-resize-1.6
bash wubi-resize.sh --help

To create a new 10GB virtual disk:

sudo bash wubi-resize.sh 10

enter image description here

See the Wiki documentation for more information, including how to verify the integrity of the script. Also, note that there's a built-in maximum for the new disk (32GB), but this can be overridden with the --override-max option. (I don't recommend making the root.disk too large because many Wubi installs suffer from corruption and sometimes the data is not recoverable`. It's better in this case to use shared data partitions or to migrate to a normal dual boot.

In-place resize of the root.disk

If you don't have enough space to do a full duplicate, you can do an in-place resize instead. For this you have to boot from a live CD/USB as it won't work while running Wubi. Although not required, it's a good idea to backup the root.disk or the data on it. (This is a good idea for any Wubi install as it's not as reliable as a normal install).

Mount the NTFS partition that your root.disk is on (this example assumes it's /dev/sda1 and the mountpoint is /media/win - adjust accordingly in the following instructions):

sudo mkdir -p /media/win
sudo mount /dev/sda1 /media/win

Check the size of the root.disk (not required):

du -h --apparent-size /media/win/ubuntu/disks/root.disk

Run fsck on the root.disk:

fsck -f /media/win/ubuntu/disks/root.disk

Resize - specify the desired final size (this example resizes to 10 GiB):

resize2fs /media/win/ubuntu/disks/root.disk 10G

Reboot back into Wubi Ubuntu. See https://help.ubuntu.com/community/ResizeWubiDisk for more information.

share|improve this answer
add comment

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