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.

Is there anyway to change the partition size of Ubuntu while using Ubuntu? I currently have 2 partitions and would like to shrink the one I have Ubuntu installed on to make a storage partition so I can easily format and reinstall without constantly backing up personal files.

share|improve this question
    
Don't try it unless you know exactly what our are doing bro. I believe "sudo fsck" can do what you asked but 99.9% it will screw up your partition. Better do it from outside. –  harisibrahimkv May 5 '12 at 17:42
add comment

3 Answers

up vote 2 down vote accepted

The smart answer is to boot from the Ubuntu Live CD or USB, which has gparted on it, from which you can easily resize the partitions on your hard drive without any of them needing to be mounted. It has a nice GUI and it makes it easy. No brainer. If you don't want a broken system, do that. (And make sure your data's backed up always!)

If you really want to know if it's possible to resize a partition while actually running Ubuntu from that partition, then the answer is that it may be, but I definitely wouldn't recommend it unless you love taking risks.

  • The ext3 file system allows for live resizing - enlarging a partition while it's active and mounted. This would not allow you to shift the partition left or right, nor to shrink it, but to enlarge a partition.

  • If you use LVM (an alternative to partitioning, sort of) then you can move, resize, etc partitions while live without any problems. This is complex.

  • From the root recovery prompt, you may be able to resize or move those partitions other than the root partition. This is very advanced.

share|improve this answer
    
I attempted to resize a wubi install previously and though i was able to increase the size of the the wubi virtual partion ubuntu became unstable and had a noticeable slow down. I am currently have a few issues with 12.04 now that I've upgraded and have a true install. I believe i'm currently on an ext4 partition, I was unsure how exactly to use and setup the partion manager on the live CD with the mount options and wanted to make a NTFS partition and did not see that option. This is essentially a fresh install as i knew i would want to change partition sizes once i had installed. –  schonjones May 5 '12 at 18:33
add comment

There is no way to change the partition size while the partition is in use unless you are using LVM which is only available in the alternate installer and requires some knowledge of the LVM system to use.

Sorry. :)

To achieve what you want you need a Live CD/USB. You can do the transformation and then adjust the mount points in /etc/fstab of the root partition. There are some intricacies but they are mostly answered on askubuntu or other places. If in need - ask another question about that.

share|improve this answer
1  
Given that my live CD is 11.10 and i just updated to 12.04 should i have any problems doing this or should i just make another CD? I'll check to see if i can find some info on the intricacies of it. –  schonjones May 5 '12 at 17:58
1  
11.10 CD will do just fine. The general procedure goes like this: 1. Launch GParted and do the resizing of the partitions the way you want them; 2. Mount the root partition and edit the /etc/fstab file adding the new partition description - UUID, fs, mount point etc.; 3. Reboot –  lightrush May 5 '12 at 18:02
add comment

You can not change partitions while they are mounted.

Best method: create a gParted bootable CD/DVD and use gparted from there or click here for the download itself.

Youtube Video demostrating this.

share|improve this answer
    
gparted seems very easy to use however it does not appear to be available on my install cd. –  schonjones May 5 '12 at 17:53
    
ah well there I can help :+ –  Rinzwind May 5 '12 at 17:59
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.