I want to expand my root partition /dev/sda5
by adding unallocated space. Primary Partition is 30 GB and I want to add 20 GB more so that it can be 50 GB. I tried using gparted and live CD but doesn't work.

- 17,696
2 Answers
It looks like you have:
A Primary Partition, which contains
/dev/sda1
/dev/sda2
/dev/sda3
/dev/sda4
Unallocated space
and a Secondary Partition, which contains
/dev/sda5
You'll need to seek advice on shrinking your Primary Partition. I'm not going to get more detailed, because I'm just guessing.
Re your picture: Observe the keys next to /dev/sda2
and /dev/sda5
. They're indications that these partitions are mounted, and that gparted
won't change /dev/sda
while they're mounted.

- 36,399
-
dev/sda 1,2,3,4 are windows partion and dev/sda4 is ubuntu. Want to merge unallocated space to dev/sda4. – Shivang Saxena Mar 07 '20 at 03:50
-
This has incorrect information, AND it doesn't answer the question. :-( – heynnema Mar 07 '20 at 19:26
Note: I believe that you mean you actually want to increase /dev/sda5 (not /dev/sda4)...
Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.
Keep these things in mind:
always start the entire procedure with issuing a
swapoff
on any mounted swap partitions, and end the entire procedure with issuing aswapon
on that same swap partitiona move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor
a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor
if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)
you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window
Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.
- boot to a Ubuntu Live DVD/USB
- start
gparted
- move /dev/sda5 partition all the way left
- resize the right side of /dev/sda5 all the way right
- click the Apply icon
/
. – Pilot6 Mar 06 '20 at 19:40