Ubuntu – How to merge two ext4 partitions

gpartedpartitioning

So I have two partitions, an 80 GB Partition (where I installed Ubuntu on) and a 44 GB partition (With nothing on it), Both are ext4 partitions.

How do I merge them into one without losing my data?

Best Answer

OK, here we go...

FIRST, do a backup of sda5!

Boot to the Ubuntu Live DVD and start gparted.

  1. right-click on sda9 and issue a swapoff
  2. right-click on sda10 and delete it
  3. right-click on sda9 and issue a move/resize
  4. place the pointer in the center of the partition, it'll change to a hand icon, and MOVE the partition all the way left
  5. click the APPLY icon
  6. right-click on sda9 and issue a swapon
  7. right-click on sda5 and issue a move/resize
  8. MOVE the partition all the way left, the same way as you did before
  9. RESIZE sda5 by dragging the RIGHT-SIDE-HANDLE all the way to the right
  10. click the APPLY icon
  11. reboot the computer
Related Question