Skip to content

From creating an automatic install (windows)

Nicholas edited this page Jul 8, 2023 · 10 revisions

First you'll need an answer file; luckily I have one here already laid out for you you can follow the rest of the guide here honestly; when finished, basically place everything inside the windows ISO file and it should automate the install for you; only got this to work with BIOS so you'll need to switch to UEFI. You have two options for this.

  • Force off two times (recommended because windows can miss the shift key)
  • Shift key

Then you'll need to insert the following into the XML file

<os>
  <type arch="x86_64" machine="q35">hvm</type>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2/x64/OVMF_CODE.secboot.fd</loader>
</os>

TL;DR

That wiki provides instructions and commands for various tasks related to Windows installations and operations. Here is a summary of the key points:

Open the WIM inside the ADK

open up a WIM inside the ADK (listed below) that's not inside the ISO (store it inside the desktop), if you have already, download the answer file or create your own; select the windows edition, and associate the WIM with the answer file. It will ask you to create a catalog, click yes.

Converting BIOS to UEFI

To convert a BIOS installation to UEFI, follow the instructions provided in the mentioned link: Convert Legacy BIOS to UEFI. The process involves using the mbr2gpt command in the command prompt while in windows diagnostics mode.

Automated Windows 11/10 Installation

To automate Windows 11/10 installation, you need to: Install the Windows Assessment and Deployment Kit (ADK) with the Windows Deployment Tools. Obtain or create a Windows ISO file.

Generate an answer file using tools like the Windows Answer File Generator.

Use the generated answer file to configure various settings during the installation process. Save the answer file as autounattend.xml and include it in the ISO or on a USB drive.

Additional Commands

Various commands are provided for different tasks, including:

Mounting and extracting an ISO file in Linux:

 mount -o loop <image>.iso /mnt/iso

 sudo cp -r /mnt/iso/* /path/to/dir

Creating an ISO file in Linux (MBR):

mkisofs -o /path/to/new_windows.iso -b boot/etfsboot.com -no-emul-boot -boot-load-size 8 -iso-level 3 -udf /path/to/windows_files

UEFI:

mkisofs -o /path/to/new_windows.iso -b boot/etfsboot.com -no-emul-boot -boot-load-size 8 -iso-level 3 -udf -eltorito-alt-boot -eltorito-platform 0xEF -eltorito-boot efi/microsoft/boot/efisys_noprompt.bin -no-emul-boot /path/to/windows_files

With the UEFI install, you don't have to convert the OS to MBR/BIOS, and everything should install fine. however if you're having issues somehow I'll keep the rest here.

Checking regional settings:

dism /online /get-intl

Validating and converting a Windows image:

dism /Get-WimInfo /Wimfile:<path_to_wim_file> and dism /Export-Image /SourceImageFile:<source_file> /DestinationImageFile:<destination_file> /Compress:Max /CheckIntegrity

For more detailed instructions please read the rest of the article.

Clone this wiki locally