I am dual-booting Windows 7 and Ubuntu (installed with wubi). So far there have been no problems, but now it says the disk is out of space all the time (I think that is because /dev/loop0 is used 100% -- would that cause this?).

So I wish to partition them properly, as I think that is the problem. I want to move all my Windows stuff and files to one partition (sda1) and move all my Ubuntu files to another partition (sda2).

I used gparted to configure disk space on sda1 and sda2, making sda1 200G with 10% free space, and sda2 50G with 80% free space.

However, I don't understand how to determine which partition Ubuntu is installed on, and how to move files from one partition to the other.

Here are some terminal commands that describe my system.

$ sudo blkid

/dev/loop0 (ext3)
/dev/sda1 (ntfs; boot)
/dev/sda2 (ntfs)

$ sudo fdisk -l


$ sudo df -l

/dev/loop0 *(using 100% of 5.5G; mount point: /)*
udev *(using 1% of 1.5G; mount point: /dev)*
tmpfs *(using 1% of 500M; mount point: /run)*
none *(using 0% of 5M; mount point: /run/lock)*
none *(using 1% of 1.5G; mount point: /run/shm)*
dev/sda1 *(using 96% of 200G; mount point: /host; boot)*

Also, when I check my /etc/fstab file, it only has:

/host/ubuntu/disks/swap.disk    none    swap    sw  0   0

2 Answers 2


Do all this as root. After step 2, there's an automated method; I listed the manual steps here.

(Note: You really should have a swap partition.)

  1. Make sure sda2 is actually empty or backed up (it will be gone forever).
    Browse it with whatever to make sure. You say in the question it isn't empty. It needs to be.

Edit to address a comment:
You could use whatever file browser you like. You could just mkdir /host/dump, mount /dev/sda2 at /media/tmp, and mv /media/tmp /host/dump

  1. Once you are SURE it is empty and/or backed up: Format sda2 as ext4:

    umount /dev/sda2
    fdisk /dev/sda
    mkfs.ext4 /dev/sda2
    #Accept the defaults for mkfs  
  2. Mount it in /media or /mnt:

    mkdir /media/mynewinstall
    mount /dev/sda2 /media/mynewinstall
  3. Copy everything across

    cp --preserve -R /{bin,dev,home,root,usr,etc,lib,opt,sbin,var,boot} /media/mynewinstall/
    mkdir /media/mynewinstall/{mnt,proc,sys,tmp}
    mount --bind /dev/ /media/mynewinstall/dev/
    mount -t proc proc /media/mynewinstall/proc/
    init 6
  4. Update grub (so it sees your second Ubuntu install) -- boot normally into wubi:

    grub-install /dev/sda
  5. Boot into your new REAL install. Select it from the list...use the edit options to find the new one

In the manual it tells you that edit any of the boot entries by pressing <e>. Sometimes to get the menu to show you have to use the shift or tab get during the boot process.

After you get the menu to show, check the entries by pressing e.

You should notice some reference to which disk is which. You want the one where UUID is set to the thing that matches /dev/sda2.

If this is seeming overly complicated, why not use the automated method noted at the very beginning.

  1. Update grub again (so it uses the /boot folder from your second install):

    grub-install /dev/sda
  2. Delete your Wubi install. Remove C:\ubuntu and C:\wubildr* (reference).

  3. Update grub again (so it no longer references the other install at all)

    grub-install /dev/sda

Done. The grub-installs might be superfluous, but I'd rather be safe than sorry.

  • Thank you a lot! But I have some more questions... How can I see what is in sda2 and safely move it over to sda1? PS i made sda3 with filesystem linux-swap.
    – oFca
    Mar 26, 2012 at 18:33
  • Thank you for the edit. I am on the 5th step. Not sure what you mean to boot into my 'real install'. After step 4 terminal said 'Found Ubuntu 11.10 (11.10) on dev/sda2'. Is that enough? Can I now delete wubi install and finish with step 8?
    – oFca
    Mar 26, 2012 at 23:28
  • I would boot in to the /dev/sda2 install and perform step 6. Mar 26, 2012 at 23:43
  • Instead of explicitly naming the contents of the root directory, and manually creating mnt,proc,sys,tmp, you can just cp -ax /* /media/mynewinstall/. Also I'm not sure where you were going with init 6. That will reboot the system. I think you wanted chroot /media/mynewinstall/ instead.
    – psusi
    Mar 27, 2012 at 13:40
  • I followed all the instructions on deleting wubi you mentioned in the reference (wiki.ubuntu.com/…). But now I cant choose to boot ubuntu, only win 7 pops up in the boot menu. How to boot into Ubuntu to update grub and install it and finish with this?
    – oFca
    Mar 27, 2012 at 14:06

It looks like you already have two Windows partitions and a Wubi install of Ubuntu, which means it lives inside a file on your main windows partition. If you uninstall Ubuntu with the Windows control panel, and use gparted to shrink your windows partitions down a bit, and move them so that all of the free space is contiguous, then install Ubuntu normally ( boot from the cd ), and choose the option to use the unpartitioned space, you will end up with a third partition for Ubuntu ( and a 4th for swap ).

  • Thank you. I am doing it the way aking suggested. But, paralelly, I just made built me a nice pc on wich I'll run Linux exclusively. I'll install them via booting from CD.
    – oFca
    Mar 26, 2012 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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