I am struggling to divide my hard drive into two or more partitions. Evidently, I made a mistake when installing Ubuntu and now I have only one disk which takes the the whole space. I tried to use GParted but it could only make it 48 Mb less. Is there a way to correct it? Also, why are there two disks with the size of my whole drive?
You won't be able to edit your filesystem from a local boot - you'll have to use livecd if this is root hdd, which it appears to be.
The reason that there are 2 partitions of the same size is because sda2 is the root partition for sda5. In other words, just as sda1 and sda2 are subpartions of sda, sda5 is a subpartition of sda2. sda2 contains sda5.
You can't resize a partition while it's mounted. You have to unmount it first. One simple way to do that is to boot from a live USB and use a tool like GParted to resize your partitions.
The arrow at the left suggests that sda5 is a child partition of sda2. think of it as a folder inside a folder.