Can I re-format OS X drive without removing it from my MacBook Pro? I've got a mid 2012 MacBook Pro (non-retina) with a removable HD (Machine A). I want to perform a clean install of OS X El Capitan 10.11 on the HD, for which I have an install USB stick made.

Normally to do this I would:


Remove the HD from the Machine A.
Put it in a HD enclosure.
Plug the HD enclosure into another machine (Machine B).
Run disk utility on Machine B to wipe the HD in the enclosure.
Take the HD out of the enclosure and put it back into Machine A.
Boot machine A into my installer USB and install OS X 10.11 from there.


I don't have a HD enclosure at hand and wondered if I can instead:


Turn-off machine A.
Link machine B and machine A by cable. (What cable spec?)
Run disk utility on machine B to reformat the drive on Machine A.
Perform task 6 from above.


Would that work? What cable should I use?
You don’t need to remove the HDD and no need for second Mac. 


Boot the MacBook Pro from the USB stick (that you made with OS X El Capitan 10.11)
Using Disk Utilities in the Tools menu, you can reformat the hard drive as part of the installation process. 


To boot using the USB, restart your MacBook and press and hold the Option key and Select the USB drive to boot.

Note: you are operating (using OS X) from the USB