2

I would like to copy or expand my /home directory ... All tutorials talks about moving the home directory from a partition to another but the problem that I only have one partition that was more than 300 gigs (before I resize it and create a new partition) although I see 30 Gigs only on my home directory (4 Gigs left :( )

I resized it and created a new partition as you can see in the next image

I've tried booting from Ubuntu live CD and from a USB and what I can see in Gparted is exactly as in the picture below

I would like to move my home directory to the new partition of expand it.

This is a snapshot of what I can see on my Gparted (note: the new partition is never used I just created it)

http://www.ps-revolution.net/pic/afc3cbbf9f1ba853b2d62f03cf132e8c.png

This is from Disk Utilities

http://www.ps-revolution.net/pic/d40aa2975f8b1679d867f7ef2587089b.png

Thanks in Advance

0

2 Answers 2

3

It looks like you have installed Ubuntu under Windows instead of or as well as as a separate partition. This means that when you load Ubuntu (the windows Ubuntu) you only have a very limited amount of space, but your hard drive shows a massive Ubuntu partition with a ton of space which isn't being used.

alt text

From your image here you can see in (1) where the ntfs partition (which is windows) is mounted as the host. Where as the Ubuntu partition (2) isn't mounted at all as anything. Also the new Ubuntu partition you've made (3) is where I think you've resized the Ubuntu partition (2) and created a new space, which is also not being used or mounted.

To solve this mess you need to back up all your files, delete the new partition and resize the Ubuntu partition back to 300GB. Then go into windows and uninstall Ubuntu from windows. Then see if it will boot into Ubuntu, if it will then job done. If it won't then you need a new install and you need to use the Ubuntu Live CD from boot (not from windows) in order to install it directly and not using a wubi install.

Comment here if you're having issues or need someone to talk you through it.

1

This is a pretty old question, but the solution is here for future googlers: https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk

In Summary:

  1. Download this script: https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk?action=AttachFile&do=view&target=wubi-resize_1.5b.sh
  2. Now cd to the Directory it's in and just run it:

    cd ~/Downloads && sudo bash ./wubi-resize_1.5b.sh [GB]

    Note that there is a limit of 32gb but you can skip it with --max-override.

  3. 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 rename the file \ubuntu\disks\new.disk to \ubuntu\disks\root.disk

  4. Do not delete the OLDroot.disk until you have confirmed the new root.disk is working (or keep OLDroot.disk as a backup).

But the most efficient solution is to perform a Live CD install:

  1. You have to boot from a live CD/USB. This won't work while running Wubi.

  2. Backup the root.disk (not required, but a good idea)

  3. 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

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

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

  5. Run fsck on the root.disk

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

  6. Resize - specify the desired final size (this example resizes to 10 GB)

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

  7. Reboot back into Wubi Ubuntu

1
  • I'm doing the bash script resize right now, it takes a while.
    – avinashbot
    Aug 28, 2012 at 15:13

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.