I have Debian server with multiple HDDs.
/
, /home/
, swap
and others are LVM Logical Volumes.
/boot
is on a small partition at the beginning of one of the physical HDDs.
fstab
uses UUID for /boot
and /dev/mapper/
for the rest.
I want to move the root /
and /boot
partition to my new SSD.
My idea is to create the same small partition on the SSD and use dd to copy it over. Then I will mount the new boot partition (live distro probably necessary) and run grub-install? Also, update UUID of the new /boot.
The rest of the SSD will be LVM partition. If I add it to the same VG I can migrate it by forcing PV to the LV AFAIK.
Will it work? Is there a better way?
Edit: I am using BIOS boot.