The current headache with KB5034441 requiring a larger Recovery partition (700MB-1GB), highlights a big problem with Unattended disk layouts.
Back before more recent W10 releases,
Recovery partition was mostly static in size and didn't expect to grow. When you assign a disk layout, you need to know the target disk's exact length, or simply allow
Windows partition to extend (grow until the end of disk). The problem is <Extend> only works if there's no other partitions behind it.
<Extend> doesn't imply "extend until reaching the next assigned partition", it's "extend until the end of the disk".
For this reason, previous Windows releases ordered the disk layout:
System | MSR | Recovery | Windows -> end of disk |
Because you can assign a fixed size for Recovery, and extend Windows.
Due to multiple WinRE BitLocker security holes, MS is now updating the Recovery partition as part of the Monthly Update. This requires having extra room for staging the updates inside Recovery. Moving Recovery before Windows prevents the OS from resizing the Recovery partition, because it now needs a repartitioning tool to move existing data.
Today the current policy is to assign Recovery after Windows, so it's possible to shrink Windows and allow Recovery to grow:
System | MSR | Windows <- shrink | Recovery <- grow |
Using this layout, you need to know the exact size for Windows partition. So how does WinPE Setup handle this situation on a blank disk? Setup extends Windows to everything after MSR, but automatically shrinks the partition, and creates Recovery in the unassigned space. But there is no shrink parameter in Unattended layouts, just <Extend>.
This was a long explanation. But what are my options?
1. Continue to use NTLite's default disk template, with Recovery placed before Windows. But you need to assign a healthy size (1GB?) to allow for growth in the patched WinRE.
2. Don't use disk layout in Unattended mode, and manually allow WinPE Setup to create a "correct" new disk layout.
- Boot WinPE, and stop at the disk layout screen.
- Enter Shift-F10 to open a
CMD window.
- Run
diskpart, select the correct disk (always confirm it's the right disk) and clean it.
Code:
> diskpart
select disk 0
clean
convert gpt [required if using UEFI boot mode]
exit
exit
- Return to Setup, and refresh the disk. Setup will detect it's a blank disk, and ask if you want to create a New layout.
- Accept, and Setup will continue with the rest of your Unattended setup.