Instead backing up the raw disk with dd, you can create a USB installer in OS X. The trick is to download Yosemite from the App Store and prevent it from running. There are plenty of articles describing the process. If you also have data to preserve, connect an external disk and do a Time Machine backup. If anything goes wrong, you can reinstall OS X from scratch and restore your data (and even restrict the size of your OS X partition so you don't have to resize it again).