Welcome to TechNet Blogs Sign in | Join | Help

Boot sur un VHD (Windows 7 ou Windows 2008 R2) depuis un système Vista ou Windows Server 2008

Je vais vous expliquer comment sous Windows Vista ou Windows Server 2008 utiliser cette fonctionnalité

Etape 1  : Création d'un fichier VHD de Windows 7 ou Windows Server 2008 R2

Sous Windows Server 2008 hyper-V, je crée une machine virtuelle avec un disque dynamique ou fixe par exemple de 25 Go ou plus (attention la taille à son importance car je devrai disposer de cette espace libre sur la partition qui hébergera le fichier VHD)

Une fois l'installation du système d'exploitation, je fais un sysprep de mon installation (avec le Sysprep /generalize) et j'arrete ma VM  

Etape 2 : Remplacement des fichiers Boot Manager et BCDEDIT par ceux de Seven ou 2008R2

Je remplace les fichiers BootManager (volume de démarrage\bootmgr) et bcdedit (%systemroot%\system32\bcdedit.exe) de mon installation Windows Vista ou Windows Server 2008 par ceux d'une installation Windows 7 ou Windows server 2008 R2

Cette procédure fonctionne même si le volume est bitlocké, par contre le fichier vhd ne pourra pas résider sur la partition bitlockée, il faudra donc une autre partition

Echo Setting permissions on boot files.
takeown /f %systemdrive%\bootmgr /a
takeown /f %systemroot%\system32\bcdedit.exe /a
icacls %systemdrive%\bootmgr /grant Administrators:(F)
icacls %systemroot%\system32\bcdedit.exe /grant Administrators:(F)

Echo Backing up original boot files.
Xcopy /h /r /y %systemdrive%\bootmgr c:\backup\Bootfiles\
Xcopy /h /r /y %systemroot%\System32\bcdedit.exe c:\backup\Bootfiles\

Echo Installling Win7/2008R2 boot files.
xcopy /h /r /y .\bootmgr %systemdrive%\
xcopy /h /r /y .\bcdedit.exe %systemroot%\System32

Etape 3 : Création de l'entrée de démarrage correspondant au disque VHD

bcdedit /copy {current} /d “Boot_From_VHD”

Copier le CSLID affiché…

bcdedit /set {CLSID} device vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} osdevice vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} detecthal on

Vous pouvez remplacer [C:]\vhdname.vhd avec le chemin et le nom de votre VHD.

C'est fini

PS : Attention si la partition du système d'origine est bitlockée, il faudra démarrer avec la clé de réparation, désactiver puis réactiver bitlocker sur la partition via le panneau de configuration)

Published Tuesday, January 13, 2009 10:08 PM by fabricem

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker