Comment créer un installateur de clé USB pour Microsoft Windows 10


Nous voulons préparer une clé USB de boot pour installer Microsoft Windows 10 sur un ordinateur portable Dell.

Télécharger une image disque Windows 10

Vous pouvez télécharger le fichier ISO sur le site web de Microsoft Windows 10 en français ici : https://www.microsoft.com/software-download/windows10

Le fichier s’appelle : Win10_20H2_v2_French_x64.iso

Nous allons devoir copier ces fichiers d’installation sur une clé USB et rendre la clé bootable. Certains fichiers dépassent 4GB et ne peuvent pas être copiés sur une partition FAT32, nous allons devoir préparer une partition NTFS.

WoeUSB, le préparateur de média d’installation USB

WoeUSB est un préparateur de média d’installation USB pour Microsoft Windows USB. WoeUSB s’exécute sur les systèmes GNU+Linux WoeUSB est un fork du projet Congelli501’s WinUSB.

Vous pouvez retrouver la documentation de WoeUSB ici : https://github.com/WoeUSB/WoeUSB-ng

WoeUSB supporte :

  • Boot Legacy PC ou UEFI
  • Partitions FAT32 ou NTFS
  • L’utilisation de disque physique d’installation ou d’image disque comme source.

J’utilise un système Linux Fedora 31, vous pouvez prendre tout système récent de type Fedora pour appliquer cette procédure :

[moore@linux ~]$ cat /etc/redhat-release 
Fedora release 31 (Thirty One)

Nous commençons par installer WoeUSB :

[moore@linux ~]$ sudo dnf install WoeUSB -y
Last metadata expiration check: 0:05:46 ago on Mon 21 Dec 2020 09:38:42 PM CET.
Dependencies resolved.
===========================================================================================================================================================================================================================================================================
 Package                                                           Architecture                                                 Version                                                                Repository                                                     Size
===========================================================================================================================================================================================================================================================================
Installing:
 WoeUSB                                                            x86_64                                                       3.3.1-2.fc31                                                           updates                                                       294 k
Installing dependencies:
 wxBase3                                                           x86_64                                                       3.0.4-10.fc31                                                          fedora                                                        1.2 M
 wxGTK3                                                            x86_64                                                       3.0.4-10.fc31                                                          fedora                                                        5.0 M
 wxGTK3-i18n                                                       noarch                                                       3.0.4-10.fc31                                                          fedora                                                        528 k

Transaction Summary
===========================================================================================================================================================================================================================================================================
Install  4 Packages

Total download size: 7.0 M
Installed size: 28 M
Downloading Packages:
(1/4): WoeUSB-3.3.1-2.fc31.x86_64.rpm                                                                                                                                                                                                      715 kB/s | 294 kB     00:00    
(2/4): wxBase3-3.0.4-10.fc31.x86_64.rpm                                                                                                                                                                                                    1.7 MB/s | 1.2 MB     00:00    
(3/4): wxGTK3-3.0.4-10.fc31.x86_64.rpm                                                                                                                                                                                                     6.4 MB/s | 5.0 MB     00:00    
(4/4): wxGTK3-i18n-3.0.4-10.fc31.noarch.rpm                                                                                                                                                                                                1.4 MB/s | 528 kB     00:00    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                      6.6 MB/s | 7.0 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                                                   1/1 
  Installing       : wxBase3-3.0.4-10.fc31.x86_64                                                                                                                                                                                                                      1/4 
  Installing       : wxGTK3-i18n-3.0.4-10.fc31.noarch                                                                                                                                                                                                                  2/4 
  Installing       : wxGTK3-3.0.4-10.fc31.x86_64                                                                                                                                                                                                                       3/4 
  Installing       : WoeUSB-3.3.1-2.fc31.x86_64                                                                                                                                                                                                                        4/4 
  Running scriptlet: WoeUSB-3.3.1-2.fc31.x86_64                                                                                                                                                                                                                        4/4 
  Verifying        : WoeUSB-3.3.1-2.fc31.x86_64                                                                                                                                                                                                                        1/4 
  Verifying        : wxBase3-3.0.4-10.fc31.x86_64                                                                                                                                                                                                                      2/4 
  Verifying        : wxGTK3-3.0.4-10.fc31.x86_64                                                                                                                                                                                                                       3/4 
  Verifying        : wxGTK3-i18n-3.0.4-10.fc31.noarch                                                                                                                                                                                                                  4/4 

Installed:
  WoeUSB-3.3.1-2.fc31.x86_64                                      wxBase3-3.0.4-10.fc31.x86_64                                      wxGTK3-3.0.4-10.fc31.x86_64                                      wxGTK3-i18n-3.0.4-10.fc31.noarch                                     

Complete!

Collecter les informations sur la clé USB

Nous allons utiliser une clé USB SanDisk Extreme PRO USB 3.1 128GB.

La clé USB SanDisk Extreme PRO 3.1 est ma clé USB préférée avec une vitesse de lecture de 420MB/s. Vous allez pouvoir grandement réduire le temps d’installation en utilisant une clé performante :

SanDisk Extreme PRO USB 3.1 128GB
SanDisk Extreme PRO USB 3.1 128GB
Type Spécifications
Capacité 128 GB
Vitesse de lecture Jusqu’à 420MB/s
Vitesse d’écriture Jusqu’à 380MB/s
Génération USB 3.1 (Gen 1)

Branchez votre clé USB

Vous pouvez rechercher le périphérique de stockage SanDisk (ou une autre marque de clé USB) :

[moore@linux ~]$ lsusb | grep -i extreme
Bus 003 Device 005: ID 0781:5588 SanDisk Corp. USB Extreme Pro

Vous pouvez trouver le device associé à votre clé USB, ici c’est “/dev/sdc” :

[moore@linux ~]$ sudo fdisk -l | grep -B1 "Extreme"
Disk /dev/sdc: 119.26 GiB, 128043712512 bytes, 250085376 sectors
Disk model: Extreme Pro 

Création de la clé USB bootable Windows 10

La préparation de la clé se réalise en une seule simple commande woeusb.

!!!!!!! Attention si vous vous trompez dans le disque de destination vous pouvez effacer votre système Linux, ici nous avons validé que notre clé utilise le device “/dev/sdc”, vous devez trouver le bon device associé à votre clé USB.

Préparez le media d’installation avec woeusb :

[moore@linux ~]$ sudo woeusb --tgt-fs NTFS --device Win10_20H2_v2_French_x64.iso /dev/sdc
WoeUSB v3.3.1
==============================
Mounting source filesystem...
Wiping all existing partition table and filesystem signatures in /dev/sdc...
/dev/sdc: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 8 bytes were erased at offset 0x74ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success
Ensure that /dev/sdc is really wiped...
Creating new partition table on /dev/sdc...
Creating target partition...
Making system realize that partition table has changed...
Wait 3 seconds for block device nodes to populate...
Failed to set locale, using default 'C'.
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
--2020-12-21 21:45:57--  https://github.com/pbatard/rufus/raw/master/res/uefi/uefi-ntfs.img
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/pbatard/rufus/master/res/uefi/uefi-ntfs.img [following]
--2020-12-21 21:45:58--  https://raw.githubusercontent.com/pbatard/rufus/master/res/uefi/uefi-ntfs.img
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.16.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.16.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 524288 (512K) [application/octet-stream]
Saving to: '/tmp/WoeUSB.HwzDXj.tempdir/uefi-ntfs.img'

uefi-ntfs.img                                                      100%[===============================================================================================================================================================>] 512.00K  --.-KB/s    in 0.1s    

2020-12-21 21:45:58 (3.72 MB/s) - '/tmp/WoeUSB.HwzDXj.tempdir/uefi-ntfs.img' saved [524288/524288]

1024+0 records in
1024+0 records out
524288 bytes (524 kB, 512 KiB) copied, 0.108486 s, 4.8 MB/s
Mounting target filesystem...
Applying workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
Copying files from source media...
Installing GRUB bootloader for legacy PC booting support...
Installing for i386-pc platform.
Installation finished. No error reported.
Installing custom GRUB config for legacy PC booting...
Resetting workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
/usr/bin/woeusb: line 1683: echo: write error: Invalid argument
Warning!: command "echo 0 > /proc/sys/vm/dirty_background_bytes" - returned code  $?
/usr/bin/woeusb: line 1684: echo: write error: Invalid argument
Warning: command "echo 0 > /proc/sys/vm/dirty_bytes" - returned code  $?
Unmounting and removing "/media/woeusb_source_1608583553_2002"...
Unmounting and removing "/media/woeusb_target_1608583553_2002"...
You may now safely detach the target device
Done :)
The target device should be bootable now

La clé USB dispose maintenant de deux partitions /dev/sdc1 et /dev/sdc2 :

[moore@linux ~]$ df -h | grep /dev/sdc
/dev/sdc2       494K  480K   14K  98% /run/media/moore/UEFI_NTFS
/dev/sdc1        30G  6.0G   24G  21% /run/media/moore/Windows USB

Nous pouvons lister les fichiers de la partition UEFI :

[moore@linux ~]$ tree /run/media/moore/UEFI_NTFS
/run/media/moore/UEFI_NTFS
|-- EFI
|   |-- Boot
|   |   |-- bootaa64.efi
|   |   |-- bootarm.efi
|   |   |-- bootia32.efi
|   |   `-- bootx64.efi
|   `-- Rufus
|       |-- exfat_aa64.efi
|       |-- exfat_arm.efi
|       |-- exfat_ia32.efi
|       |-- exfat_x64.efi
|       |-- ntfs_aa64.efi
|       |-- ntfs_arm.efi
|       |-- ntfs_ia32.efi
|       `-- ntfs_x64.efi
|-- readme.txt
`-- System\ Volume\ Information
    |-- IndexerVolumeGuid
    `-- WPSettings.dat

4 directories, 15 files

Nous avons 1183 fichiers d’installation préparés :

[moore@linux ~]$ find /run/media/moore/Windows\ USB -type f | wc -l
1183

Nous pouvons rechercher les fichiers les plus volumineux :

[moore@linux ~]$ find "/run/media/moore/Windows USB" -xdev -type f -size +500M -print0 | xargs -0 ls -lh  | sort -k5,5 -h -r
-rwxrwxrwx. 1 moore moore 5.1G Dec 21 21:49 /run/media/moore/Windows USB/sources/install.wim
-rwxrwxrwx. 1 moore moore 589M Dec 21 21:46 /run/media/moore/Windows USB/sources/boot.wim

Le fichier qui nous a obligé à créer une partition NTFS supportant les fichiers de plus de 4GB est le fichier install.wim qui a une poids de 5.1GB.

C’est tout, votre clé est prête.

Installez Windows

Maintenant nous allons installer le PC Windows.

Branchez votre clé USB

Sur certains ordinateurs portables, tous les ports USB ne peuvent pas supporter le boot USB, vous devez consulter la documentation de votre PC pour déterminer le port à utiliser.

Commencez par brancher la clé USB préparée avec les fichiers d’installation de Windows :

SanDisk Extreme PRO USB 3.1 128GB with Dell PC
SanDisk Extreme PRO USB 3.1 128GB with Dell PC

Forcez le démarrage sur la clé USB

Selon votre marque de PC, vous allez devoir utiliser différente touche de fonction (F2, F10, F12, …).

Pour notre ordinateur portable Dell, nous allons lancé un “One-shot BIOS boot menu” en appuyant pendant le démarrage du PC sur la touche F12 :

Comment créer un installateur de clé USB pour Microsoft Windows 10
Comment créer un installateur de clé USB pour Microsoft Windows 10

Nous pouvons sélectionne l’option “USB Storage Device”.

Démarrage

Le démarrage commence sur le media USB :

Comment créer un installateur de clé USB pour Microsoft Windows 10
Comment créer un installateur de clé USB pour Microsoft Windows 10

Début de l’installation

Selon la le fichier ISO téléchargé vous allez avoir la langue associée.

Ici nous avons le menu d’installation en français :

Comment créer un installateur de clé USB pour Microsoft Windows 10
Comment créer un installateur de clé USB pour Microsoft Windows 10

Succès l’installation a pu être réalisée grâce à WoeUSB.


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

EN | FR | ES

Recherche