Installing Windows 8 or Windows 7 on a Mac without Superdrive with VirtualBox

Version française ici

It works GREAT with Windows 8!

 
 
October 29th, 2012 update: Works perfectly with Windows 8 RTM (the one sold)
 

July 25th, 2012 update: Works with Mountain Lion
 

June 6th, 2012 update: After 4 months and hundreds of testers, I can tell that everyone that has tried this tutorial, has been successful in installing Windows! Because this method just works!
 
 
Hello everyone,

I’ve been trying to install Windows 7 on my MacBook Pro that doesn’t have a superdrive and it’s been quite painful. But I’ve found a solution that works perfectly. I’ve written this post in French, but it seems legit to have a world wide audience for that solution that I hope will work for your too!

I’ve tried several tutorials on the web, but none has really worked. To do this one, I’ve been inspired by this article, which is really great… but didn’t do the trick to me!

If you are lucky, try Part 2 directly, it might work for you if you have a 2011 MacBook Pro. For others, start at Part 1!

What you’ll need:

The 3 big steps:

  • Create a « Generalized » Windows 7 installation
  • Create a BootCamp partition
  • Clone the « generalized » Windows 7 image onto the BootCamp partition

Let’s Go !
 

Part 1 – Create a « Generalized » Windows 7 image

First, we are going to create a Windows 7 installation that will not take into account the hardware on which it’s running. Indeed, when Windows is installing, it takes into account the hardware it’s running on to configure only the drivers it needs. But in this first step we’re installing it on a Virtual Machine, which is not a real PC, so we need to say to Windows: Ok, next time you boot, check the hardware and install any necessary driver.

Step 1: Install Windows 7 on the Virtual Machine

  1. Download and install VirtualBox
  2. Add a new virtual machine and name it Win7 (easier when prompting commands later), add how much RAM you want
  3. Add a VDI hard drive of type and then, choose dynamically allocated that uses 10 Gb (you’ll need less, but it is to be sure, and you can choose more, but it’s going to take longer in the last part of this tutorial)
  4. Launch the virtual machine and choose the ISO image of Windows 7 installer
  5. It’ll take two reboots to finish the installation

First step is done. Let’s start tricking Microsoft!
 

Step 2: Delete the « System reserved » Partition

Truth is, Windows has created two partitions when installing, to prepare the use of the built-in encryption technology called BitLocker. And this little partition is considered as the principal, which means Windows will eventually boot on this one and not the one we’d like to. This is why we need to delete this partition.

Just go and use this great article from Terabyteunlimited to do the trick. You’ll only need part 1 and 3 and to reboot the system between these two steps.

Step 3 : Generalize the Windows 7 installation with sysprep

I must say this step was the most painful to me, because I didn’t have any tutorial and needed to find why things didn’t work by myself !
What we’ll basically do here is create an installation of Windows that is independent of the hardware it’s booting on with the help of sysprep.

    1. Reboot your virtual machine (we’re never too safe…)
    2. Don’t ask me why BUT we need to stop the Windows Media Player Service
      1. Click on Start
      2. in the search box, type « cmd »
      3. On the application that has been found, right click and select « Use as an Administrator »
      4. Type this command « net stop WMPNetworkSvc » without the quotes
    3. Go to the directory C:\Windows\System32\sysprep
    4. In this directory, create a file and name it « unattend.xml« , without the quotes. If you don’t have the rights to create a file, then, go to the desktop and then copy it when the next steps are done.
    5. Be careful, when creating the file, it will automatically add the .txt extension. To change this, when on a folder window, hit « alt ». The menu shall appear. Under View, select « Folder Options ». In the window that appears, select the « View » tab and uncheck « Hide extension for known file types ». Then, you’ll see the .txt extension on the unattend.xml file. Erase the .txt extension and click Yes when prompted to change the file extension
    6. Copy-Paste this into the file:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
     <settings pass="generalize">
          <component name="Microsoft-Windows-Security-Licensing-SLC"
processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipRearm>1</SkipRearm>
          </component>
      </settings>
</unattend>
  1. Save it (and copy it in the sysprep folder)
  2. Double click on sysprep app and select these options: (complementary info).
    1. In the « System Cleanup Action list » list, select « System Out-of-Box Experience (OOBE)« 
    2. Select the « Generalise » check box
    3. In the « Shutdown Options » list, select « Shutdown« 
    4. Click OK

 
If your virtual machine stops, you can be proud of yourself because you’ve done the most difficult part! Congrats!

If you get the painful error : « A fatal error occurred while trying to Sysprep the machine.« , you can try what a commentor has tried: run this command in cmd (without the quotes): « sysprep.exe /generalize /oobe /shutdown /unattend:unattend.xml »

If you still have the error, it might be because your Windows Media Player Service has been reactivated, try to turn it off once again. Also, adding a comment made by Julian:

If anyone is getting the « A fatal error occurred while trying to Sysprep the machine » for Part 1 Step 3 on the unattend.xml file. I suggest you type out the xml file instead of copying and pasting. This fixed the issue in my case. There may be some hidden characters or incorrect format. Also try saving the file as UTF-8 instead of ANSI.

Otherwise, well, you’re screwed… But you can be helped by opening the log file that can be found in that folder: C:\Windows\System32\sysprep\Panther. At the end of the log, you’ll find the error ID. Google might help you with it!

Well done to the ones that have gone so far, the end is near !
 

Part 2 – Create a BootCamp partition

I know that I’m giving the hardest solution here, and I hope it’ll go painlessly for you, but I had to do all these steps. If you can create the Bootcamp partition without these steps, you can go to the Third Part (the easiest!).

EDIT Thanks to Andrea Comment
You can easily bypass this Part 2 by installing Daemon Tools Lite For Mac. After downloading and installing this app, just mount the Windows ISO image in Daemon Tools. This will trick Bootcamp thinking you have a real Windows DVD.

Step 1: Create the BootCamp partition

Well, I must say that I’ve done that a long time ago, so I can’t recall everything, but these are the main steps.
As explained before, I don’t have a super drive. So I need to make the BootCamp Assistant think I’m a Mac with rights to boot on a USB drive. To do that :

  1. Go to Applications/Utilities
  2. Right click on Boot Camp Assistant and select « Show Package Contents« 
  3. Open the Contents folder
  4. Open Info.plist with TextMate or TextEdit. If you don’t have permission to do that, copy the file on your desktop. Once you’ve made the changes, copy back this file in the folder.
  5. Click on the top left Apple menu of your Mac, go to About this Mac. In the opened window, click « More Info« 
  6. In Hardware:
    1. Find Model Identifier (Mine is MacBookPro6,2)
    2. Find Boot Rom Version (Mine is MBP61.0057.B0C)
  7. In the previously opened Info.plist, copy paste the previous info on top of the list in the correct field:
      1. In « <key>DARequiredROMVersions</key>« , add a string that matches your Boot ROM Version. For instance, mine was:
    <key>DARequiredROMVersions</key>
       <array>
          <string>MBP61.0057.B0C</string>
          <string>IM41.0055.B08</string>
      1. Go to « <key>USBBootSupportedModels</key>« , and add a string that matches your model. It’s a bit tricky here, but you need to find the right model. For instance, I have a MacBookPro6,2, so I had to write: MBP61. If you have a MacBook Air3,2, you would have: MBA31 etc… You can try several times if it doesn’t work. Here is what I added:
    <key>USBBootSupportedModels</key>
       <array>
           <string>MBP61</string>
           <string>IM130</string>
  8. Once the info.plist has been saved (and copied where it was before), double click on Boot Camp Assistant, the greyed check box « Create a booting USB drive » shouldn’t be anymore.
  9. You should also check « download the last drivers« , you’ll need it later
  10. At last, create your BootCamp partition

What happened next was that the Mac rebooted, couldn’t boot on the USB drive, and couldn’t find how to boot on the Mac partition neither. Don’t panic, just press the hard button and reboot it again, plugging out your USB drive.
Edit Thanks to wilson :

At the end of Part 2, where we finish installing Boot Camp partition and rebooting i kept getting the « No boot partition found blank screen ».

Easy fix, just reboot again and hold down the « Alt/option » key so you can select your main MAC OS and reboot that way.

Congrats, you’re really near to have your Windows! Great job.
 

Part 3 – Clone the Virtual Machine Hard Drive onto BootCamp

This is the easiest part and the one that works every time!
In a few minutes, you’ll have your Windows 7!

Step 1: Prepare the Virtual Machine Hard Drive

    1. Download and open VirtualBox
    2. Go to the File menu and click on « Media Manager« 
    3. Click to select the partition that matches your virtual machine
    4. Click on Copy, a wizard should appear
    5. Choose Fixed size. (Really important)
    6. And then rename the file as: Win7_copy. (will be easier when prompting in Terminal)
    7. Once the copy is done, open Terminal (Applications/Utilities), go to the folder where your previously copied file is (to do that use the command « cd path/to/the/file ». VERR_FILE_NOT_FOUND error? read the first few comments below) and paste this command: (this command will create a raw file that can be understood by the Mac as a partition. You’ll be asked for your password)
    sudo VBoxManage internalcommands converttoraw Win7_copy.vdi win7.raw
  1. Once the copy is done, you’ll need to mount this partition. Enter this command:
sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage win7.raw

 
If everything went well, you should have a disk image called « Untitled » on the desktop. And the end is pretty near!
Last step!
 

Step 2 – Clone the virtual machine onto the Boot Camp partition

This is the last step.

  1. Download and launch WinClone
  2. On the « Image » Tab:
    1. Source: Choose the partition « Untitled » that matches your virtual machine (should be disk2 or disk3)
    2. Click on Image and choose a folder to copy the files
  3. Once the copy is done, click on the Restore Tab:
    1. Restore Image: Choose the image that has just been done
    2. Destination: « BOOTCAMP »
  4. Click on Restore

DONE !

If you have a 2009 iMac, please read David comment !

Once the copy is done, reboot your Mac and maintain pressure on the alt button just before the « Dong » sound. You should have your Windows partition. Windows will then initialize with two restarts. You’ll need your CD key again.
You have your Windows !

I hope that I’m clear enough, and I can help some of you in the comment section. Hope you’ll make it !

Cheers.


327 réflexions au sujet de « Installing Windows 8 or Windows 7 on a Mac without Superdrive with VirtualBox »

  1. Great guide! but i got a problem, after restoring and rebooting i choose windows to boot up but there’s only a blinking cursor ( _ ).

    Windows wont boot up.

  2. ok so here’s some things i had to find out by myself:
    I had to install sysprep on my win7 64bit virtual machine.
    Control panel > programs and features > add or remove windows features > here i turned everything on.
    After that I was able to edit sysprep no problem.

    i got an 0xce0000225
    I googled and it said to change the chip set from Piix3 to ich9 and enable eoac

    that fixed that issue.

    Even though I wanted to backup this virtual machine onto a second hard drive on my macbook pro it wasn’t showing up on my boot camp assistant so i had to partition the main hard drive and restore the vistual machine onto the partition.

    make sure you select replace BCD in winclone!!!

    Steve

  3. Hi, Thanks for this great guide. I am almost done after hours of working on this. My problem is when I try to run

    sudo VBoxManage internalcommands converttoraw Win7_copy.vdi win7.raw

    I get this error,

    VBoxManage: error: Cannot copy image data: VERR_DEV_IO_ERROR

    I dont know what to do to fix it?

    Any help would be greatly appreciated. Thanks again from the US (New York City)

  4. Liam, try recreating the vdi copy. Double check to ensure you are following all of the instructions, especially the one instructing you to make the copy a fixed size vdi.

    Make sure the VM is offline.

    I had some issues with this phase but when I retried the steps for the second time it worked.

  5. Thanks Tim,

    I can’t get into the win_7 copy file in terminal, last time I moved the file elsewhere.

    Liam-Stabenos-MacBook-Pro:~ liamstabeno$ cd /VirtualBox VMs
    -bash: cd: /VirtualBox: No such file or directory
    Liam-Stabenos-MacBook-Pro:~ liamstabeno$ ls
    Applications Downloads Movies Public YOU .txt
    Desktop Dropbox Music Sites
    Documents Library Pictures VirtualBox VMs
    Liam-Stabenos-MacBook-Pro:~ liamstabeno$ cd VirtualBox VMs
    -bash: cd: VirtualBox: No such file or directory
    Liam-Stabenos-MacBook-Pro:~ liamstabeno$

    I dont understand why terminal wont open this file, it sees it when I write and can see it but cant open it?

    I’m lost..

  6. Hey guys still getting this error, with Tim’s recomendation of recreating the copy of the file.

    sudo VBoxManage internalcommands converttoraw Win7_copy.vdi win7.raw

    I get this error,

    VBoxManage: error: Cannot copy image data: VERR_DEV_IO_ERROR

    I dont know what to do to fix it?

    Anyone else figure out why its giving me this error, I’m SOOOOO close. Thanks

  7. Liam, that is really odd. I trust you’ve searched the interwebs to try and understand what might cause it? Have you tried doing a disk repair?

    Which version of VirtualBox are you running? I had success with VirtualBox 4.2.2… so you might try upgrading VirtualBox.

    Are you out of disk space? Do you have an external hard-drive to which you can copy the raw file?

    Just some ideas, probably not super helpful.

  8. Thanks Tim,

    I did all those things, and finally got the windows partition viewable in the start up menu, on the last step now!

    Now I reboot (alt) and start with the win7 partiton, it just freezes there. uh sooooo close I can taste the microsoft.

  9. Thank you so, so much.

    I have the first Uni Macbook Pro, got the best one I could. Applecare ran out, superdrive broke. Who needs a drive anymore, its all digital. This is the only way to get Windows on your machine. Took 2 days, and multiple snags, but its worth it.

    One thing I noticed that you might want to change is this.

    In Step 3, I think you should first create unattend.xml
    Then you should disable WMP and run the program instantly after.

    Thanks to Tim for the help.

    This Works stay vigilant. Patience.

    Model Name: MacBook Pro
    Model Identifier: MacBookPro5,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.8 GHz
    Number of Processors: 1
    Total Number of Cores: 2
    L2 Cache: 6 MB
    Memory: 4 GB
    Bus Speed: 1.07 GHz
    Boot ROM Version: MBP51.007E.B06

  10. Works perfectly as described. After many hours of trying other methods that claim they work… The 2011 MBP never recognizes bootable USB devices.

    This method took a little time to go through all the instructions. But I can vouch for it.

    March 2011 MBP81.0047.B27, With 10.7.5 OSX Lion

  11. Thx for tutorial, but it isn’t worked on my mac.
    I followed all steps, but i still can’t see « Create a booting USB drive ».
    Can you help me please?
    I can send you teamviewer ip or something by e-mail.

  12. Thanks for tutorial, but it isn’t worked on my mac.
    I followed all steps, but i still can’t see « Create a booting USB drive ».
    Can you help me please?
    I can send you teamviewer ip or something by e-mail.

  13. Forget the previous question, i’ve a new problem now:)
    Bootcamp created a bootable disk, but when it restarts itself, i get the « no bootable… » message as you said.
    I tried alt key when startup, but if i choose main os, it goes to macosx, if i choose efi boot, i can see the installing screen, but i can’t choose the hdd, it says you can’t select disk 2 part 1…
    How can i solve it? Any ideas?

  14. There is an easier way to make the partition. That is
    with daemon tools lite for mac, load from and usb drive, and make bootcamp think u inserted the cd, and then it will create the partition, and fail after reboot.

    thnx by the guide, im actually trying it

  15. @Alessandro, sure you can translate it in Italian! The more people can find a solution, the better it is!
    Please just insert a link to the original post I made.
    Thanks and glad that it worked for you too!

  16. Hi, tks for the guide, work good with win8 in a Imac early 2009.

    I remove my superdrive and put a SSD, but after the tutorial, the Win work in a low speed (SSD benchmarks). The SSD works in IDE and to have a good speed must work in AHCI.

    There is any way to change from IDE to AHCI?

    Tks.

  17. Hi !
    I’m unable to remove the 100 mb partition. Due to that I’m getting the following message:

    VBoxManage: error: No file format specified and autodetect failed – please specify format: VERR_FILE_NOT_FOUND

    Please advise.

    Regards,
    Chaitanya

  18. Erm! Too soon…
    I’m unable to make an image of the mounted untitled disk.
    Save MBR failed message I’m getting.

    Any one with any insights please help me 🙂
    I have been at this for 48 hours now.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *