Botspot / wor-flasher

Legal utility that runs on RPiOS to flash another SD card with Windows 10/11
625 stars 76 forks source link

Defined size for winpart partition is too small #161

Closed commandcontrolQ closed 2 months ago

commandcontrolQ commented 4 months ago

When using the wor-flasher script to setup a device, you can choose to setup the device to install Windows to another drive or itself (if the drive is larger than 16GB in size).

This choice (as stored in the CAN_INSTALL_ON_SAME_DRIVE variable) actually changes how the script partitions the disk: In my case, when the variable is set to 0 (i.e. Windows will install to another drive), the script should create a 1GB and a 6GB partition to hold the WinPE environment and the installation files respectively

However, the script contains a typo on line 1067 that (instead of creating a 6GB partition) creates a 5GB partition.

This is an issue because the install.wim file in newer versions of Windows are larger than 5GB, meaning that the script will fail because there is not enough space.

This can be fixed by changing the line to the following: sudo parted -s "$DEVICE" mkpart primary 1000MB 7000MB ....

[!NOTE] This might cause errors with USB drives <= 7GB: a solution to this would be to reject disks smaller than 8GB.