-1

Sometimes you need to partition your disk which already contains a different operating system (OS) or version of Windows thus you use Linux tools such as fdisk or gdisk to create/configure partitions for adding Windows 11. The question becomes which partitions Windows 11 running on UEFI/EFI requires.

Important note: there have been multiple reports recently, that certain Windows updates fail to install because the recovery partition is smaller than Windows needs/expects. I'd recommend allocating at the very least 1GB to it.

This is a follow-up to Default Windows 10 64 EFI partitions / partitioning scheme but now for Windows 11.

2 Answers2

6

For steps, skip to: Windows' Partition Layout is Standardized Across Versions


Important note: there have been multiple reports recently that certain Windows updates fail to install because the Recovery partition is smaller than Windows needs/expects.

  • I cannot replicate - in deleted comments, OP claims the cause is Windows Setup
    • Without OP providing links or screenshots showing Windows Setup incorrectly sizes the WinRE partition during the specialize configuration pass, the only explanation is user error, be it an OEM, custom deployment, or end user

  • What the OP describes will occur if a drive has been incorrectly manually partitioned, as by default during the specialize pass, Windows 10 v22H2 creates a 546MB WinRE partition after the OS partition, specifically to avoid this issue:
    • oobeSystem: 455,474KB [455MB] winre.wim | WinRE partition: 82MB free
      Win10 22H2 VM: OOBE

      KB5034441: 460,232KB [460MB] winre.wim | WinRE partition: 77MB free
      Win10 22H2 VM with KB5034441
    • OEMs, and many businesses, bypass Windows Setup's default install.<esd|wim> and unattend.xml (dynamically generated answer file by Setup from user selections), instead deploying Windows manually via a ZTI Deployment Share WIM/FFU through MDT/MEM:
      • This is a known issue with some deployment partitioned drives, as some OEMs were incorrectly placing WinRE at the front of the drive [WinRE, EFI, MSR, OS] and/or not leaving at least 300MB free for future WinRE updates increasing the size of the winre.wim, which creates this issue since there's no way to resize a WinRE partition at the beginning of a drive because free space is taken from the end of a partition.

        If this was to occur during a bi-annual version update, which uses WinPE and Windows Setup, it can shrink the OS partition and create a new WinRE partition either from WinPE directly or during the offlineServicing or specialize passes of Windows Setup, with the new WinRE partition created having the appropriate free space for future size increases; this results in two WinRE partitions and since the original is no longer needed, it can be deleted


Windows' Partition Layout is Standardized Across Versions:

  • UEFI: (Requires GPT)
    1. EFI: 100MB | Linux Dual-boot: 850MB
      • Windows requires 100MB and distros require different sizes, with max being ~750MB, so sum both to avoid issues
      • Only one EFI partition is needed, but if OSes are installed to diferent drives, two are recommended
    2. MSR: 16MB
    3. OS: 64GB minimum (Win <11 varies)
    4. WinRE: 768MB minimum | 1024MB recommended

  • BIOS: (Requires MBR)
    1. Boot: 100MB
    2. OS: 64GB minimum (Win <11 varies)
    3. WinRE: 768MB minimum | 1024MB recommended


Manually Configure Partitions in WinPE

To partition a new drive from WinPE, see Steps 1 - 6 at the bottom of this answer

  1. Once Windows Setup's GUI loads, open a terminal: Shift+F10DiskPart
    ::# If storing User Data directories on a partition other than C: (recommended),
    ::# max size required is ~300GB (multiply size wanted by 1024: 100*1024=102400)
    

    ::# List disks: lis dis

    ::# Select OS drive # Windows will be installed to: sel dis #

    ::# List partitions: lis par

    ::# Select and shrink the partition the OS partition [100GB] will be after: sel par # Shrink Desired=102400 Minimum=102400


  2. Create boot partition:
    • BIOS:
      Cre Par Pri Size=100
      Format Quick Fs=NTFS Label="Boot"
      Active
      
    • UEFI:
      ::# If OS partition is on a drive containing an EFI partition:
          Cre Par Msr Size=16
      

      ::# If OS partition is on a drive that doesn't contain an EFI partition: Cre Par EFI Size=100 Format Quick Fs=FAT32 Label="EFI" Cre Par Msr Size=16

      ::# If other drive is a drive # before the OS drive, Setup will
      ::# use the other EFI partition; if this occurs:
      
          ::# Once booted to Windows, mount OS drive's EFI partition
          ::# to Y: via DiskPart, then execute from an Admin terminal:
              BcdBoot C:\Windows /s Y: /f UEFI
      
              ::# If Windows doesn't boot with other drive removed, boot WinPE/WinRE:
                  BootRec /FixMBR &amp;&amp; BootRec /RebuildBCD
      


  3. Create OS partition:
    • Rest of the drive as the OS partition [99GB]:
      BIOS:
      Cre Par Pri
      Format Quick Fs=NTFS Label="System"
      
      UEFI:
      Cre Par Pri Id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
      Format Quick Fs=NTFS Label="System"
      
    • Additional data partitions after the [64GB] OS partition:
      BIOS:
      Cre Par Pri Size=65536
      Format Quick Fs=NTFS Label="OS"
      
      UEFI:
      Cre Par Pri Size=65536 Id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
      Format Quick Fs=NTFS Label="OS"
      

  4. Create WinRE partition: (should have 320MB free to allow for future WIM size increases)
    • BIOS:
      Shrink Desired=1024 Minimum=1024
      Cre Par Pri id=27
      Format Quick Fs=NTFS Label="WinRE"
      
    • UEFI:
      Shrink Desired=1024 Minimum=1024
      Cre Par Pri Id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
      Format Quick Fs=NTFS Label="WinRE"
      Gpt Attributes=0x8000000000000001
      

  5. Close terminal and proceed normally with Windows Setup: exitexit


EFI Booting

Prior to booting Windows Setup, ensure within the UEFI firmware settings that:

  • Secure Boot is always Enabled
    • Prevents malware injection into the boot process and should be enabled
    • Distros lacking EFI bootloader signatures:
      Add to UEFI signature database via UEFI firmware settings' Boot tab (add. info)

  • CSM Mode is always Disabled
    Causes UEFI [64bit] to emulate BIOS [16bit] within a 32bit environment
    • Sole purpose was to enable booting of distros lacking EFI boot circa ≤2017
    • Motherboard OEMs began phasing out of UEFI firmwares ~2021
    • Results in substantial performance degradation:
      • Boot times increase from ~10s to 45s+
      • MBR is required for the OS drive
        • MBR max: 4 primary partitions, size of 2TB
        • GPT max: 128 primary partitions, size of 9.44ZB
JW0914
  • 9,096
-1

fdisk

Disk /dev/sda: 55 GiB, 59055800320 bytes, 115343360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D71AA00E-1725-4837-AD44-E6F88C5620F3
First usable LBA: 34
Last usable LBA: 115343326
Alternative LBA: 115343359
Partition entries starting LBA: 2
Allocated partition entries: 128
Partition entries ending LBA: 33

Device Start End Sectors Type-UUID UUID Name Attrs /dev/sda1 2048 206847 204800 C12A7328-F81F-11D2-BA4B-00A0C93EC93B 6CDFD4B5-7089-4445-A08B-A6141947B533 Basic data partition GUID:63 /dev/sda2 206848 239615 32768 E3C9E316-0B5C-4DB8-817D-F92DF00215AE 8EF6E807-2C44-4414-B83B-88B2F1F5BC8B Microsoft reserved partition GUID:63 /dev/sda3 239616 114106367 113866752 EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 F7674BF6-869B-43D5-BEA1-809280529F68 Basic data partition GUID:63 /dev/sda4 114106368 115339263 1232896 DE94BBA4-06D1-4D40-A16A-BFD50179D6AC E5A161B4-703A-4CD0-8A65-DA45CD1BFBC4 RequiredPartition GUID:63


sfdisk

label: gpt
label-id: D71AA00E-1725-4837-AD44-E6F88C5620F3
device: /dev/sda
unit: sectors
first-lba: 34
last-lba: 115343326
sector-size: 512

/dev/sda1 : start= 2048, size= 204800, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=6CDFD4B5-7089-4445-A08B-A6141947B533, name="Basic data partition", attrs="GUID:63" /dev/sda2 : start= 206848, size= 32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=8EF6E807-2C44-4414-B83B-88B2F1F5BC8B, name="Microsoft reserved partition", attrs="GUID:63" /dev/sda3 : start= 239616, size= 113866752, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=F7674BF6-869B-43D5-BEA1-809280529F68, name="Basic data partition", attrs="GUID:63" /dev/sda4 : start= 114106368, size= 1232896, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=E5A161B4-703A-4CD0-8A65-DA45CD1BFBC4, attrs="RequiredPartition GUID:63"


gdisk

GPT fdisk (gdisk) version 1.0.9.1

Partition table scan: MBR: protective BSD: not present APM: not present GPT: present

Found valid GPT with protective MBR; using GPT. Disk /dev/sda: 115343360 sectors, 55.0 GiB Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): D71AA00E-1725-4837-AD44-E6F88C5620F3 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 115343326 Partitions will be aligned on 2048-sector boundaries Total free space is 6077 sectors (3.0 MiB)

Number Start (sector) End (sector) Size Code Name 1 2048 206847 100.0 MiB EF00 Basic data partition 2 206848 239615 16.0 MiB 0C01 Microsoft reserved ... 3 239616 114106367 54.3 GiB 0700 Basic data partition 4 114106368 115339263 602.0 MiB 2700