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. Hi, thanks a lot. The only tutorial so far that a tech-noob like me could understand. Thanks!
    I have a question thought. I don’t get the part where you can skip « Part 2 » and mount the iso file with Daemon instead.

    So how I understand it is like this:
    Step 1: make an iso of your Windows 7 DVD with Deamon Tools Lite (Can’t with my version of mac…? So had to do it with Disk Utility)
    Step 2: mount the iso file with DTL, so

    So I did that, but what to do with it next and how does it replace step 2 exactly? Where does the iso return into the picture?

    Thanks!
    Jeronimo

  2. Ok I just got it working!

    My starting point was a bit different, ran into some problems:

    1. Words referred to as ISO and IMAGE:
    I had an original Windows 7 dvd and just installed Windows 7 directly onto Virtual Box. Took me a while to figure out I didn’t need Deamon Tools Lite (and Part 2 of this post!!). Because the original DVD is my iso file, after installation on the Virtual Box I didn’t need the DVD anymore. (Which I thought I would actually.)
    2. I didn’t get the « cd path/to/the/file » to work. Didn’t try really hard, but I just put the right path before the filename and extention, in my case:
    « sudo VBoxManage internalcommands converttoraw /Users/Username/Desktop/Win7_copy.vdi /Users/Username/Desktop/win7.raw »
    a. Took me a while to figure out how to find the right path… Just go to your file hit cmd + I and there you go.
    b. When I pasted the sudo command into Terminal, it asked for my password. But when I typed it in, I didn’t see any tokens. But after a lil search on Google, it seems normal. Just type and hit enter. Et voila.

    Thanks again, it really helped me!

    Jeroen

  3. Just wanted to tell you that you’re absolutely awesome. These steps were very easy to follow and this allowed me to do exactly what I wanted. Thank you so much!!!

  4. So my windows 8 install is working great but there’s just one minor question I have.

    Normally when you restart windows 8 while holding shift you get presented with the options seen here http://www.howtogeek.com/wp-content/uploads/2012/10/05_selecting_startup_settings.png

    I get these options but if I click any of them Windows crashes with an error code and needs to be restarted. I was guessing that maybe this has to do with deleting that one Windows partition, but I’m honestly clueless. Does anyone have any ideas?

  5. I’m so close thanks to this amasing guide! I’ve got everything done without error, but, when I reboot at the very end after restoring to bootcamp I just get the grey windows logo and don’t get anything after. What step could I have missed?

    I blanked out the system reserved partition but didn’t re-use the space – should I have?

  6. I require help please, on the Part 3
    in Winclone the error occurs and I cannot make an image of the mounted untitled disk.
    Save MBR failed message!
    Please help

  7. I have followed all the steps but when I get to the cloning the virtual drive in terminal using the « sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage win7.raw » command, nothing happens.

    I put in my password and it comes up saying it is converting but it has just stayed like that for 20+ minutes now.

    How long does it normally take and will the .raw file be the same as the original?

    Thanks

    Ben

  8. Dear sir,

    Thanks for your guide. I think it will help me to install window 8.

    Only a one question, the scipt your posted is for window 32bit x86 version, can it same to my 64bit IA64 window8 version?

    Need your help ,please.

    Kenxing

  9. Thank you very much for these instructions. I’m on the final step, and everything is working as expected.

    Just a small addendum: If, when you start WinClone, you can’t see your « Untitled » partition, it might be you’re using a 3rd-party NTFS driver as default, if you type « mount » on the Terminal and see something like this:
    /dev/disk2s1 on /Volumes/Untitled (fuse4x, local, nodev, nosuid, synchronous, noowners, noatime)

    (The most important part here is the « fuse4x » information)

    The solution is to revert it back to Apple standard driver. If you’re using Homebrew’s NTFS-3g driver, just unmount the partition and remount it with /sbin/mount_ntfs.orig

  10. Hi Hugues, after completing all the step and rebooting my system which is MacBookPro4,1. The windows partition just comes up with a blank screen with a blinking cursor and nothing happens. Please help. I am trying to install Windows 8 on MAC, using a MAC OS X LION

  11. Huguesval,
    I can`t describe how grateful I am for this post. I had done a SSD upgrade when I firs bought my macbook pro 2011 and took out the optical drive. Ever since I have been trying to install windows 7 on my mac. I have spent hundreds of hours tried every tutorial on web. None of them worked for me. But finally thanks to your post here I managed to install and it works perfectly.
    Note: On part 3 where I tried cd path/to/the/file did not work for me. What I did here was to find win7_copy.vdi and move it to desktop. Then I typed in terminal cd Desktop and it worked.

  12. Hi I have a question regarding Step 1.

    I seem to be stuck when VirtualBox VM asks me where to install my Windows and the installation location dialog box returns a blank list.

    Has any one come across this before?

    I’ve created the dynamically allocated 10GB VDI drive as per your instructions.

  13. I finally managed it to install Windows 7 on a Bootcamp Partition! But I had one Problem, which took me weeks to figure it out.

    If you have the black screen with the blinking cursor on your Macbook Pro, then the solution will be to take your ssd drive out of the superdrive replacement adapter to the original hdd place.
    WINDOWS 7 WILL ONLY BOOT FROM THE FIRST SATA PORT!
    I don’t know why, but it is like that.. I tried tens of tutorials to get windows 7 on my macbook pro late 2009, but it didn’t work… until I got that idea to swich the hdd and ssd.

  14. One warning for Mountain Lion users: the free (old) version of Winclone does not work on ML. It was a shock to the system to see that I’d need to shell out $20 just to make this work…

  15. Unbelievable ~ I am just amazed how many smart people are out there… worked like a charm! (took me a couple of times ~ tried short cutting it and it did not work ~ followed the instruction « verbatim » and Voilà ~ Win 7 64bit Ultimate running through Bootcamp…

    2008 MacBookPro 17″
    OSX 10.8.2
    Broken SuperDrive (damn you Apple for making go through this)

    The « Daemon Tools Lite For Mac » trick worked for me.

    Thank you all!

  16. Hi, I followed this tutorial but im at the part now to clone the virtual machine onto the boot camp partition but when I want to create the image in Winclone im getting the error: Save MBR failed, exit code 255. Please please I really need this fixed.

    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *1.0 TB disk0
    1: EFI 209.7 MB disk0s1
    2: Microsoft Basic Data Stuff 1000.0 GB disk0s2
    /dev/disk1
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *256.1 GB disk1
    1: EFI 209.7 MB disk1s1
    2: Apple_HFS Macintosh SSD 135.0 GB disk1s2
    3: Apple_Boot Recovery HD 650.0 MB disk1s3
    4: Microsoft Basic Data BOOTCAMP 120.2 GB disk1s4

  17. Dude thank you so mcuh THANK YOU… I spent the last 36 hours trying to install windows 64bit on my computer cuz I replaced my optical drive for a second hard drive and have my ssd in my hdd spot…

    Couple tips for those with a Macbook Pro 2011 model (early). If you get the fatal system error I had to reclose the windows media services… Also if you are installing a windows 7 64bit change the processorarchitecture to x64 instead of 86, (the unattend.xml file)

    Everything else worked great, finally have windows again, now to install my old programs… Thanks again mate!!

  18. Nick- I had the same problem just close winclone and open it up again, then save it… It worked the second time, also I had to change the name of it when saving from win7_64bit to just win7, keep the name short and simple…

  19. Btw the person Chaitanya (couple posts above) who also had this got this fixed when using gparted. But I dont know what he or she did to get rid of this nasty error. Anyone knows how I can contact him/her?

    I contacted the people at Winclone, maybe they can help me

  20. I’m stuck on part 1 step 3 where I have to sysprep. I’ve tried everything: type the file myself, turn WMCPlayer off with the command but still no luck… Any suggestions??

  21. I also want to ask how long did it take to restore the winclone onto the bootcamp partition because it seems to take an eternity as the status bar is not moving and it says « restoring data »

  22. Hi Guys,
    I made the RAW file but whenI run the command
    sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage win7.raw

    I get this message:

    hdiutil: attach failed – no mountable file systems

    Any solutions?

    Merci!

  23. Wouldn’t it make more sense to first create the bootcamp partition via Bootcamp utility, then create a VM with raw access to the drive? Seems like it’d save you some trouble.

    Create bootcamp partition
    Set up raw access for Virtual Box
    Install Windows 7 to bootcamp partition inside Virtual Box
    Reboot and pick Windows 7 at the EFI screen

Laisser un commentaire

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