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

Posted on février 3rd, 2012 in Non classé | 19 Comments »

Version française ici

It works with Windows 8 Consumer Preview!
You just need to do the following to configure the VirtualBox.

 
 

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 itself, 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 whatever driver is necessary.

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 use 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 Anomynous has found on Google. Try running this command in cmd (without the quotes): « sysprep.exe /generalize /oobe /shutdown /unattend:unattend.xml »

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!).

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 ») and paste this command: (this command wil create a raw file that can be understood by the Mac as a partition)
    VBoxManage internalcommands converttoraw Win7_copy.vdi win7.raw
  1. Once the copy is done, you’ll need to mount this partition. Enter this command:
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 !

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.

Installer Windows 8 ou Windows 7 sur Mac sans lecteur DVD avec VirtualBox

Posted on janvier 23rd, 2012 in Applications, Non classé | 16 Comments »

English Version here

Fonctionne avec Windows 8 Consumer Preview !
Il suffit de configurer différemment la machine virtuelle VirtualBox.

 
 
Bonjour à tous,

Je viens de passer ma journée à installer Windows 7 SP1 sur mon MacBook Pro qui n’a plus de superdrive pour des raisons flashy ! J’ai essayé toutes les solutions proposées sur le net, aucune n’a vraiment fonctionné, donc je vous livre la mienne. Assez longue, mais assez sûre de fonctionner. Enfin, elle a fonctionné pour moi !

Je suis parti de cet article qui détaille une méthode presque bonne.

Ce dont vous aurez besoin :

  • Une clé USB de 4 Go
  • Une image ISO de Windows 7 (Google pourra vous aider)
  • VirtualBox 4.1.8
  • WinClone 2.3.3
  • Beaucoup de temps libre (comptez 2h30…)

Les grandes étapes de la création :

  • Créer une installation de Windows 7 généralisée
  • Créer une partition BootCamp
  • Copier l’image de Win7 sur la partition BootCamp

Alors, c’est parti !

 

Partie 1 – Créer une image Windows 7 généralisée

Dans cette première partie, nous allons créer une installation de Windows 7 qui sera lançable depuis n’importe quelle configuration. En effet, Windows s’adapte au matériel sur lequel il tourne, or nous l’installons sur une machine virtuelle et non un vrai PC, il faut donc que l’installation se détache du matériel sur lequel elle tourne.

Etape 1 : Installer Windows 7 la machine virtuelle

  1. Télécharger et installer VirtualBox
  2. Créer une machine virtuelle dans VirtualBox et l’appeler Win7 allouer autant de mémoire vive qu’il vous chante
  3. Créer un disque dur en format VDI et surtout dynamiquement alloué de 10 Go (vous aurez besoin de moins, mais c’est pour être sûr !)
  4. Lancer la machine virtuelle et choisir l’image ISO du disque Windows 7
  5. L’installation se déroule normalement (2 redémarrages)

La première étape est finie ! Bien jouée, on passe aux choses sérieuses

 

Etape 2 : Supprimer la « Partition Réservée au Système »

Afin de préparer l’utilisation de BitLocker, Windows a en fait créé deux partitions dans la machine virtuelle. Il faut absolument supprimer cette partition, car elle est considérée comme principale et donc c’est sur celle-ci que Windows bootera.

Pour effacer cette  partition, suivre le guide sur Terabyteunlimited qui est particulièrement bien fait (c’est très court malgré les apparences !) Attention, ne faire que la partie 1 et 3. Et redémarrez entre 1 et 3.

Pour les personnes qui ne parlent pas anglais… bah je suis désolé ! J’ai pas trouvé de ressource en français qui soient aussi bien faite. Mais Google sera votre ami !

Etape 3 : Généraliser l’installation de Windows 7 avec sysprep

C’est cette étape qui m’a demandé le plus de mal… J’espère qu’elle se fera sans douleur avec mes recommandations. Il s’agit en fait de créer une installation de Windows 7 indépendante du matériel sur lequel il tourne grâce à sysprep

  1. Faire un reboot du la machine virtuelle (on est jamais trop sûr)
  2. Ne me demandez pas pourquoi, mais il faut éteindre le Service Windows Media Player :
    1. Cliquer sur Démarrer
    2. Dans le champ recherche taper : « cmd », sans les guillemets
    3. Sur l’application apparue plus haut : lancer cmd en mode Administrateur (clic doit sur le nom, Lancer avec les droits Administrateur)
    4. Entrer cette commande : « net stop WMPNetworkSvc » sans les guillemets
  3. Aller dans le répertoire : C:\Windows\System32\sysprep
  4. Dans ce dossier, créer un fichier nommé « unattend.xml », sans les guillemets. Si l’accès est refusé, alors créer le fichier sur le bureau et le copier une fois les infos entrées
  5. Copier-coller ceci dedans :
  6. <?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>
  7. Enregistrer le fichier
  8. Lancer sysprep et entrez les informations comme suit : (toutes les infos ici)
    1. Dans « System Cleanup Action list » choisir «  System Out-of-Box Experience (OOBE) »
    2. Cocher la case « Generalise »
    3. Dans le menu « Shutdown Options » choisir « Shutdown »
    4. Cliquer sur OK

 

Si votre machine virtuelle s’éteint, vous pouvez être fier de vous ! Vous avez fait le principal et le plus dur ! BRAVO !

Si vous avez l’erreur : « erreur grave lors de sysprep », je suis désolé car cet outil a l’air très capricieux et il est très difficile de répondre à toutes les erreurs. En revanche, il suffit d’aller dans le dossier C:\Windows\System32\sysprep\Panther et de regarder le fichier de log : à la fin du fichier sera écrite l’erreur.

Bravo à ceux arrivé jusque là, la fin n’est plus très loin !

 

Partie 2 : Créer la partition BootCamp

J’ai bien conscience que je donne la méthode la plus complexe ici, j’ai dû passer par toutes ces étapes !

Etape 1 : Créer la partition BootCamp

Malheureusement, j’ai fait ça un autre jour et je ne me souviens plus trop de comment il faut faire… Donc je vais vous donner les grandes lignes de mes problèmes.

En gros, mon MacBook Pro n’accepte pas de booter depuis une clé USB et il me faut un disque optique. Or je n’en ai pas. Donc pour me débloquer cette situation, il faut faire croire à Assistant Boot Camp que je suis un Mac autorisé à utiliser une clé USB pour booter. Pour cela :

  1. Aller dans Applications/Utilitaires
  2. Clic droit sur l’application Assistant Boot Camp : Afficher le contenu du paquet
  3. Naviguer dans Contents
  4. Ouvrir Info.plist avec TextMate ou TextEdit, si cela n’est pas possible, alors copier le fichier sur le bureau et l’ouvrir depuis le bureau puis le déplacer une fois les modifications effectuées
  5. Ouvrir l’application Information Système (dans Applications/Utilitaires)
  6. Dans matériel :
    1. Retenir l’identifiant du modèle (moi, c’est MacBookPro6,2)
    2. Retenir Version de la ROM de démarrage (moi, MBP61.0057.B0C)
  7. Dans le Info.plist ouvert précédemment, dans les attributs suivants, ajouter en premier de la liste ceux qui correspondent à votre machine :
    1. Dans « <key>DARequiredROMVersions</key> », ajouter un string qui correspond à votre ROM dans Informations Système. Exemple pour moi :
    2. <key>DARequiredROMVersions</key>
         <array>
            <string>MBP61.0057.B0C</string>
            <string>IM41.0055.B08</string>
    3. Dans « <key>USBBootSupportedModels</key> », ajouter un string qui correspond à votre modèle, en respectant la nomenclature bizarre. Pour moi, qui ai un MacBookPro6,2 j’ai dû mettre : MBP61. Si vous avez un MacBook Air3,2, il faudra mettre : MBA31 etc… c’est un peu de la bidouille, mais vous trouverez le bon avec quelques essais. Voici ce que j’ai dû ajouter :
    4. <key>USBBootSupportedModels</key>
         <array>
             <string>MBP61</string>
             <string>IM130</string>
  8. Une fois le fichier enregistré, lancer Assistant Boot Camp, la case grisée ne devrait plus l’être
  9. Cocher Télécharger les dernières versions des pilotes, et les copier sur le clé USB, ça servira beaucoup plus tard.
  10. Enfin, créer la partition BootCamp.

Le Mac va redémarrer, ne pas reconnaître la clé USB, relancer le Mac, ne pas trouver comment redémarrer. Ne pas paniquer ! Il suffit de redémarrer une nouvelle fois le Mac et tout devrait rentrer dans l’ordre !

Bravo ! Il ne reste plus grand chose à faire maintenant ! Vous êtes très avancé !

 

Partie 3 : Copier l’installation de la machine virtuelle sur la partition Boot Camp

C’est la partie la plus courte et celle qui fonctionne à tous les coups. Encore quelques minutes et vous aurez votre Windows 7 parfaitement fonctionnel !

Etape 1 : Préparer le fichier de la machine virtuelle

  1. Ouvrir VirtualBox
  2. Dans le menu Fichier, cliquer sur « Gestionnaire de médias »
  3. Sélectionner la partition qui correspond à la machine virtuelle et cliquer sur Copier
  4. Selectionner la machine virtuelle, puis choisir VDI comme type de fichier
  5. Choisir Taille fixe. C’est là que tout se joue
  6. Puis nommer le fichier Win7_copie. (ce sera plus simple lorsqu’il faudra entrer les lignes de commandes)
  7. Une fois la copie terminée, ouvrir le Terminal (Applications/Utilitaires) et coller la commande ci-dessous. Cette commande crée un fichier interprétable comme partition par Max OS X :
  8. VBoxManage internalcommands converttoraw Win7_copie.vdi win7.raw
  9. Ensuite, il faut monter cette partition. Entrer ceci dans le terminal (une fois la commande précédente terminée)
hdiutil attach -imagekey diskimage-class=CRawDiskImage win7.raw

Normalement, si tout fonctionne bien, il devrait y avoir une image disque nommée « Untitled » sur le bureau. Si vous êtes là, sachez que la galère est très prochainement finie !!

Préparez-vous pour la dernière étape !

 

Etape 2 : Cloner la machine virtuelle dans Boot Camp

C’est la dernière étape et si vous êtes arrivés jusque-là, alors rien ne peut vous arriver.

  1. Telecharger et lancer WinClone
  2. Dans l’onglet Image :
    1. Source : Sélectionner la partition « Untitled » qui correspond à la machine virtuelle (normalement disk2 ou disk3)
    2. Cliquer sur Image et sélectionner un endroit ou copier les fichiers
  3. Dans l’onglet Restore :
  4. Restore Image : Selectionner l’image créée juste au dessus
  5. Destination : « BOOTCAMP »
  6. Cliquer sur Restore

DONE !

Une fois la copie finie, redémarrer le Mac en appuyant sur la touche alt juste avant le « Dong » sonore. Normalement, la partition Windows devrait apparaître. Windows va alors s’initialiser, avec 2 redémarrages. Attention, il va vous être demandé la clé CD une nouvelle fois, il faut la noter avant de redémarrer. Vous avez maintenant votre Windows parfaitement fonctionnel !

J’espère que beaucoup arriveront au bout de leurs galères grâce à cette méthode… En tout cas, elle a marché pour moi et je la mets sur mon blog pour m’en souvenir une prochaine fois éventuelle. Pour info, j’ai refait l’intégralité de la procédure pour refaire ce tutoriel, donc cela fonctionne bien :) !

Postez vos remarques en commentaires.

Excellente journée !

[Vidéos] Windows 7 et ses parodies

Posted on novembre 8th, 2009 in lol | No Comments »

Bonjour à tous,

Je vous avais parlé des vidéos de Windows 7 dans ce post ou l’on voit cette ridicule Charline faire la promotion du logiciel.

Et bien une parodie a été faite par 7Fenetre sur YouTube :

Je dois dire qu’elle me fait vraiment marrer !

Et puis j’en profite pour en mettre une autre, réalisée par des anglais, sur le thème : j’ai changé pour un Mac, trop tard Microsoft !

J’espère qu’elle vous plaisent autant que moi !

Bonne fin de dimanche à vous !