0

I have a relatively new HP laptop that came with Window 8. I created a partition and installed Ubuntu on half of the drive. Now I'm at a point where I rarely use Window, but I'm running out of space in the Ubuntu partition. I can't delete Windows entirely, and I don't have to have to back up / re-install Ubuntu on a larger partition. Is there any way within Ubuntu that I can mount the Window partition, shrink it, and claim the newly freed space for the existing Ubuntu partition?

2 Answers2

0

You can use Gparted in Ubuntu. You will have to first unmount the windows partition since shrinking/expanding can be done only on unmounted partitions.

Using gparted, shrink the windows partition such that the amount of extra space you want for Ubuntu, is equal to the amount of unallocated space.

Remember, this unallocated space is currently not utilized by wither windows or ubuntu. So, now you need to expand the Ubuntu partition.

But, you cannot modify a mounted partition.i.e You cannot expand(or shrink) your Ubuntu partition while using it.So, you have two options:

1.Boot using an Ubuntu USB stick into live environment to modify the partition(i.e use gparted from live environment), or

2.Boot into windows and use gparted like software alternatives available for Windows(try EaseUS Partition Master or Parted magic)

viv1
  • 55
  • 1
  • 7
0

Yes.

Use GParted to change partitions as mentioned in the related question Tim mentioned above. So first shrink the Windows partition (with it unmounted: you can't manage the partition while it's mounted) then claim the empty space for Ubuntu. There's at least two different ways you can claim the newly freed space for Ubuntu:

  1. Move the partition that Ubuntu is on to the start of the empty space and then enlarge it to take up the new empty space at the end of the disk. Because this is the partition that Ubuntu is installed on, you won't be able to do this while running Ubuntu. Instead, you'll have to run a live CD with GParted included (ex. Ubuntu, PartedMagic, etc...). This will also introduce a boot problem because your Ubuntu install no longer exists where GRUB thinks it is. You should be able to fix this as documented by GParted: http://gparted.org/display-doc.php?name=help-manual#gparted-fix-operating-system-boot-problems. Also with this approach, you'll definitely want to make sure you have a good backup of your entire Ubuntu install since if anything goes wrong (ex. loss of power), your Ubuntu partion could become messed up.

  2. Create a new partition in the empty space, format it (ex. as ext4), and mount it in Ubuntu so that you can start using it. This approach doesn't require you to use a live CD (so technically the other approach doesn't meet the "within Ubuntu" criteria of the question). You might need to configure Ubuntu to automatically mount your new partition such as my creating an fstab entry.

The disadvantage of approach #2 is that the space on the new partition won't be useful for installing programs or doing other built-in OS things. It'll be a great place to store media, documents, etc... though.

Cameron Lee
  • 143
  • 1
  • 5