Well, I just got an Intel X25-M 160 GB SSD for my laptop (a MacBook), and I wanted to migrate all my partitions (I was triple-booting OS X, Ubuntu Linux and Windows 7) to the new disk.

This turned out to be less than a breeze, since there are a few caveats and the entire process takes time, but I will detail it here and maybe save some of you some time.

WARNING: Don’t try any of this if you don’t know what you are doing! You can easily erase your partitions by specifying the wrong disks.

So, in the beginning, I formatted the new disk in OS X and partitioned it in two, an HFS+ partition (the normal OS X one) and an NTFS/FAT partition (whichever is available to you). Make sure to click “advanced” or “options” in the partitioning dialog in Disk Utility and select the GPT type (the one that boots Intel-based Macs). Don’t select MBR or Apple partitioning.

Write the layout to disk, and you’re done with that. Next, you can transfer the OS X partition with SuperDuper (free to clone), and you can do this while in OS X. Just launch it, select your OS X partition for the source and the HFS+ partition you created on the new disk for the destination, and you’re good to go.

This should give you a bootable OS X partition which you can use right away. You can even boot from it from USB. I suggest you install rEFIt now.

The next step is to clone the Linux partition. To do that, I used partclone. You need to boot into a LiveCD and install it on the LiveCD to use it. Once it’s installed, do something like:

\ sudo partclone -Nb -s /dev/sdXX /dev/sdXX\

Replace the XX with the device and partition. Make sure you don’t specify them in the wrong order, or you will overwrite your old partition with empty data and ruin everything, EVERYTHING!

As soon as that’s done, your Linux partition is usable, but you still need to install GRUB. Install the version you have installed to your partition to the LiveCD just in case (if you use Ubuntu Karmic Koala you need to install grub-pc, older ones need grub).

The way I have gotten grub to install is to chroot by doing:

\ sudo mount /dev/sdXX /mnt/\ sudo mount --bind /dev/ /mnt/dev/\ sudo mount --bind /proc/ /mnt/proc/\

Then, do a chroot and install grub with:

\ sudo chroot /mnt/\ grub-install\

If that doesn’t work, try:

\ grub-install --root-directory=/\

If that doesn’t work, try:

\ grub\ root (hdX,X)\ setup (hdX,X)\ quit\

If you can’t boot to Linux after this, try installing it on the MBR instead of the partition with setup (hdX). rEFIt should recognise it and boot.

I didn’t clone my Windows partition, but if you want to you can do it with partimage by specifying the correct partitions to clone. Make sure to do this before installing GRUB so GRUB recognises it and gives you the option to boot from there as well.

Hopefully this has helped!