Friday, December 20, 2013

On the Mac : Bootcamp, Thunderbolt and SSDs

I'm going to side track and talk a little bit about my experience trying to bootcamp my MacBook Air (mid-2011). Now, I'm sure everybody with a MBA that sports either 64GB or 128GB of internal storage will be able to attest that we are always doing some house keeping to prevent our apps from overwhelming the puny storage. I am no different, especially when I also need a Windows environment to get some of my work done.

In short, I'm ill equipped to run a VM using the internal disk. Fusion wants 20GB (which I think is reasonable for a Windows 7 Setup) and that will leave me with even less storage to deal with. The options I have is either run the VM off a USB stick (which I eventually did and will be a story for another day), or run the VM off the Thunderbolt port, which I did as well, but it's a little clumsy and not exactly very portable.

But what if I want to 'boot camp' and play some Windows-only games? The storage consideration alone will be daunting as there's really no way both partitions can fit into the internal 128GB SSD. Not for me at least. And so I have a thought, to simply put the Windows partition on its own disk and run it off the Thunderbolt port!

First, let's talk a little about the hardware I actually use. I opted for an SSD instead of a traditional spinning disk for obvious reason. In my case, I picked Intel 530 Series 240GB 2.5-Inch Internal Solid State Drive (Reseller Kit) SSDSC2BW240A4K5.

Now, I need some kind of a disk enclosure or an adaptor which can convert the Thunderbolt port to a SATA port. Seagate has exactly this contraption, Seagate Backup Plus Portable Thunderbolt Adapter (STAE128). This adaptor is actually designed for the Seagate Backup Plus Portable series of external disk drives. This family of external drives (sans the newer 2TB versions) come with a detachable USB3 dongle, which you can remove and expose the naked SATA connector on the disk itself. You then plug this into the adaptor and it will then becomes a Thunderbolt portable external disk. Neat! And since the connector on the adaptor is a standard SATA connector, you can plug any standard SATA 2.5" disks to it and turn it into a Thunderbolt portable external disk.

There is one caveat. The adaptor itself does not provide 12V power and as a result, it is unable to power certain drives, notably the Seagate Constellation.2 1 TB 7200RPM SATA 6Gb/s 64MB Cache 2.5-Inch Internal Bare Drive ST91000640NS. This guy requires both 5V and 12V rails to be available and will not work with the adaptor.

So now I have these, how do I put Windows on it? We're going to make use of a lesser known technique in the consumer world to install Windows : Windows Automated Installation Kit. Windows AIK tool is a free download from Microsoft, you can get it here. In reality, you only need 'imagex.exe' from the whole bundle so you probably can find just the binary alone by searching the web. In addition to Windows AIK, you'll also need Apple's Bootcamp drivers. It's easy to get the drivers, all you need to do is just run Bootcamp Assistant and it will download the correct drivers for your Mac. Put these drivers onto a thumb drive or something. Lastly, you'll obviously need the Windows installer itself. It can be a physical disc or an ISO image.

Next, you'll need a Windows environment to prepare the drive. It can be a physical desktop/laptop or a simple Windows VM. I'm going to assume you have access to all the components on the same desktop/laptop/VM -
  • Target disk drive you're putting Windows on
  • imagex.exe
  • Windows installer disc or ISO
Step #1. Wipe the drive and create a primary 350MB partition. Format it with FAT32 and make it Active. Assign a drive letter to it, let's call it 'B' (for Boot).

Step #2. Create a second partition consisting of the rest of the drive. Format it with NTFS. Assign a drive letter to it, let's call it 'W' (for Windows).

Step #3. Determine the INDEX number of the desired Windows edition you want on the Installer disc/ISO. You need to do this because your disc/ISO may contain multiple versions of Windows, like 'Professional' or 'Enterprise' etc. To do this, you need 'imagex.exe'. Assuming your disc/ISO is mounted on drive I:, the command to do this is
<PATH to IMAGEX.EXE>\imagex.exe /info I:\wim\install.wim
It will list out all the available editions you have on your current disc/ISO. The output is quite lengthy but otherwise very self-explanatory. Let's assume the edition you want is located at INDEX 0.

Step #4. Deploy Windows. The command to do this is

<PATH to IMAGEX.EXE>\imagex.exe /apply I:\wim\install.wim 0 W:


This will take some time so you have to wait patiently for it to complete.

Step #5. Install the boot sector.

W:\windows\system32\bcdboot W:\windows /f ALL /s B:
Once you reached here, you're done with the disk. Shutdown your Mac. Stick the disk onto the Seagate adaptor and plug the adaptor into the Thunderbolt port of your Mac. Remove ALL USB devices from your Mac now. USB connected drives will prevent your Mac from booting up from the Thunderbolt disk correctly. Check that you have nothing on your USB ports and also no SD cards in the SD slot (if you have one).

Boot your Mac and hold onto the 'Option' key. You know this will lead you to the Boot Drives selection screen. You should see a disk named 'Windows' along with your usual Mac boot disk and also the Recovery partition. Use your arrow keys to select 'Windows' and hit 'Return'. If you have done everything correctly as listed, your Windows partition will boot and installation starts. Just follow the on-screen instructions. It should be no different from a normal installation procedure.

At this point, Windows might reboot a few times during the course of installation. You have to remember to do the hold 'Option' key dance and select 'Windows' on the selection screen. After the installation completes, login and run 'setup.exe' from the Bootcamp Drivers thumb drive as Administrator. Follow instructions to complete the installation.

You should now have a fully bootable and working copy of Windows on the disk. Note that this procedure also works on a USB adaptor as well.

Something to take note -
  • If your installer is 64-bit, then you need 64-bit versions of everything, including BCDBOOT, Bootcamp drivers etc.
  • Make sure you don't have any USB devices attached when booting. Otherwise, it will not boot correctly.
Since this procedure works also for external USB disk, you can also use any of these types of disk. The BUFFALO MiniStation 1 TB Thunderbolt / USB 3.0 Portable Hard Drive with Thunderbolt Cable - HD-PA1.0TU3works pretty well. It comes with both USB3 and Thunderbolt connector. However, it is a spinning disk inside. If you must have an SSD, then using the Seagate Backup Plus Portable Thunderbolt Adapter (STAE128)might still be the best bet.

No comments:

Post a Comment