I finally solved the problem using the migration assistant.
You probably simply can attach the source disk to the target Mac using any USB external disk case. I did not try this because I don't have one at the moment, but 3 empty hot-plugging SATA bays.
I prefer standard tools where I know what they do, so my solution heavily relies on gparted and dd. If you are not familiar with dd abort here.
You won't need neither the source nor the target system's passwords.
Why do we need this at all? MacOS is not Linux, every installation is very hardware specific and simply transferring an installation from a different model won't work most of the times. (even Windows can do this!)
- install
hfsplus on your Linux PC to be able to handle Mac partition content.
- does your target disk offer enough space for the source partition, the target partition used up space and the source data size?
- if not: copy the target disk to a larger disk using
dd. this will be your new target.
- if yes: still make a backup of the disk with
dd.
- check if your target partition has free space more than the source partition data size
- if not: use gparted to increase the target partition size until it can hold the source data.
- read the source partition - the partition only - into an image using
dd
- use gparted to create a HFS+ partition on the target disk of at least the size of your source partition.
sudo partprobe to be sure the system re-reads the partition tables and we don't destroy any data because of an old table being active.
- use
dd to dump the source partition into the newly created partition
- if you wish do
fsck.hfsplus -f on the source and target partitions.
- insert the target disk into the target Mac
- boot using Command-S (Windows-S) for single user mode
- again do
/sbin/fsck -f if you wish. for me this did not work on the source partition
- remount read/write using
/sbin/mount -uw /
- delete
rm /var/db/.AppleSetupDone, this will make apple boot into the setup wizard on next boot
- type
reboot
- in the setup wizard simply chose to migrate from other partition
That's it.
If you still need a password for your Mac, repeat the steps that initiate the setup wizard. From there do not migrate any data, instead a new admin user will be created.