Posté il y a 3 années dans Applications, Non classé | 109 126 visites | 230 Commentaires »
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!
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:
- A ISO image of Windows 7
- Daemon Tools
- Some free time ! It’ll take around 3h to succeed
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
- Download and install VirtualBox
- Add a new virtual machine and name it Win7 (easier when prompting commands later), add how much RAM you want
- 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)
- Launch the virtual machine and choose the ISO image of Windows 7 installer
- 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.
- Reboot your virtual machine (we’re never too safe…)
- Don’t ask me why BUT we need to stop the Windows Media Player Service
- Click on Start
- in the search box, type « cmd »
- On the application that has been found, right click and select « Use as an Administrator »
- Type this command « net stop WMPNetworkSvc » without the quotes
- Go to the directory C:\Windows\System32\sysprep
- 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.
- 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
- 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>
- Save it (and copy it in the sysprep folder)
- Double click on sysprep app and select these options: (complementary info).
- In the « System Cleanup Action list » list, select « System Out-of-Box Experience (OOBE)«
- Select the « Generalise » check box
- In the »Shutdown Options » list, select « Shutdown«
- 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 :
- Go to Applications/Utilities
- Right click on Boot Camp Assistant and select »Show Package Contents«
- Open the Contents folder
- 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.
- Click on the top left Apple menu of your Mac, go to
About this Mac. In the opened window, click « More Info«
- In Hardware:
- Find Model Identifier (Mine is MacBookPro6,2)
- Find Boot Rom Version (Mine is MBP61.0057.B0C)
- In the previously opened Info.plist, copy paste the previous info on top of the list in the correct field:
- 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>
- 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>
- 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.
- You should also check « download the last drivers« , you’ll need it later
- 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
- Download and open VirtualBox
- Go to the File menu and click on « Media Manager«
- Click to select the partition that matches your virtual machine
- Click on Copy, a wizard should appear
- Choose Fixed size. (Really important)
- And then rename the file as: Win7_copy. (will be easier when prompting in Terminal)
- 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)
- Once the copy is done, you’ll need to mount this partition. Enter this command:
sudo VBoxManage internalcommands converttoraw Win7_copy.vdi win7.raw
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!
Step 2 - Clone the virtual machine onto the Boot Camp partition
This is the last step.
- Download and launch WinClone
- On the « Image » Tab:
- Source: Choose the partition « Untitled » that matches your virtual machine (should be disk2 or disk3)
- Click on Image and choose a folder to copy the files
- Once the copy is done, click on the Restore Tab:
- Restore Image: Choose the image that has just been done
- Destination: « BOOTCAMP »
- Click on Restore
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 !