Original Question: How to resize root partition without live CD?
I have a virtual machine that I need to make bigger. I made the VM img larger and now I need to resize the partitions so I can use the extra space.
This is my current partition table and the goal is to combine /dev/vda1
and /dev/vda2
.
vda1
is my current root partition
vda2
is an extended partition that contains vda5
(swap)
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 18874367 9436160 83 Linux
/dev/vda2 18876414 20969471 1046529 5 Extended
/dev/vda5 18876416 20969471 1046528 82 Linux swap / Solaris
This would be simple with Gparted and a live CD, but I can only ssh to the server, or open it in virt-manager but it is still command line only. How can I possibly resize the root partition?
The VM is Ubuntu server 12.04.