A mix of these tutorials:
- create a new (bigger) virtual hd
- use a gparted iso, create a virtual machine and attach the iso, the old (smaller) hd and the new hd to the machine
- once started, identify the two hard drives and launch:
dd -if=/dev/sda of=/dev/sdb
be careful because if you invert if
and of
you will delete your original hd.
This will take a lot of time to copy everything from one hard drive to the other.
- At this point you will have an hd with all of the original partitions, and a lot of unallocated space. Just resizing the original partitions in gparted won't work.. some trickier adding and merging is needed:
First of all add an LVM partition using gparted, then follow these instruction from Increasing the logical volume
:
https://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/