Skip to content

Instantly share code, notes, and snippets.

@AnthroHeader
Created January 11, 2026 01:26
Show Gist options
  • Select an option

  • Save AnthroHeader/73f0e6225b7a44fb4c3ac31ed15e7898 to your computer and use it in GitHub Desktop.

Select an option

Save AnthroHeader/73f0e6225b7a44fb4c3ac31ed15e7898 to your computer and use it in GitHub Desktop.
Setup Windows dual boot single boot manager
# In Diskpart
clean
convert gpt
create partition efi size=200
format quick fs=fat32
create partition msr size=16
create partition primary
format quick fs=ntfs
assign
# Mount a Windows installation ISO, use the virtual media drive letter for the following
Get-WindowsImage -ImagePath <DRIVELETTER>:\sources\install.wim
# Use the drive letter assigned by diskpart for the following and the index for the desired Windows edition as displayed by the previous command
Expand-WindowsImage -ImagePath <DRIVELETTER>:\sources\install.wim -Index <WINEDITIONINDEX> -ApplyPath <TARGETVOLUME>
#Set up the existing Windows Boot loader to have the new installation as an entry
bcdedit -copy "{current}" -d "Windows 11 New Label"
bcdedit
# Note the GUID of the copied entry and use it in the following commands
bcdedit -set "{COPIED_ENTRY_GUID}" device partition=F:
bcdedit -set "{COPIED_ENTRY_GUID}" osdevice partition=F:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment