Web lists-archives.com

Re: New SSD on a MacBook Pro

>  4      23.2GB  31.2GB  8000MB  linux-swap(v1)  swap
>  5      31.4GB  121GB   89.8GB  ext4            linux

Didn't use LVM?  Too bad: that means there's a risk your new dirve and
partitions will get new identifiers so your fstab may need to be adjusted.

> Now, here is what I would perform:
> (1) Use macOS Time Machine to backup macOS on an external hard drive.
> (2) dd the linux partition into an image file:
> $ sudo dd bs=4M if=/dev/sda5 of=<ext_media>/debian_part.img
> (3) Install new drive.
> (4) Use macOS Recovery to restore macOS from the Time Machine backup.
> (5) I believe that point (4) will also restore the EFI partition, but will
> debian/grubx64.efi be preserved as well? Need to gather some info and
> check. Anyhow, I should have ended up with just two partitions: the EFI
> partition and the macOS partition.

macOS doesn't touch EFI, AFAIK, so don't expect the Time Machine to
touch it either.

This sounds rather complicated.
Here's what I'd do:

1- take out the old SSD and put it into an external reader that you can
   connect via USB
2- put the new SSD in
3- connect the old SSD via USB and boot to its macOS this way (if you
   can boot into Debian this way, even better).
4- create the same partitions on the new drive as you had on the old drive.
5- Use `dd` to copy the content of each partition from the old drive to
   the new drive.
6- reboot without the old drive.  You should be done.