[SOLVED] Fully Unattended Windows 11 Installation - Avoid Press any key to boot from CD or DVD

MisterDeeds

Active Member
Nov 11, 2021
149
34
33
35
Hi all,

I am trying to set up a fully unattended Windows 11 installation on Proxmox. I have already created a Windows 11 ISO with integrated VirtIO drivers and an autounattend.xml file that works perfectly.

However, despite everything being set up correctly, I still have to manually press "a key" once (Press any key to boot from CD or DVD) to boot from the CD and initiate the installation. I would like the installation to start automatically without any manual input.

1739477239566.png

Is there a way to bypass this key press and ensure the installation starts completely unattended?

Thanks in advance for any help!
 
If you are scripting your deployment, you can use a sendkey command to bypass that.
Rufus has a way to bypass it if you are making your media from that, but then you will need to make sure your media is ejected after installation
 
  • Like
Reactions: MisterDeeds
If you are scripting your deployment, you can use a sendkey command to bypass that.
Rufus has a way to bypass it if you are making your media from that, but then you will need to make sure your media is ejected after installation
Thank you! I appreciate the tip.

I’m not very familiar with Rufus—do you happen to know how to do this in Rufus?
 
hier ein kleines simples ansible skript, mit der hoffnung das beim kopieren nichts kaputt gegangen ist :)

Bash:
---
# removes the in windows 10 introduced click to start dvd at boot
- name: Customize Windows ISO on Linux
  hosts: localhost
  become: true
  gather_facts: false

  vars:
    iso_source: "/var/lib/vz/template/iso/Win11_24H2_usaLanguage_x64.iso"                # Original Windows ISO path
    iso_mount: "/dev/shm/isomount"                         # Mount point
    iso_extracted: "/dev/shm/winiso/extracted" # Directory where files are copied
    iso_output: "/var/lib/vz/template/iso/Win11_24H2_usaLanguage_x64_edited.iso"  # Output path for the modified ISO
    volume_label: "WINSETUP"                         # Volume label for the new ISO

  tasks:

    - name: Install required packages
      ansible.builtin.package:
        name: xorriso
        state: present

    - name: Create mount and extraction directories
      ansible.builtin.file:
        path: "{{ item }}"
        state: directory
        mode: '0755'
      loop:
        - "{{ iso_mount }}"
        - "{{ iso_extracted }}"

    - name: Mount the Windows ISO
      ansible.builtin.mount:
        path: "{{ iso_mount }}"
        src: "{{ iso_source }}"
        fstype: udf
        opts: loop,ro
        state: mounted

    - name: Copy ISO contents to local directory
      ansible.builtin.synchronize:
        src: "{{ iso_mount }}/"
        dest: "{{ iso_extracted }}/"
        archive: true

    - name: Unmount the Windows ISO
      ansible.builtin.mount:
        path: "{{ iso_mount }}"
        state: unmounted

    - name: Remove old efisys.bin and cdboot.efi
      ansible.builtin.file:
        path: "{{ iso_extracted }}/efi/microsoft/boot/{{ item }}"
        state: absent
      loop:
        - "efisys.bin"
        - "cdboot.efi"

    - name: Copy efisys_noprompt.bin to efisys.bin
      ansible.builtin.copy:
        remote_src: true
        src: "{{ iso_extracted }}/efi/microsoft/boot/efisys_noprompt.bin"
        dest: "{{ iso_extracted }}/efi/microsoft/boot/efisys.bin"

    - name: Remove efisys_noprompt.bin
      ansible.builtin.file:
        path: "{{ iso_extracted }}/efi/microsoft/boot/efisys_noprompt.bin"
        state: absent

    - name: Copy cdboot_noprompt.efi to cdboot.efi
      ansible.builtin.copy:
        remote_src: true
        src: "{{ iso_extracted }}/efi/microsoft/boot/cdboot_noprompt.efi"
        dest: "{{ iso_extracted }}/efi/microsoft/boot/cdboot.efi"

    - name: Remove cdboot_noprompt.efi
      ansible.builtin.file:
        path: "{{ iso_extracted }}/efi/microsoft/boot/cdboot_noprompt.efi"
        state: absent

    - name: Build new Windows ISO with xorriso
      ansible.builtin.shell: |
        xorriso -as mkisofs \
          -iso-level 3 \
          -volid "{{ volume_label }}" \
          -eltorito-boot boot/etfsboot.com \
            -eltorito-catalog boot/boot.cat \
            -no-emul-boot \
            -boot-load-size 8 \
            -boot-info-table \
          -eltorito-alt-boot \
            -e efi/microsoft/boot/efisys.bin \
            -no-emul-boot \
          -isohybrid-gpt-basdat \
          -o "{{ iso_output }}" \
          "{{ iso_extracted }}"
      args:
        creates: "{{ iso_output }}"
      register: xorriso_output

    - name: Show xorriso output
      ansible.builtin.debug:
        var: xorriso_output.stdout

    - name: remove folders from /dev/shm
      ansible.builtin.file:
        path: "{{ item }}"
        state: absent
      loop:
        - "{{ iso_mount }}"
        - "{{ iso_extracted }}"
 
  • Like
Reactions: somebodyoverthere