#!/bin/sh # inspect GUID Partition Table sudo gdisk -l /dev/sda sudo blkid # list the LVM LVs ls /dev/mapper/ # check the size of the VG to determine how small to shrink the root FS, which will be using the entire VG at this point sudo vgdisplay # I'm working in an 8GB VM so am using very small LV sizes. I'd recommend minimum 8GB for root FS, 12GB if /var/ is not in # a separate 8GB LV sudo lvresize -L 4G -r /dev/mapper/kubuntu--vg-root # create an LV for /home/ sudo lvcreate -L 1G kubuntu-vg -n home # create the file-system sudo mkfs.ext4 /dev/kubuntu-vg/home # mount the newly installed root FS sudo mount /dev/mapper/kubuntu--vg-root /target # add the /home/ LV to the FS table echo "/dev/mapper/kubuntu--vg-home /home ext4 defaults 0 2" | sudo tee -a /target/etc/fstab cat /target/etc/fstab # determine which files and directories (all of them!) need moving to the new /home/ ls -al /target/home/ # mount the new home FS somewhere sudo mount /dev/mapper/kubuntu--vg-home /mnt # move everything under the root FS's /home/ to the new home FS sudo mv /target/home/* /target/home/,[^.]* /mnt/ # check ls -la /target/home/ # clean up sudo umount /mnt /target # reboot and enjoy