Une méthode pour installer Windows XP sur une clé USB

  1. Introduction
  2. Windows XP ne peut pas, par défaut, être installé sur une clé USB. Bien que la solution puisse s’avérer pratique à bien des égards, notamment dans un cas de dépannage, Microsoft n’a pas inclus cette possibilité. Certains se sont penchés sur la question et ont trouvé un moyen de modifier le système de manière à rendre la chose possible.

    Pré-requis :

    • Un système Windows installé pour effectuer les manipulations préalables
    • Une clé USB 2.0 ou toute autre périphérique de stockage à cette norme
    • Un CD de Windows XP (testé avec le Service Pack 3 mais le 1 et le 2 fonctionnent également)
    • Un outil d’édition des fichiers ISO
    • Le CAB SDK de Microsoft
    • Un logiciel de gravure gérant la gravure depuis un fichier ISO

    La procédure globale consiste à créer une image ISO du CD de Windows XP. Il faut ensuite extraire les fichiers de cette image pour les modifier. Après ces modifications, il faudra réintégrer les fichiers dans l’image avant de graver celle-ci sur un nouveau CD. La version modifiée permettra alors à l’installation de choisir le périphérique USB comme destination d’installation.

    Un certain nombre de fichiers est à extraire de l’image créée :

    • TXTSETUP.SIF
    • DOSNET.INF
    • USB.IN_
    • USBPORT.IN_
    • USBSTOR.IN_

    Le CAB SDK sert alors à décompacter les fichiers dont l’extension se termine par un underscore afin d’obtenir trois fichiers INF grâce à la commande carbarc x . Le reste des modifications, c’est-à-dire ce qu’il faut ajouter et/ou modifier dans ces fichiers, peut être trouvé sur cette page ou ci-dessous à la section 2 Après ces petits changements, il faudra compacter les trois fichiers INF précédents grâce à la commande « carbarc n » avant de les réintégrer dans l’image ISO initiale.

    Après gravure de cette image modifiée, vous serez donc en mesure d’installer Windows XP sur une clé USB.
    Cette méthode est extraite de l'article de Vincent Hermann

  3. Edition des fichiers sources
  4. C'est la partie principale du travail.  Pour se faire, utilisez un simple éditeur de text comme Notepad.

    2-A) TXTSETUP.SIF
    This file is loaded on the initial install step by the Windows XP CD installer. In this file, we will change the way Windows treats USB devices during system setup — the default is to only treat them as input devices during installation — we will change this to include mass storage driver support (which needs to be loaded into the installer much earlier in order to work).

    First, move the following entries from [InputDevicesSupport.Load] to the [BootBusExtenders.Load] section , as shown here

    [BootBusExtenders.Load]
    pci = pci.sys
    acpi = acpi.sys
    isapnp = isapnp.sys
    acpiec = acpiec.sys
    ohci1394 = ohci1394.sys
    usbehci = usbehci.sys
    usbohci = usbohci.sys
    usbuhci = usbuhci.sys
    usbhub = usbhub.sys
    usbstor = usbstor.sys[InputDevicesSupport.Load]
    usbehci = usbehci.sys
    usbohci = usbohci.sys
    usbuhci = usbuhci.sys
    usbhub = usbhub.sys
    usbccgp = usbccgp.sys
    hidusb = hidusb.sys
    serial = serial.sys
    serenum = serenum.sys
    usbstor = usbstor.sys

… now the same for [BootBusExtenders] and [InputDevicesSupport]

    [BootBusExtenders]
    pci = "PCI-Bustreiber",files.pci,pci
    acpi = "ACPI Plug & Play-Bustreiber",files.acpi,acpi
    isapnp = "ISA Plug & Play-Bustreiber",files.isapnp,isapnp
    acpiec = "Integrierter ACPI-Controllertreiber",files.none,acpiec
    ohci1394 = "IEEE-1394-Bus-OHCI-konformer Anschlusstreiber",files.ohci1394,ohci1394
    usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci
    usbohci = "Open Hostcontroller",files.usbohci,usbohci
    usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
    usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub
    usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor[InputDevicesSupport]
    usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci
    usbohci = "Open Hostcontroller",files.usbohci,usbohci
    usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
    usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub
    hidusb = "HID-Parser",files.hidusb,hidusb
    serial = "Treiber f�r seriellen Anschluss",files.none,serial
    serenum = "Enumerator f�r seriellen Anschluss",files.none,serenum
    usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor
    usbccgp = "USB Generic Parent Driver",files.usbccgp,usbccgp

Next, we also have to write several keys into the registry. Convieniently, the txtsetup.sif allows you to specify files that are parsed and instered into the registry at install time. Insert the following in the [HiveInfs.Fresh] section:

    [HiveInfs.Fresh]
    AddReg = hivedef.inf,AddReg
    AddReg = hivesys.inf,AddReg
    AddReg = hivesft.inf,AddReg
    AddReg = hivecls.inf,AddReg
    AddReg = hiveusd.inf,AddReg
    AddReg = dmreg.inf,DM.AddReg
    AddReg = usbboot.inf,usbservices
    and also in [SourceDisksFiles][SourceDisksFiles]
    usbboot.inf = 1,,,,,,_x,3,,3
    bootvid.dll = 1,,,,,,3_,2,0,0,,1,2
    kdcom.dll = 1,,,,,,3_,2,0,0,,1,2

Finally, save and close TXTSETUP.SIF. We are done with it.

2-B) DOSNET.INF

Now, open DOSNET.INF , and change the second [Files] section to look like this:

    [Files]
    d1,usbboot.inf
    d1,_default.pif
    d1,12520437.cpx
    d1,12520850.cpx

….

2-C) usb.inf

Change the bolded lines in the [StandardHub.AddService] and [CommonClassParent.AddService] sections:

    [StandardHub.AddService]
    DisplayName = %StandardHub.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbhub.sys
    LoadOrderGroup = Boot Bus Extender[CommonClassParent.AddService]
    DisplayName = %GenericParent.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbccgp.sys
    LoadOrderGroup = Boot Bus Extender

2-D) usbport.inf

Change the bolded lines in the [EHCI.AddService], [OHCI.AddService] , [UHCI.AddService] and [ROOTHUB.AddService] sections:

[EHCI.AddService]
DisplayName = %EHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbehci.sys
LoadOrderGroup = Boot Bus Extender
[OHCI.AddService]
DisplayName = %OHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbohci.sys
LoadOrderGroup = Boot Bus Extender
[UHCI.AddService]
DisplayName = %UHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbuhci.sys
LoadOrderGroup = Boot Bus Extender

[ROOTHUB.AddService]
DisplayName = %ROOTHUB.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender

2-E) usbstor.inf

Change / Add the bolded lines in the [USBSTOR.AddService] section

[USBSTOR.AddService]
DisplayName = %USBSTOR.SvcDesc%
ServiceType = 1
StartType = 0
Tag = 3

ErrorControl = 1
ServiceBinary = %12%\USBSTOR.SYS
LoadOrderGroup = Boot Bus Extender

2-F) new file: USBBOOT.INF

Create a new file called USBBOOT.INF in the same directory as your other changed files, and put the following content into it:

[usbservices]

HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","DisplayName",0×00000000,"USB Mass Storage Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ErrorControl",0×00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Group",0×00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ImagePath",0×00020000,"system32\DRIVERS\USBSTOR.SYS"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Start",0×00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Type",0×00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","DisplayName",0×00000000,"USB 2.0 Enhanced Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ErrorControl",0×00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Group",0×00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ImagePath",0×00020000,"system32\DRIVERS\usbehci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Start",0×00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Type",0×00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","DisplayName",0×00000000,"USB2 Enabled Hub"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ErrorControl",0×00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Group",0×00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ImagePath",0×00020000,"system32\DRIVERS\usbhub.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Start",0×00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Type",0×00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","DisplayName",0×00000000,"Microsoft USB Universal Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ErrorControl",0×00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Group",0×00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ImagePath",0×00020000,"system32\DRIVERS\usbuhci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Start",0×00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Type",0×00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","DisplayName",0×00000000,"Microsoft USB Open Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ErrorControl",0×00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Group",0×00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ImagePath",0×00020000,"system32\DRIVERS\usbohci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Start",0×00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Type",0×00010001,1

  1. 7) Repack the inf files into their original IN_ format

  1. 8) Inject the changed files into the ISO

  1. 9) Burn the ISO back to CD

  1. 10) Install Windows XP from the CD

Laisser un commentaire

Made with WordPress and the Semiologic CMS | Design by Mesoconcepts