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,264
  • 56
  • 94
  • 147
Owais
  • 103
  • I think, that is for the scenario when the unallocated space in under the 'extended' drive but in my case, the unallocated space tends to relate to C: drive only and not to any extended drives and hence, when clicking on the drives, the Options are greyed out. Thanks – Owais Jul 12 '17 at 07:24
  • How did you install Windows 10 on a MSDOS/MBR partitioned disk? - if not, why do you keep saying extended. Also for you to be able to extend your partition and the file-system on it, the Unallocated partition and the partition you want to extend have to be physically contiguous on disk. otherwise, the safest solution is to backup your entire disk, and make the partitioning from scratch because most of the solutions online, even though they have a tendency to appear straight forward and simple usually cause unprecedented and damaging problems. I should know - I have lost stuff this way. – endrias Jul 12 '17 at 08:40

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,874
  • thanks for the answer. Yes, give me that instructions as well. If it not worked, i will try LiveCD. – Owais Jul 12 '17 at 07:35
  • This is actually easy to do and should be done from a live cd. Boot from your ubuntu live cd and run gparted. Unmount the swap space. Select the extended partition and resize it to fill all the free space. Click apply. Select you ubuntu partition and resize it to fill all the free space within the estended partition. Click apply. I always perform one change at a time, its just a habit. – hatterman Jul 12 '17 at 07:47
  • thanks. I done using the your first suggested option. great. – Owais Jul 12 '17 at 08:02