Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Linux. I've installed Ubuntu 10.10 from Windows 7. It's not in Virtual PC, it is independent. It uses a virtual drive in c:, I have chosen it to be 10 Gb.

Now I want to increase the size of this drive. How to do this? I've configured the system for PHP MySQL and installed a lot of software and fixed wireless connection problems a lot of things i don't want to loose these things and start troubling again.

I heard of backups, but I think it will take too long. Is there any other simple and fast way?

share|improve this question
up vote 0 down vote accepted

In other words, you're using Wubi, right? As far as I know, it is currently not possible to resize a Wubi installation of Ubuntu 10.04 or 10.10.

What you can do is add another virtual disk and mount it on /home or /srv, wherever you need room. There are instructions in the Wubi guide. In a nutshell: download the wubi-add-virtual-disk script, and run the following command in a terminal (the number is the size of the new virtual disk):

sudo sh wubi-add-virtual-disk /srv 20000

I recommend moving your installation to a real partition. It'll be less hassle in the long term. In your situation, the route I recommend is:

  1. Boot an Ubuntu 10.10 installation CD/USB, and perform a quick installation on a separate partition. Don't bother configuring anything.
  2. Boot your existing Wubi installation. Mount your new direct-to-partition installation. Let's call the mount point /media/new. Open a terminal and run the following commands to overwrite the new partition with your existing data from the Wubi installation, and set up the bootloader for the new partition.

    cd /media/new
    cp etc/fstab /var/tmp/fstab.new
    rm -rf *
    sudo cp -ax / .
    chroot .
    grub-install /dev/sda
  3. Open both /media/new/etc/fstab and /var/tmp/fstab.new in an editor. In each file, there is a line with a single / in the second column. Replace the line in /media/new/etc/fstab with the one from /var/tmp/fstab.new.
  4. Reboot. You should now be in the new installation. Make sure everything is ok, then you can remove the Wubi files on the Windows partition.

Keep a bootable Ubuntu CD/USB at hand, in case something goes wrong.

Whatever you do, make backups. Making backups is the only way not to lose data.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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