0

I have installed two operating systems i.e. WINDOWS 10 and UBUNTU 16.04.

Windows 10 C: drive (shows /dev/sda5 in GParted) is 130GB whereas accidentally, Ubuntu 16.04 drive (shows /dev/sda2 in GParted under extended which is mounted) is 9.59GB and giving me no free space available which is a headache for me.

I have freed 90.66GB from Windows 10 drive (it had became 130GB) and I make it unallocated. Now, I wanted to MERGE it with Ubuntu drive but Ubuntu drive is mounted and the unallocated space tends to merge in C: drive instead of the Ubuntu drive.

drive allocation pic

Note: I have tried every possible solution but all in vain. I have tried using GParted in Ubuntu and Disk Management and Easeus Partition Master in Windows 10. In GParted, I can create standalone drive and also can merge in the C: drive but cannot merge in Ubuntu drive. Same happens for the Windows 10 softwares.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Owais
  • 103
  • 2

1 Answers1

-1

You first need to grow the extended partition before it can be added to ubuntu.
Because ubuntu in in the Extended partition it can only use space inside the partition.

Also it is safest to manipulate partitions when unmounted, so booting a LiveCD to do the operations is advisable.

Boot from a LiveCD. add the free space to the extended partition.
Then add the free space inside the extended partition to the ubuntu partition.

A second option which does not require resizing partitions is to make a partition from the free space that you mount as your home directory.
You current ubuntu partition is about 10GB. This is the amount usually given for root.

To move your /home directory:
First make a partition from the free space using gparted, and record the UUID.
mount the drive to /media, then copy the the contents of home to the new partition.
rsync -a /home /media/(uuid of partition)
verify the copy succeed.
Rename /home ( it can be deleted later when everything is known to be working)
mv /home /homebackup

add this line to /etc/fstab
UUID=(uuid of partition) /home ext4 defaults 0 2

ravery
  • 6,924