At first thanks for reading and obviously i am greatly thankful to you who is going to give me or show me a good way.
I am using 64bit Ubuntu-16.04 and have a 111.8GB Disk.
As you can see from above i have Ubuntu installed in extended partition /dev/sda5 and swap in extended partition /dev/sda6. I have windows installed in /dev/sda2 and System Reserved in /dev/sda1 which are in primary partition.
Now i want to remove /dev/sda2 and /dev/sda1 and expand my root partition /dev/sda5 without loosing data.
Is there any way i can do that?
And what about making the root and swap partition to primary partition without hampering system ?
Yes. But you can not remove active partitions.
So start Ubuntu (and not Windows as you did in the image) and start up "gparted" (
sudo apt install gparted
in case you have not got it installed yet). Mark all the Windows partitions for deleting, and execute it.This will result in unallocated space. Next expand / to include this unallocated space, execute it.
Mind though that you can only add to a partition if the empty space is next to it. If it is not adjecent you need to add it to the one next to it and then shrink it so the empty space moves before or behind that partition and then move it in the direction you need it to go.
And you are done.