i found this for you mate on the ubuntu forum:
The first, described here, is not strictly a resize, but rather a duplication to a larger virtual disk. E.g. if you have a 7GB root.disk, and you want to make it 10GB you need 10GB of free space (plus leave enough for Windows). This is safer than attempting to expand the current root.disk.
This technique must be run from within the booted Wubi install.
The second technique is a true resize, which must be performed from a live CD. This is much faster and can make better use of the available space. See post #2 for details.
Automated resize
Download the attached file wubi-resize_1.3b.sh and save it to your Downloads directory.
The rest of the resize is run from the Terminal:
For usage instructions:
To create a new 10GB virtual disk:
After the script is completed it will instruct you to reboot into windows, rename the file \ubuntu\disks\root.disk to \ubuntu\disks\OLDroot.disk and then ename the file \ubuntu\disks\new.disk to \ubuntu\disks\root.disk
Do not delete the OLDroot.disk until you have confirmed the new root.disk is working (or keep OLDroot.disk as a backup).
Note: the script will merge separate virtual disks into a single virtual disk and automatically adjust /etc/fstab accordingly. If this is not desired, use the manual method. The script limits the size of the new virtual disk to 32GB. Please refer to the usage instructions for options if you require a larger size (although I would recommend migrating to a normal install if this is the case).
How long does it take?:
To create a 5GB disk from a freshly installed Ubuntu on my machine, "dd" takes 4 minutes, "mkfs" takes 9 seconds, and "rsync" takes 6 minutes. On an older install with lots of files or a fragmented partition, the rsync will take a lot longer.
Known issues:
1. The script will exclude mounted partitions under /media and /host - but partitions mounted under a non-standard mountpoint e.g. /windows will be copied. Please unmount these prior to running the script. (I'll release a new version to correct this).
CREDIT... I used the LVPM guide by Gena Kovaks and the scripts by Agostino Russo from the Wubi guide (and lupin package) as reference material. The code is now hosted on GitHub. You can keep track of new development or contribute. See
https://github.com/bcbc/Wubi-resize
Manual resize:
For those interested, I've included the commands to perform the resize manually.
WARNING... the commands "dd" and "mkfs" are
very dangerous if used incorrectly (they can destroy all the data on your computer). It is recommended to use the automated resize (the attached script) as there are additional checks and safeguards against errors.
Please ensure you have enough space for the new virtual disk before proceeding. E.g. for a 10GB disk you'll need 10GB free as well as enough space for Windows to operate. Do not use this if your /host is a FAT32 partition.
1. Unmount any partitions that are not mounted under /host or /media. (e.g. sudo umount /windows )
2. Run all commands as root; check free space on /host
3. Create a new virtual disk of e.g. 10GB (10,000 MB)
change count= parameter as appropriate.
Code: Select all
cd /host/ubuntu/disks
dd if=/dev/zero of=new.disk bs=1MB count=10000
4. Format the disk with the ext4 file system
5. Mount and copy files to new virtual disk
Code: Select all
mkdir -p /media/newdisk
mount -o loop new.disk /media/newdisk
rsync -av --exclude '/sys/*' --exclude '/proc/*' --exclude '/host/*' --exclude '/mnt/*' --exclude '/media/*/*' --exclude '/tmp/*' --exclude '/home/*/.gvfs' --exclude '/root/.gvfs' / /media/newdisk
umount /media/newdisk
exit
6. You're done!
Reboot into windows, rename the file \ubuntu\disks\root.disk to \ubuntu\disks\OLDroot.disk
Rename the file \ubuntu\disks\new.disk to \ubuntu\disks\root.disk
Reboot back into Ubuntu -- only delete the OLDroot.disk if you are sure it worked.
NOTE: if you have previously created separate virtual disks e.g. for /home, this process will merge /home back into the new virtual disk. That means you need to remove the separate entry for /home from your /media/newdisk/etc/fstab (before the umount command) (or change the rsync command to --exclude '/home/*' altogether).
hope this is what you are looking for...