If you're creating a custom disk layout like this, it's best to avoid Unattended disk partitioning because WinPE Setup makes a number of presumptions which won't necessarily be what you want.
Setup picks the lowest numbered disk (ranked by disk controller priority) where it can find [for UEFI systems]:
- a partition marked as EFI
- a partition marked as MSR
- a partition marked as NTFS (with no special attribute tags), or unassigned free space 54 GB or larger (for Windows)
When no Recovery partition exists, Windows skips over creating a Recovery volume.
Unattended partitioning follows
zero logic other than what's explicitly provided in the disk layout:
- Follows the Disk ID without regards to checking if that's actually the same device you think it might be (wrong numbering, or not having the correct disk recognized because of driver issues).
- Wipes the pre-existing disk layout if you selected that option.
- Creates whatever partitions are enumerated, without regards to pre-existing partitions if you didn't use wipe disk.
- Installs Windows to the first available NTFS volume of the right size (minimum 54 GB), unless you specified a <InstallTo> Disk/Partition value.
For that reason, I wouldn't try Unattended automation in this case unless you're very confident and have your data backed up.
Experts who want this level of control should bypass WinPE Setup, and instead manually deploy their image.
1. Add the required disk controller drivers to both boot.wim & install.wim images.
2. Boot from WinPE (without using autounattend.xml), and pause at the first screen. Open a CMD shell with
Shift-F10.
3. Manually perform any
diskpart steps yourself. I presume when you're copying over the previous disk to the new SSD, the old EFI & MSR volumes will be transferred over. If not, recreate them yourself.
4. Format a new NTFS volume and temporarily assign it a drive letter in diskpart:
Code:
list volume
select volume [n]
assign letter=W
5. Extract the install image to the target volume:
Code:
DISM /Apply-Image /ImageFile:D:\sources\install.wim /Index:1 /ApplyDir:W:\
6. Run
bcdboot to make this volume valid for boot selection.
Code:
W:\Windows\System32\bcdboot W:\Windows
7. Reboot the system manually, w/o finishing Setup.