I need to migrate one 256GB HDD to 240GB SSD, but EFI partition is at the very end of my HDD.
I already did backup:
sudo dd if=/dev/sda of=backup.img
but I can't put this image to my SSD drive, because this image is 256GB.
Disk has 165GB of data and 68GB of empty space and 20MB of EFI partition at the end (sorry for polish labels in that windows app), so can I use dd or any other Linux tool to say something like:
sudo dd if=/dev/sda of=/dev/sdb SKIP_SECTORS_FROM_166GB_TO_186GB
Can I use any Linux tool (parted?) to move EFI partition 20GB to the left and use dd to copy first 236GB of data to SSD drive?
(I have CloneZilla Live USB.)