About

Installing a Windows partition is usually performed using Bootcamp on OSX. However, for some Macs (especially, the iMac), attempting to install Windows from an external drive - either USB or DVD, will always fail with the error:

No Bootable Device -- Insert boot disk and press any key

and alas pressing any key will not get you much further. As such, we present a different method, that can be used to install Windows using an external USB drive or DVD since it seems quite common that SuperDrives die rather fast (and usually the first hardware to go) in Mac machines.

In other cases, having a Windows partition around is not that bad, especially if you consider software development or gaming. The nice thing about the setup we present is that we make some use of the bootcamp assistant which will then allow you to delete the entire Windows partition and resize back OSX without worries.

Requirements

  • Make sure to disable system integrity protection under OSX before proceeding with the tutorial.
  • A Windows install DVD or USB (we used Windows 7 since Windows 10 seems to have some driver issues under Bootcamp).
  • An USB stick that will hold all the necessary drivers to get you going once Windows is installed for good.
  • VMWare Fusion (trial version will suffice) - or any other virtualisation software that supports writing to block devices.
  • Some software capable of reading and writing NTFS drives under OSX (for example, Tuxera NTFS).

The Procedure Briefly

The procedure is quite involved and can be summarised in the following steps:

  • first, we launch Bootcamp and let it partition the drive - you can optionally have an USB stick handy and tell Bootcamp to install the drivers to the USB stick as part of the procedure.
  • next we create a new VMWare image and make it such that it uses the Windows partition created by Bootcamp.
  • we install Windows using VMWare onto the Bootcamp partition whilst still being in OSX.
  • after the Windows install is complete, we delete all the visible files from the Bootcamp partition - although this seems counter-intuitive since we already installed Windows, it is necessary because Windows will refuse to boot into our new install.
  • we then install rEFit (or, the more updated rEFind) as the main bootloader.
  • next, we reboot OSX and pick to boot into the Bootcamp partition.
  • since we have previously deleted all the visible files from the Bootcamp partition, Windows will not be able to boot but we will reach a Windows repair screen.
  • from the Windows repair screen, we launch a command-prompt, navigate to the Windows DVD or USB stick and run setup.exe which will succeed this time.

so you know what you are getting into.

Partitioning the Drive using Bootcamp

To partition the drive, launch Bootcamp Setup Assistant, select to create an USB stick (can be an USB drive) with drivers and then select your Mac drive and drag the slider to partition the drive. Make sure to create that USB drive that Bootcamp wants to create because it contains all the necessary drivers that you will use in your Windows partition. Thankfully, OSX supports both live-resize (hrink and expand) such that you will not lose any data during the partitioning process. It is also worth mentioning that you can change your mind later and using the Bootcamp Setup Assistant you will be able to delete the newly created partition and resize your OSX install back.

Create Virtual Machine using Bootcamp Partition

So far, VMWare (the trial version will suffice) seems to be the only one capable of accessing a raw drive and using it for a virtual machine. In order to do so, install VMWare and then create a new container (virtual machine) and save it to the desktop. You can give it any name, as long as you are consistent because we will trash it very soon. Do not boot the virtual machine but rather exit VMWare in order to run the rest of the setup procedure. For this example, we assume that you named the virtual machine Windows 7 and that the container has been created on the Desktop.

Now we will have to add a drive manually to the virtual machine that will point to the Bootcamp partition. In order to do so, we need to use Terminal and change directory inside the container that we created on the desktop. For example, start Terminal, and issue:

cd Desktop/Windows\ 7.vmwarevm/

If you issue ls you will see that in that folder we have some files with the extension vmdk (the virtual drive that VMWare created). We do not care about the vmdk drives because we will create a new one. In order to use the Bootcamp partition as a raw drive, issue the command:

/Applications/VMware\ Fusion.app/Contents/Library/vmware-rawdiskCreator create /dev/disk<X> <Y> bootcamp_raw lsilogic

where <X> is the drive number and <Y> is the partition number. You can find out the <X> and <Y> by opening Disk Utility and selecting Get Info… on the Bootcamp partition. For the Bootcamp partition, you will see something like:

disk0s4

which means that <X> in the previous command is 0 and <Y> is 4.

When the above command succeeds, you can issue another ls and you should see:

bootcamp_raw.vmdk
bootcamp_raw-pt.vmdk

which means that you are on track.

The next step is to edit the vmx file in the same directory (in our example, this should be called Windows 7.vmx) in order to substitute the virtual drive that VMWare created by the drive we have just created with the previous command. Open the Windows 7.vmx file in an editor and set:

scsi0.virtualDev = "lsilogic"

and set:

scsi0:0.fileName = "bootcamp_raw.vmdk"

Now we can open VMWare, open our container and configure the drives to use the disk drive that we just created instead of the virtual drive as well as set the boot device to the Windows 7 ISO or USB stick.

After that, we boot VMWare and perform a complete vanilla install onto the Bootcamp partition. Do not bother too much with setting it up correctly or even entering a serial because after the install is done, you have to shut down the virtual machine.

Crippling the Windows Install

Since Windows contains protections such that you cannot simply migrate a hard drive to a different computer and boot it up, we need to cripple the Windows install we just did in VMWare just enough so we can boot from it and start a recovery procedure where we will install Windows again.

Now that the virtual machine is shut down, you will most likely see the BOOTCAMP partition in Finder. Using Tuxera NTFS, the drive should be mounted and you can now see roughly this set of folders:

PerfLogs
Program Files
Program Files (x86)
Users
Windows

Now, select all these folders and delete them. Be careful to only delete these folders if they exist and nothing else - such as the boot loader since we will need that for the recovery procedure. In fact, it may be enough to delete just the Windows folder because we are going to format this partition for the final install.

Install the Boot Loader

Now we need to install rEFind. In order to do that, we download the rEFind ISO, unzip it and double-click the ISO so it becomes a mounted drive. We then issue as root:

cd /Volumes/rEFInd_0.10.0/

Note that the version number and hence the folder name may vary if you downloaded a newer version.

To install rEFind, we simply issue as root:

./refind-install

which will show some output and that will be it for this command.

Performing the Real Install

Finally, we can now perform the real install. Make sure that you have either your USB stick or your Windows DVD hooked-up to the computer and reboot OSX. When OSX reboots, you will see an unfamiliar screen where you will be able to select which drive to boot from (this screen can be later removed). We are now going to boot into the crippled Bootcamp drive - so use the cursor keys to navigate to the Bootcamp drive and press enter.

Since we crippled Windows, you will now be met by Windows recovery that will want to repair the drive. You can skip the repair and on the next screen, you will see some text along the lines Advanced recovery options. Clicking that text will ask you for a keymap and then on the next screen you will see some options. The very last option at the bottom will be to launch a command prompt. So, open the command prompt by clicking the last option.

A command prompt will appear and from here you can issue, for example:

cd D:

where D: is the drive letter of your Windows USB or DVD. You obviously will not know the drive letter but you can try the letters D, F, G - it should be one of those. You can issue dir when you change directory to check whether you are indeed on the Windows install medium.

Once you change directory, by issuing dir you will see the files on the Windows installation medium. Amongst other files, there should be a setup.exe. So, issue:

setup.exe

and the Windows installation will start again. You can select the Bootcamp partition to install to - make sure to format it first to get rid of the mess we made previously. This is the final installation so you can take your time and set it up as you like it.

Finishing Touches

Once booted into Windows, the first thing you should probably do is to insert the USB stick where Bootcamp installed the drivers and install those drivers. After that you should have a reasonable screen resolution and an Internet connection so you can use Windows update to get the rest of things that you want to set up.

If you are installing Windows 7 you may notice that Windows Update does not work properly. If that is your case, search the Internet for the Internet Explorer update and install that first. This will install a few other updates and Windows Update should work after that.


osx/install_windows_partition.txt · Last modified: 2022/04/19 08:28 by 127.0.0.1

Wizardry and Steamworks

© 2025 Wizardry and Steamworks

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.