Windows 11 Installation mit Ventoy?

Registriert
Aug. 2011
Beiträge
253
Hallo,

Ich will aktuell Windows 11 EDU mit Ventoy installieren und dabei einige Änderungen während der Installation vornehmen. Es klappt aber irgendwie nicht und ich weiß nicht, wo das Problem liegt.

Ablauf: Ich boote mit F12 von Installationsmedium als EFI Boot. Dann kommt Ventoy Menü. Ich wähle Windows Iso. Ich kann dann normal oder mit Config booten. Ich wähle mit Config. Dann startet es neu, kommt kurzzeitig violett Screen und dann startet es wieder in Ventoy Menü. d.h. es kommt einfach nicht weiter.

So sieht die USB Struktur aus:
/autounattend.xml
/windows/Win11_25H2_German_x64_v2.iso
/ventoy/ventoy.json

So sieht autounattend.xml aus:
XML:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"
          xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">

  <!-- ================================================= -->
  <!-- 1. WINDOWS PE -->
  <!-- ================================================= -->
  <settings pass="windowsPE">
    <component name="Microsoft-Windows-Setup">

      <!-- Sprache -->
      <InputLocale>de-DE</InputLocale>
      <SystemLocale>de-DE</SystemLocale>
      <UILanguage>de-DE</UILanguage>
      <UserLocale>de-DE</UserLocale>

      <!-- Partitionierung -->
      <DiskConfiguration>
        <Disk wcm:action="add">
          <DiskID>0</DiskID>
          <WillWipeDisk>true</WillWipeDisk>

          <CreatePartitions>
            <!-- EFI 2GB -->
            <CreatePartition>
              <Order>1</Order>
              <Type>EFI</Type>
              <Size>2048</Size>
            </CreatePartition>

            <!-- MSR -->
            <CreatePartition>
              <Order>2</Order>
              <Type>MSR</Type>
              <Size>16</Size>
            </CreatePartition>

            <!-- Windows -->
            <CreatePartition>
              <Order>3</Order>
              <Type>Primary</Type>
              <Size>900000</Size>
            </CreatePartition>

            <!-- Recovery -->
            <CreatePartition>
              <Order>4</Order>
              <Type>Primary</Type>
              <Size>1024</Size>
            </CreatePartition>
          </CreatePartitions>

          <ModifyPartitions>
            <!-- EFI -->
            <ModifyPartition>
              <Order>1</Order>
              <PartitionID>1</PartitionID>
              <Format>FAT32</Format>
              <Label>EFI</Label>
            </ModifyPartition>

            <!-- Windows -->
            <ModifyPartition>
              <Order>2</Order>
              <PartitionID>3</PartitionID>
              <Format>NTFS</Format>
              <Label>Windows</Label>
              <Letter>C</Letter>
            </ModifyPartition>

            <!-- Recovery -->
            <ModifyPartition>
              <Order>3</Order>
              <PartitionID>4</PartitionID>
              <Format>NTFS</Format>
              <Label>Recovery</Label>
              <TypeID>0x27</TypeID>
            </ModifyPartition>
          </ModifyPartitions>
        </DiskConfiguration>

      <!-- Image -->
      <ImageInstall>
        <OSImage>
          <InstallFrom>
            <MetaData wcm:action="add">
              <Key>/IMAGE/INDEX</Key>
              <Value>3</Value>
            </MetaData>
          </InstallFrom>
          <WillShowUI>Never</WillShowUI>
        </OSImage>
      </ImageInstall>

      <!-- Key -->
      <UserData>
        <ProductKey>
          <Key>xxxxx-xxxxx-xxxxx-xxxxx-xxxxx</Key>
          <WillShowUI>Never</WillShowUI>
        </ProductKey>
        <AcceptEula>true</AcceptEula>
      </UserData>

    </component>
  </settings>
 
  <!-- ================================================= -->
  <!-- 2. OOBE -->
  <!-- ================================================= -->
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup">

      <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <NetworkLocation>Work</NetworkLocation>
        <ProtectYourPC>3</ProtectYourPC>
        <SkipMachineOOBE>true</SkipMachineOOBE>
        <SkipUserOOBE>false</SkipUserOOBE>
      </OOBE>

      <!-- User -->
      <UserAccounts>
        <LocalAccounts>
          <LocalAccount wcm:action="add">
            <Password>
              <Value>1234</Value>
              <PlainText>true</PlainText>
            </Password>
            <Description>Administrator Konto</Description>
            <DisplayName>Admin</DisplayName>
            <Name>Admin</Name>
            <Group>Administrators</Group>
          </LocalAccount>
        </LocalAccounts>

        <AdministratorPassword>
          <Value>1234</Value>
          <PlainText>true</PlainText>
        </AdministratorPassword>
      </UserAccounts>

      <!-- Boot-Fix + Debloat -->
      <FirstLogonCommands>

        <!-- BOOTLOADER FIX (entscheidend für Lenovo + 2GB EFI) -->
        <SynchronousCommand wcm:action="add">
          <Order>1</Order>
          <Description>Fix UEFI Boot</Description>
          <CommandLine>cmd /c for /f "tokens=2 delims==" %i in ('wmic logicaldisk where "VolumeName='EFI'" get DeviceID /value ^| find "="') do bcdboot C:\Windows /s %i /f UEFI</CommandLine>
        </SynchronousCommand>

        <!-- Debloat -->
        <SynchronousCommand wcm:action="add">
          <Order>2</Order>
          <Description>Remove Cortana</Description>
          <CommandLine>powershell -Command "Get-AppxPackage -AllUsers *Cortana* | Remove-AppxPackage"</CommandLine>
        </SynchronousCommand>

        <SynchronousCommand wcm:action="add">
          <Order>3</Order>
          <Description>Remove OneDrive</Description>
          <CommandLine>powershell -Command "Get-AppxPackage -AllUsers *OneDrive* | Remove-AppxPackage"</CommandLine>
        </SynchronousCommand>

        <SynchronousCommand wcm:action="add">
          <Order>4</Order>
          <Description>Remove Xbox/Teams</Description>
          <CommandLine>powershell -Command "Get-AppxPackage -AllUsers *Xbox* | Remove-AppxPackage; Get-AppxPackage -AllUsers *MicrosoftTeams* | Remove-AppxPackage"</CommandLine>
        </SynchronousCommand>

        <SynchronousCommand wcm:action="add">
          <Order>5</Order>
          <Description>Disable Consumer Features</Description>
          <CommandLine>powershell -Command "Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent' -Name 'DisableConsumerFeatures' -Value 1"</CommandLine>
        </SynchronousCommand>

        <SynchronousCommand wcm:action="add">
          <Order>6</Order>
          <Description>Disable Copilot</Description>
          <CommandLine>powershell -Command "New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent' -Force; Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent' -Name 'DisableWindowsCopilot' -Value 1"</CommandLine>
        </SynchronousCommand>

      </FirstLogonCommands>

    </component>
  </settings>

</unattend>

ventoy.json:
JSON:
{ "auto_install": [ { "image": "/windows/Win11_25H2_German_x64_v2.iso", "template": "/autounattend.xml" } ] }

PS: ISO ist von der Microsoft Seite. Die EFI Partition will ich so groß haben. Der Notebook, wo es installiert werden sollte, ist von Lenovo LOQ 15ARP9. Nach Windows kommt noch Fedora als Dual Boot mit rEFIND. Bei der UEFI von Notebook habe ich Secure Boot ausgeschaltet und Keys gelöscht. ACHI ist ausgewählt. Die normale Windows 11 Installation funktioniert einwandfrei. Ich kenne aber mit ventoy nicht so gut aus. Deswegen ist es nicht ersichtlich, ob ich irgendwelche Einstellungen oder Plugins vergessen habe oder Microsoft bzw. Lenovo da aktiv entgegenwirkt.
 
Sind die Skripte als UTF-8 kodiert? Laut dieser Quelle muss das sein. Unter Windows wird von manchen Programmen Windows-1252, Latin1, usw. verwendet.

Weiterhin steht da, dass pro Zeile nur eine Variable stehen darf. Füge mal ein paar Zeilenumbrüche in die JSON ein, wie es dort im Beispiel gezeigt wurde. (Mir ist unklar, ob sich diese Beschränkung auf die JSON oder Xml bezieht.)
 
Bei der unattended.xml reicht es aus, wenn sie auf irgendeinem USB-Laufwerk, das kann auch der Ventoy-Stick sein, im Hauptverzeichnis liegt. Da braucht es keinen seperaten Aufruf in der json dafür.
 
  • Gefällt mir
Reaktionen: R4Z3R
Ich habe bereits beides versucht. Aber es kommt immer dasselbe, dass es einfach neu startet und wieder in Ventoy Menü bootet
 
und wie sieht es aus wenn einmal alles neu gemacht wird, also frischer ventoy-stick und frisches ISO (aber erst mal ohne die xml). bootet dann das ISO überhaupt ordentlich?
Ich hatte einmal ein defektes Dateisystem auf einem Ventoy-Stick, selbst ISOs die schon oft benutzt wurden konnten plötzlich nicht mehr richtig booten, obwohl sie in der Auswahlliste erkannt wurden.
 
wenn ich über ventoy auf normal boot ohne config drücke, läuft ganz normale Windows Installation durch.
 
wie meist du das? Es ist nicht das Problem Windows zu installieren. ich will aber alle Änderungen vor der Installation haben. Vor allem EFI zu vergrößern kriege ich danach im Prinzip nie.
 
Mir gehts darum einen nackten USB Stick zu nehmen, ohne Ventoy.
 
Das ist eine EDU-Version. Frag bitte bei deinem SysAdmin nach, sonst kann das zu riesigem Ärger für dich führen. Wenn es sich um keine legale Version handelt- kauf dir eine legale Version.
 
@yxcvb Wie kommst du darauf, dass es sich um eine illegale Version handelt?

=============================================

Noch mal, um klar zu machen: ICH HABE KEIN PROBLEM DAMIT, WINDOWS DIREKT OHNE JEGLICHE ÄNDERUNG ZU INSTALLIEREN. bzw. mit Rufus klappt es auch problemlos.

Ich will halt zukünftig ersparen, das Zeug per Hand einzitippen:
Code:
diskpart
list disk
select disk 0
clean
convert gpt
create partition efi size=2048
list partition
select partition 1
set id=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
format fs=fat32 quick
assign letter=S
list volume

Inkl. zig Einstellungen bei Windows vor und später nach der Installation zu machen. Aber so wie es aussieht, geht es wohl schneller, als das Problem mit Konfig zu lösen.
 
Monkey D. Ruffy schrieb:
Ich will halt zukünftig ersparen, das Zeug per Hand einzitippen:

Kann ich mir vorstellen, aber Du hast da auch unnötige Schritte drin.

diskpart
list disk
select disk 0
clean
convert gpt
create partition efi size=2048
list partition
select partition 1
set id=c12a7328-f81f-11d2-ba4b-00a0c93ec93b

format fs=fat32 quick
assign letter=S
list volume


Code:
diskpart
select disk 0
clean
convert gpt
create partition efi size=2048
format fs=fat32 quick

:)
 
Hm, lass dir die autounattend.xml doch einmal über https://schneegans.de/windows/unattend-generator/ erstellen und probiere diese.

Reine Spekulation, da ich Ventoy bisher nicht nutzte:
Eventuell lass sie bei schneegans.de als .iso erzeugen.
Ich hatte kürzlich eine Situation, wo ich eine angepasste W11 VM in HyperV benötigte, aber eine autounattend.xml nicht in die Windows-ISO integrieren konnte/durfte, die Lösung waren zwei virtuelle Laufwerke und eine angepasste Bootreihenfolge. Das Setup der Windows-ISO hat dabei dann die autounattend.iso berücksichtigt.
 
  • Gefällt mir
Reaktionen: Monkey D. Ruffy
Zurück
Oben