We want to reinstall a Dell laptop with Windows 10, you need to prepare a USB Flash Drive.
You can download Windows 10 disk image (ISO File) on the Microsoft web site : https://www.microsoft.com/software-download/windows10
For US the file will be called: Win10_20H2_v2_English_x64.iso
The installation files we are copying to the Bootable USB Flash Drive are above the 4 GB file size limit of FAT32, we will use NTFS.
WoeUSB is a Microsoft Windows USB installation media preparer for GNU+Linux. WoeUSB is a fork of Congelli501’s WinUSB project.
You can review the WoeUSB documentation here: https://github.com/WoeUSB/WoeUSB-ng
WoeUSB supports:
I’m using a Fedora 31, you can use any recent Fedora based OS to apply this procedure:
[moore@linux ~]$ cat /etc/redhat-release
Fedora release 31 (Thirty One)
First, install 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!
We are using a SanDisk Extreme PRO USB 3.1 128GB.
The SanDisk Extreme PRO is my favorite USB Flash Drive. Using a device with a good performance will accelerate a lot the Windows 10 installation:
Type | Specifications |
---|---|
Capacity | 128 GB |
Read Speed | Up To 420MB/s |
Write Speed | Up To 380MB/s |
Generation | USB 3.1 (Gen 1) |
Model | SDCZ880-128G |
Authorization Number | MSIP-REM-WDT-SDCZ880 |
You can search the USB Flash Drive:
[moore@linux ~]$ lsusb | grep -i extreme
Bus 003 Device 005: ID 0781:5588 SanDisk Corp. USB Extreme Pro
Find the device of the USB Flash Drive, here it’s /dev/sdc:
[moore@linux ~]$ sudo fdisk -l | grep -B1 "Extreme"
Disk /dev/sdc: 119.26 GiB, 128043712512 bytes, 250085376 sectors
Disk model: Extreme Pro
The preparation of the USB key is done with one simple command line.
!!!!!!! Warning if you make a mistake in the destination disk you can delete your Linux system, here we have validated that our key uses the device /dev/sdc, you must find the right device associated with your USB key.
Prepare the installation media with woeusb:
[moore@linux ~]$ sudo woeusb --tgt-fs NTFS --device Win10_20H2_v2_English_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
The USB Flash Drive is prepared with two partitions:
[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
An UEFI partition is available :
[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
We have 1183 installation files:
[moore@linux ~]$ find /run/media/moore/Windows\ USB -type f | wc -l
1183
We can search the largest file in the Windows installer directory recursively :
[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
The file that forced us to create an NTFS partition supporting files larger than 4GB is the file install.wim which has a size of 5.1GB.
The drive installer for Microsoft Windows 10 is ready.
We are starting the Windows installation.
On some laptops, not all USB ports can support USB boot, you must consult your PC’s documentation to determine which port to use.
First, plug the USB media prepared with the Windows installation files:
Depending on the computer vendor, you should press a function key like F10 or F12.
For this Dell Laptop we are going the the One-shot BIOS boot menu with F12:
We can select “USB Storage Device”.
The boot is starting:
Base on the langage of your iso installation file, you can start the installation:
Success the USB key is working on this Dell laptop.