Migrating Hard Drives on a Mac with RecoveryHD, Filevault and Bootcamp

Please read the follow up post to this post after reading this one. Windows didn’t like the move, but the rest of my plan worked fine.
I’m shortly going to be replacing my spinning-rust hard-drive with a shiny new (fast) SSD. One hitch is that my SSD is smaller than my existing drive – but I’ve checked the sizes, and everything should fit.
Due to my slight obsession with ensuring nothing goes wrong, I’ve been googling how best to make sure nothing goes wrong. Although I’ve found various guides on how to Migrate OSX and Windows and how to recreate RecoveryHD (The accepted answer doesn’t actually answer the question, so I’ve linked directly to the answer), I haven’t found an all encompassing guide yet. So I’m going to write one as a plan.
Some software (CarbonCopyCloner and WinClone) seem to be the standard software most tutorials use for cloning. CCC claims it can handle Recovery Partitions now, but no tutorial I’ve found mentions using that feature, or deals with migrating (as opposed to recreating) RecoveryHD.
Naturally, as a plan, this is untested. And knowing my luck I may have forgotten some crucial step, so if you follow this guide then it’s at your own risk.
For reference: I’m using an Early 2011 MacBook Pro. Mountain Lion (10.8.3) with FileVault 2, Windows 7.
Things I still should check up on:
Enabling Filevault 2 or creating Bootcamp first? – I don’t imagine it will make any difference, but as both mess with the Partition layout (as I understand it), I want to be sure.
Update: As far as I can tell it, it makes no difference. All the problem reports I’ve seen refer to cases when FV was enabled with Bootcamp, but only the 3.2 Bootcamp drivers were installed – this would cause a BSoD in Windows as it choked on trying to mount an encrypted HFS+ partition. So I’ll stick with the order outlined below.
Step 0: Disable FileVault 2, to eliminate any risks it may create. Do this first as it can take a while, and it doesn’t actually make a difference for a while.
As I’m going to create a new recovery partition, I don’t want to restore an encrypted OSX, only for the recovery partition (which is used to bootup and ask for the password) to not have the method to unlock it.
UPDATE: Apparently OSX doesn’t like resizing CoreStorage (i.e. FileVault 2 volumes), so this is necessary for me as I need to resize my OSX partition.
Step 1: Check you have a full backup of everything.
My plan here is to use my normal Time Machine backup for OSX, and take an image of my Windows Partition, which shall be stored on my NAS.
Step 2: Download the Mountain Lion installer from the App Store. Use Lion DiskMaker to create a bootable USB with the Mountain Lion installer. Altnertively: Extract the installer and create a bootable USB by hand :/
(My Mac doesn’t have Internet Recovery independent from the Recovery Partition IIRC, so I need to have the OS installer around for when I switch the discs.
Step 3: Delete the ML Installer you downloaded – it’s 4GB!
Step 4: Check Filevault has fully decrypted. Double check. Triple check.
Step 5: Shrink your partitions on your source disc so they’ll fit on your new disc. For me it will mostly be OSX I shrink as that’s where a lot of my free space is…..
Step 6: Take a new TM backup and a new Windows Image. – The new Windows Image is especially if you touched the sizes of their partitions – as you want to ensure your images will fit onto the new disc.
Step 6: Swap the discs. Keep your old disc disconnected.
Step 7: Use the USB installer you created to install Mountain Lion. You should now have a recovery partition on your new disc. Along with a virgin OSX install. Install all OSX updates available – incase they update the Recovery Partition (you don’t want an out of date recovery partition).
Step 8: Clone your Mac Partition across. You should now have a working OSX install with all your OSX data.
Step 9: Disconnect your old disc. You’re done with that now (in theory).
Step 10: USe Bootcamp Assistant to create the Windows Partition. Don’t install it.
Step 11: Use the image of your Windows partition 1 to put Windows back onto that partition.
Step 12: Boot into windows and deal with anything that throws your way if Windows decides it’s not license or whatever. And we now have a working Windows install
Step 13: Re-enable Filevault 2 in OSX. Let it encrypt itself in the background.
Step 14: Take a new set of backups.
Step 15: Dance a merry jig.
Step 16: Realise you’ve forgotten something crucial and give up on this and head back to your old disc with your tail between your legs.

Apologies for the Downtime

Just incase anyone legitimate was trying to reach this site recently, apologies.
I took down my blog after I was alerted to someone using my server to host a phishing website. Currently I believe the initial attack vector was WordPress – I recently had a glut of fake user signups. Needless to say, I won’t be letting it get out of date again.
Due to this, and the fact that Uni has now started again, my post on Stripe’s CTF and my solutions is delayed, possibly indefinitely. The irony of writing up a post on how to exploit/avoid security vulnerabilites after this happend to my site is not lost on me.
However, if Intelligent Agents is as good it seemed today, you could expect a post shortly on the similarities between the social/communication issues Agents face, and those faced by nodes in Freenet and relays in Tor.


Found out about Cryptosphere today.
It seems similar to Freenet, but from my understanding should be less attractive to the people who share almost-universally-illegal-material. This is because it doesn’t hold anonymity as the first pillar above all else, and also by discouraging short-term idenities through what seems to be a web-of-trust style system.
That said it still provides Plausible Deniability around whether any requestor has access to the unencrypted contents or was merely caching a random file; but in cases where mere possesion is a crime it may not be sufficient, as the law undoubtably has huge databases of known illegal material, and can trivially compute the hashes for them, thus showing whether the node contains the file.
Hopefully this will help to make it be more successful than Freenet, but the fact it could still hold unsavoury data means it probably won’t, which will again limit its size. This is ultimately the problem of all similar networks – Freenet, Tor, and i2p; the small size of the networks immediately pinpoints you as suspicious.

Why I switched to a Mac

The short answer is that there isn’t a short answer. It was a combination of several things I think.
My old laptop was in a very, very bad condition – i had missing screws, a missing cover bit thingy, it had scratches and one of the screws holding the screen in had gone missing. Add to that that the screen itself was failing most times when I started it up. Thirdly, the battery was drained – and I’d already bought one replacement from Dell at an extortionat price. Finally, it was still running Windows Vista and was just plain slow. I mean really slow.
Now, that explains why I bought a new laptop, but not why a Mac, let me get to that now.
I guess, if I had to pick one defining reason, it would be the aesthetics – of both the machine and the User Interface of the OS. This is, quite possibly the area that Apple do best. Also, the fact that Windows is officially supported on them now by Apple alleviated my fears of not being able to play some of my favourite games. Anyone who is not a tech geek, please feel free to skip to the next paragraph, now. The final major reason, is the fact that it is based on Unix, so you get the power, and customalisability of Unix under there. Especially important for my CS degree.
Welcome back, non-techie readers. One of the biggest things I’ve found since switching is the battery life. The advertised 7 hours is actually accurate – even with web browsing or text editing. I’m even considering not taking my power adapter to Uni, and I never shut my Mac down – sleep makes almost no difference to your power. Another thing I’ve found is the screen. I went with the anti-glare option, and it’s jsut so vivid and clear. It certainly seems ‘whiter’ and brighter generally than any of the non-Mac laptops my friends have.
Now, I’m not going to pretend it’s perfect. I still don’t like…. errr. Now I come to think about it, I can’t think of any major thing I miss from Windows, and Windows laptops generally. I’ll be sure to update if I think of something.
Finally, I will admit, yes I have installed Windows 7 on here as well – but it’s exclusively for playing Windows only games at the moment.