Skip to main content

Cloning the Disk Image

su root

# Change diskname Example: /dev/sda
export $DISKNAME = /changeme 

lz4 -dc PBX-LVM.img.lz4 | dd of=$DISKNAME --status=progress

# Repair Partition tables in gdisk
# Delete lvm partition and expand to whole drive
gdisk $DISKNAME

partprobe

pvresize $DISKNAME

lvresize -L +3G --resizefs PBX-vg/swap_1

lvresize -l +100%FREE --resizefs PBX-vg/root