10

I had installed Ubuntu inside Windows XP but then I formatted XP and installed Windows 7.

EDIT1: I used Wubi for the same. I want to know which one of the two will solve my problem? creating a virtual disk or resizing root? Also is resizing root possible as the 4GB ext4 partition is already in a NTFS format Hard Drive partition.

At the time of installation I had allocated only 4GB of space to Ubuntu. I want to increase that size as I keep getting a low disk space notification.

I have surfed through a lot of similar questions but this is not a duplicate.

Because I want to know a little about the file systems. In order to solve my problem,do I have to increase the size of root.disk? Or will it be solved by creating a virtual disk?

Also I want to know the difference between creating a virtual disk and just increasing disk space of root.I'm new to Ubuntu so I don't know how the file systems function.

EDIT2:I have created a virtual disk of 10gb ,but I'm still getting the same notification.Is there anyway to install all further applications on the virtual disk I created?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Pavitar
  • 173

4 Answers4

6

Additional virtual disks are only useful if you're able to split the filesystem (eg putting /home/ on it) so aren't much use if you've installed a ton of stuff. You can split things like /usr/bin but it can get really messy, really fast.

Have you not seen a link to this post on your travels? You'll need a LiveCD or LiveUSB to action it, but it's very simple once you're at that point. Here are the main points:

  • mount your windows partition (where the Wubi install sits)
  • fsck the Wubi filesystem to make sure it's okay. If you don't do this and it has corruption in it before resizing, bad things can happen.
  • resize2fs the Wubi filesystem to increase its size.
  • Have a snack, chill out, high-five yourself... You've just increased the partition size.

Those aren't the full commands, I'll leave those in that thread because it seems to be well maintained.

Failing that, installing Ubuntu only takes a few minutes. If you like it, perhaps you should consider a proper install (disk performance is better too).

Oli
  • 293,335
  • 1
    The thread you linked to has been closed, but now the Wubi resize methods are documented in the Wiki: https://help.ubuntu.com/community/ResizeWubiDisk and https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk – bcbc Feb 16 '13 at 16:53
2

It's hard to tell here whether you are referring to virtualization or simply the Wubi installer.

Assuming the former, first increase the size of the virtual disk, since that will allow us to expand the actual partition.

Then mount the LiveCD in the Virtual Machine and run gparted. Using that tool, resize the partition to take up the remaining space you created when you expanded the disk. Now reboot and unmount the CD.

Nathan Osman
  • 32,155
1

You actually don't have to boot from a livecd to do this:

sudo dd if=/dev/zero bs=1MiB of=/host/ubuntu/disks/root.disk conv=notrunc oflag=append count=2048
sudo losetup -c /dev/loop0
sudo resize2fs /dev/loop0

This will add 2 GiB to the filesystem. Adjust the count=2048 for different sizes.

psusi
  • 37,551
  • first command says 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 48.1784 s, 44.6 MB/s Second command says loop: can't set capacity on device /dev/loop0/: Not a directory and third one The filesystem is already 2494464 blocks long. Nothing to do!

    but not added any where

    – Shailesh Jan 10 '15 at 06:20
  • @shailesh, woops! I put an extra slash on the end there, it's just /dev/loop0 – psusi Jan 10 '15 at 23:24
  • Thnaks for reply. I found a very easy way to extends root.disk. https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk JUST extract zip from link https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk?action=AttachFile&do=view&target=wubi-resize-1.7.tar.gz and run the command one line and this will done all jobs within minuts. – Shailesh Jan 11 '15 at 06:56
0

Of course it is too late but helpful for new comer

Install 14.04 Ubuntu via WUBI in windows 8. I have done these steps:

Download the iso from Ubuntu site. mount it in a virtual drive in windows and copy all files in a drives folder. From the folder click the exe to run WUBI setup. Which runs same as 10.x Ubuntu.

In 5 to 10 min it ask to restart, I have a issue of ro (read only) so convert it to rw(read and write) as show here Describe Here

Above part is for installing..

To extend the WUBI root.disk is a way.

I have found solution here you need to download a zip from link this.

Extract it and just run the one line command and this will done all job

sudo bash wubi-resize.sh 10

Above commad will done following job:

Create a disk(Virtual) with desired (10GB) size in drive. Copy all data from you running disk to newly created disk and ask you to boot Windows and rename root.disk to OLDroot.disk and new.disk (New drive) to root.disk and reboot again Ubuntu. Now check you system propery it will show your new size. This works well for me.

Thanks

Shailesh
  • 101