New
#970
I'm pulling my hair over making an autounattend.xml file. Tried adding one piece at a time to see where the file stops working, but cant figure out what is wrong.
The ISO I try to make a autounattended file for is server 2019 core / datacenter.
This is the current edition of the file and I've tried removing almost everything except eula and key to see If I can pass that, but no. Not sure if diskpartitioning was required so added that to see, but still boots to choosing OS and eula.
Tried adding this to autopick the correct installation index, but no goCode:<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> <InputLocale>0414:00000414</InputLocale> <SystemLocale>nb-NO</SystemLocale> <UILanguage>en-US</UILanguage> <UserLocale>en-US</UserLocale> <UILanguageFallback>en-US</UILanguageFallback> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserData> <AcceptEula>true</AcceptEula> <ProductKey> <Key></Key> </ProductKey> </UserData> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>300</Size> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>2</Order> <Size>512</Size> <Type>EFI</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>3</Order> <Size>128</Size> <Type>MSR</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>4</Order> <Extend>true</Extend> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Order>1</Order> <PartitionID>1</PartitionID> <Label>Recovery</Label> <Format>NTFS</Format> <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>2</Order> <PartitionID>2</PartitionID> <Label>System</Label> <Format>FAT32</Format> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>4</Order> <PartitionID>4</PartitionID> <Format>NTFS</Format> <Label>OSDusk</Label> <Letter>C</Letter> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> </DiskConfiguration> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>4</PartitionID> </InstallTo> </OSImage> </ImageInstall> </component> </settings> </unattend>
Code:<ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/install/index</Key> <Value>3</Value> </MetaData> </InstallFrom> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall>
Welcome to TenForums!
I do not have readily available Server 2019 in front of me, so I have not been able to test your answer file. I've also only spent mere seconds glancing at it, but already I see that you have no generic key specified so you are clearly deviating from the tutorial rather than following it to the letter. Rather than a key, you have simply left it blank like this:
<ProductKey>
<Key></Key>
</ProductKey>
My suggestion would be to follow the tutorial PRECISELY, modifying only what is needed to specify the Server 2019 edition that you want to install and use that as a starting point. Once that is working, make your modifications and test to see what works and what does not.
You have also not noted what kind of error message you are getting (if you get one) or specified precisely the nature of the failure. As usual, the more details that you can provide, the easier it would make it for us to assist.
That was a sneaky one, thanks. Tho changed it, but still no go. This is my current xml file. Now it takes ages to boot and when entering setup it will just reboot. Might be something missing?
Code:<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> <InputLocale>0414:00000414</InputLocale> <SystemLocale>nb-NO</SystemLocale> <UILanguage>en-US</UILanguage> <UserLocale>en-US</UserLocale> <UILanguageFallback>en-US</UILanguageFallback> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/install/index</Key> <Value>3</Value> </MetaData> </InstallFrom> <InstallTo> <DiskID>0</DiskID> <PartitionID>4</PartitionID> </InstallTo> </OSImage> </ImageInstall> <UserData> <AcceptEula>true</AcceptEula> </UserData> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>300</Size> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>2</Order> <Size>512</Size> <Type>EFI</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>4</Order> <Extend>true</Extend> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>3</Order> <Size>128</Size> <Type>MSR</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Order>4</Order> <PartitionID>4</PartitionID> <Format>NTFS</Format> <Label>OsDusk</Label> <Letter>C</Letter> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>2</Order> <PartitionID>2</PartitionID> <Format>FAT32</Format> <Label>System</Label> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>1</Order> <PartitionID>1</PartitionID> <Label>Recovery</Label> <Format>NTFS</Format> <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> </DiskConfiguration> </component> </settings>
As mentioned earlier, I am still not seeing the generic installation key.
A generic install key isn't required by W10/11 answer files. I image all the time w/o one. It's recommended for some specific install cases, like image selection when you don't know the index number or when using a volume key.
This disk layout is problematic because it doesn't follow the normal convention. If we follow your XML, Setup will create:
1 - Pri 300 NTFS Recovery
2 - EFI 512 FAT32 System
3 - MSR 128
4 - Pri Extend NTFS OSDusk C
The MS guidelines currently recommend (though the Recovery size of 499 is now too small for current W10):
1 - EFI 260 FAT32 System
2 - MSR 16
3 - Pri 499 NTFS Recovery
4 - Pri Extend NTFS Windows
You cannot assign Recovery to the disk's end using a disk layout, because to Extend a (Windows) partition there must be no partitions blocking its way. That's a historical limitation, so you adjust the Recovery size to around 800MB or larger.
The best way is to find someone's posted working Unattended file on GitHub, copy the <DiskConfiguration> XML block and just edit the size numbers if you don't like them. Trying to write this by hand, and especially out of sorting order leads to mistakes.
For the new problem, is the system disk a NVME or M.2 drive? Does this require a special driver integrated into both the boot and install images to work? Partitioning should only take a few seconds, unless WinPE can't really access the drive device. Boot the normal ISO without the answer file, pause and open a CMD window with shift-F10. Run diskpart and see if your drive is visible and responds to partitioning commands.
Ah I see. I was just following the setup we currently use for windows 2019, tho with MDT.
I'l try find a unattended file and just run that.
For fun I tried making a new unattended file from scratch. Choosing language in PE works, but as soon as I pick the part with os image it wont work. Might be that partition is required for this step?
Code:<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserData> <AcceptEula>true</AcceptEula> </UserData> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/install/index</Key> <Value>3</Value> </MetaData> </InstallFrom> </OSImage> </ImageInstall> </component>
<InstallTo> is optional, but is generally required if using a disk layout (otherwise Setup picks the partition for you). Without knowing the ISO you're using, nobody can tell what image index #3 corresponds to.
Anyway, not posting the entire XML is unhelpful -- especially if you're "starting from scratch" again. If someone shares a complete XML, then another user can suggest you replace [XYZ] section with [ABC] text. But we can't guess if your XML is missing required lines that make Setup recognize it as a valid instruction.
Thanks for the help so far, but ended up scrapping the whole disk format portion.
Now I have two differend files, one autounattend that only sets some language settings and skips Eula.
This works fine.
The next one named unattend.xml placed in source folder on the iso (win 2019 server datacenter) is not working as intended. It's not running at all I think. The fields registeredowner and organization is not updated and the script did not run.
If I understand correctly the unattended file is the file that runs after the installation is complete?
Might be that the unattended file is not working because I already have autounattend?Code:<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="auditUser"> <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RunSynchronous> <RunSynchronousCommand wcm:action="add"> <Order>1</Order> <Path>cmd.exe /c "C:\Scripts\Diskpart_Assign_E_Drive_Gen10.cmd"</Path> </RunSynchronousCommand> </RunSynchronous> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RegisteredOrganization>xxxxxx</RegisteredOrganization> <RegisteredOwner>adm_user</RegisteredOwner> </component> </settings> <cpi:offlineImage cpi:source="catalog:c:xxxxxxx/install_windows server 2019 serverdatacentercore.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
I tried the settings registeres owner in autounattend but got error message after installation so seems like I cant put anything in the oob pass.