Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

While Installing Ubuntu I did the partition and allocate Disk space like that

  1. 4 GB for Home
  2. 1 GB for linux-swap
  3. 95 GB for root

But sooner I realilized that my /Home partition is almoast occupied all space in Home folder.

Now I want to resize my /home partition. My gparted view here

Now I want to shrink my Root partition and allocate the free space to my Home partition. How can I do it ?

share|improve this question
1  
Easier method: sudo mkdir /directory && sudo chown $USER:$USER /disworld && cd ~ && ln -s /directory . and stuff data into /directory. It is seen as part of /home but is actually on /. –  Rinzwind Mar 18 '13 at 18:02
    
oops indeed @guntbert –  Rinzwind Mar 18 '13 at 19:33
add comment

1 Answer

up vote 3 down vote accepted

Making Changes to Installation Partitions

If you want to make changes to the partitions on your hard disk, they have to be unmounted first. This means that you will have to boot into a live environment either off of a CD/DVD or a USB drive, then use GParted or a similar program to alter your partitions. I'll warn you, though, doing this CAN DAMAGE YOUR INSTALLATION! Make sure that you check and double check the changes before you apply them. This is the order that you will likely want to follow:

  1. Backup all your data
  2. Boot into live environment and start GParted
  3. Shrink the root partition to whatever size
  4. Expand the home partition to fill in the space.
  5. Apply changes
  6. Reboot

Note that if you are expanding a partition that has data on it, the process could take quite long because the data has to be copied to the new addresses.

I can't stress enough that you need to CHECK AND DOUBLE CHECK! I know from experience what kind of problems a simple little error can cause.

In Case of Boot Failure

If, after you make the changes, your installation no longer boots, boot back into the live environment, and install and run boot-repair

  • sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
  • sudo apt-get install -y boot-repair && (boot-repair &)

then run the default recommended repair to fix your GRUB installation.

share|improve this answer
1  
and make a backup if you mess with partitions ;) –  Rinzwind Mar 18 '13 at 18:00
    
^ This is also an excellent idea. –  clappboard Mar 18 '13 at 18:03
    
You will have to unmount the swap partition and then either delete it (and then manke a new one after expanding /home) or move it. You may well need to update fstab, certainly you would after recreating the swap partition. –  bodhi.zazen Mar 18 '13 at 18:36
add comment

Your Answer

 
discard

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.