Moving Ubuntu LVM (with EFI boot) to new drive without reinstalling

use this guide to “extend” the LVM volume group onto the new physical device and then remove the old physical device from the group:

https://help.ubuntu.com/community/How%20to%20Migrate%20Ubuntu%20installed%20on%20a%20LVM%20Logical%20Volume%20from%20a%20MBR%20disk%20to%20a%20GPT%20disk%20on%20non-%28U%29EFI%20hardware%20without%20data%20loss

Gotchas:

  • probably skip the steps #8 and #9.
  • maybe also skip the grub-installing step
  • in fact, only use this guide for the LVM “cloning”, as the EFI details are covered by the next guide

Have the first partition on the new drive as an EFI partition:

  • 250 or 500MB
  • FAT32 format
  • boot and esp flags (GParted will select them both for you I think)

Use this answer to install EFI Grub:

https://askubuntu.com/a/831241

Gotchas:

  • make sure you’re booted in EFI mode with the LiveCD
  • when mounting the filesystem in step one, you proabably have ot use /dev/mapper/{lvm-group-name}-root rather than /dev/sdXY, as LVMs aren’t actual filesystems on their own (?)
#8 #9