Windows Booting Simplified

Wiki.TerraBase.info
Jump to navigation Jump to search

This article is not intended to be a detailed accounting of how Windows boots in the 'modern world' (which is essentially Vista and above). The 'old fashion' Windows NT 4, 2003 boot methods are not addressed here. See the last section for some links on more detailed information.

Modern PC Booting for Windows based on x86, i386, x64, whatever you want to broadly label the Intel 8086/8088 - IBM PC lineage

  • Power is turned on
  • CPU starts a program ("First Boot Program")
  • Hardware is / can be tested by the "First Boot Program" (if issues, booting is halted / can be halted)
  • "First Boot Program" starts a "Second Boot Program" (Bootloader), for BIOS based systems, the program contained in the MBR (Master Boot Record)
  • "Second Boot Program" loads other programs and starts Operating System (Windows, Linux, etc.), the PBR (Partition Boot Record) / VBR (Volume Boot Record), for Windows XP NTLDR, and for Vista and above BOOTMGR
  • Operating System boot completes, computer is useful (hopefully)

This is a really simplified perspective on booting,

MBR (Master Boot Record) VS UEFI (Unified Extensible Firmware Interface, sometimes referred to as just EFI)

Again, this is not a detailed explanation...

Windows can boot (the "Second Boot Program" as referred to above) via two methods.

  • Computer is powered on and begins boot process.
  • "Second Boot Program"

Odd Microsoft Quirk (go figure)

No, all the documentation you read is not messed up. Microsoft refers to the Partition / Volume that contains the "Second Boot Program" as the "System Partition / Volume". The "Boot Partition / Volume" is where Windows Operating System files are located. The Boot and System Partition can be on the same Partition / Volume. It helps if you think about this from a vain, myopic, selfish "Microsoft Windows" perspective where the 'real booting' only begins with Microsoft Windows.

Top Tips

  • BCD Editing Software: EasyBCD, BootIce (older program that may have some issues with latest version as some websites claim, but haven't personally experienced)
  • MBR and UEFI (EFI): Even if there's only one OS / Volume / Partition bootable, it is a good practice to make sure the /Boot/BCD ("MBR Booting") File and /EFI/Microsoft/Boot/BCD ("UEFI / EFI Booting") File have duplicate boot information, just in case something gets changed in the BIOS.
  • Windows 11: Almost everything you might have heard about Windows 11 booting is not accurate. Windows 11 is fully functional and can boot VIA "MBR Booting" (as opposed to "UEFI / EFI Booting") on an "MBR Partition / Volume" (as opposed to a "GPT Partition / Volume") without any TPM (Trusted Platform Management, as in MANAGEMENT by Microsoft (and other software vendors) of your PLATFORM, NOT YOUR management of YOUR platform, regardless of what Microsoft claims it is "good for") support.
  • Metro Loader: Avoid it. Looks cool, but starts at a later point in the boot process than the "Text Loader" which makes it less useful if there are any boot issues that need to be diagnosed.
  • FixMBR and FixBoot, for more control, use BOOTSECT instead of BOOTREC (Example: BOOTSECT /nt60 v: where /nt60 = an MBR Boot Record for Vista and above, v: = The drive letter assigned to the partition (may need to be assigned with DISKPART)
  • BOOTREC Command for very basic 'fixing' of MBR and other stuff, but seems to only be available in WinRE, not in Windows.
  • BCDBOOT Command can add necessary files to change a non-system partition to a system partition. (Example BCDBOOT C:\Windows /l en-us /s X: /f ALL /v with C:\Windows = Source of Files to be Copied, /l (that's a lower case L, not a capital I / 'eye') = "local language", /s = Drive Letter to copy files to (may need to be assigned with DISKPART if no drive letter has been assigned to parition), /f = ALL is UEFI and MBR Boot Files (as opposed to just MBR or UEFI), /v = Verbose)
  • DISKPART can be used to assign a drive letter for using the BOOTSECT and BCDBOOT commands (Example: DISKPART, SELECT DISK, SELECT VOL, ASSIGN LETTER=WhatEverUnusedDriveLetterDesired)
  • MSCONFIG, Boot Tab: A "neutered" version of BCDEDIT, EasyBCD, BootICE.

System Partition Designation

When looking at all the Disks and Partitions / Volumes in Disk Management, the "System" (as in System Partition) is not a value that can be assigned, unlike "Active" (as in Active Partition) which can be set. The System Partition Designation is actually determined, rather than set. IE, if a computer is booted up from Disk X, with an MBR on Disk X, with BCD Information on Disk X that indicates the Windows OS is on Disk Y, then Disk X will be have the System Partition Designation assigned to it.

UEFI Boot Partition and WinRE

Creating a UEFI Boot Partition with WinRE is fairly simple. The below applies to a UEFI Computer and a GPT Disk / SSD;

  • Create a Partition (usually at the beginning of a Disk / SSD, and can be made 1 GB in size (easy to spot that way))
    • diskpart, select disk WhatEverDiskNumber, ...and see the below choices (these examples assume there is available disk space at the beginning and end of disk that has a working Windows "Boot Partition" in the middle of the disk / drive);
      • create partition efi size=1024 (don't use this one, see the next one) Thankfully, there is no way to specify which partition to create as a UEFI / EFI partition. And also thankfully, if there is a blank partition at the beginning of a disk and at the end of a disk, DISKPART will select the partition at the end of the disk for the UEFI / EFI partition. If you can't tell, the use of 'thankfully' is facetious. Anyway, the only trick is to create an EFI partition at the end of a disk, then run the same command to put it on the one at the beginning.
      • Choice 1 (best choice, because it actually works);
        • create partition efi size=1024 offset=1
        • ...then format quick fs=fat32 label=”System”
        • Install the Boot Files: BCDBOOT C:\Windows /l en-us /s WhatEverDriveLetter: /f ALL /v (see example and explanation in above Top Tips Section)
      • Choice 2 (should work, but doesn't, included it because of an idea from https://www.tenforums.com/drivers-hardware/80762-how-sign-existing-partition-efi-partition-diskpart.html);
        • Create an ordinary FAT32 Partition at the beginning of a disk using DISKPART, Windows Disk Manager GUI, EaseUS Partition Manager, AOMEI Partition Manager, etc. (Partition type will be Primary)
        • Select the appropriate disk and partition in DISKPART and use this command: set id=c12a7328-f81f-11d2-ba4b-00a0c93ec93b override (Partition Type will be "System", remember, Windows calls the partition where it is installed the "Boot Partition" and the place where the Computer boots up the "System Partition)
        • Install the Boot Files: BCDBOOT C:\Windows /l en-us /s WhatEverDriveLetter: /f ALL /v (see example and explanation in above Top Tips Section)
        • Assign a drive letter: Select the appropriate Disk and Partition in DISKPART: assign letter=WhatEverLetter
      • OR, if installing Windows, and the disk is blank then Windows will put it at the beginning automatically
  • Install WinRE
    • Find the WinRE.wim File on the installation media, in WhatEverDriveLetter:\sources\install.esd
    • Extract the WinRE.wim file: 7-Zip is the easiest method, Right Click on the install.esd file, Click Open Archive, examine the XML "Manifest File" for the version of Windows that matches yours, go to WhatEverNumber\Windows\System32\Recovery and the Winre.wim file should be there. Copy it to a convenient location (need to find it later) ( Here's a website with a detailed explanation ).

The WinRE\

Links for more Detailed Information

Booting: https://en.wikipedia.org/wiki/Booting

MBR Booting (and repair): http://woshub.com/how-to-rebuild-bcd-file-in-windows-10/

Windows RE: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/take-inventory-of-an-image-or-component-using-dism?view=windows-11

MBR Breakdown: https://nixhacker.com/explaining-the-magic-of-mbr-and-its/

Can a GPT Disk only be booted from a FAT32 UEFI / EFI Parition? No. All the websites, blogs, whatever that state a UEFI / EFI Partition has to be formatted as a FAT32 Partition are WRONG. The "rules" say, that only FAT32 has to be supported. It doesn't exclude NTFS. And then there's a bit of discussion about should / could / would, etc. But at the end: Can it boot from an NTFS partition? Yes (if the UEFI/BIOS of a motherboard supports NTFS, and there's nothing that excludes a manufacturer from including that capability). And there's also this: https://github.com/pbatard/uefi-ntfs


Other Thoughts and Notes

MSR (Microsoft Reserved Partition): https://en.wikipedia.org/wiki/Microsoft_Reserved_Partition

It's OK to delete if one is not using it (read above Wikipedia Article to help determine that, and read other stuff too (links not included)). The reason it is OK to delete it, is because one can create it again, thus making it possible to fix any issues deleting it causes. But, even better would be to clone the partition before deleting it, thus one can restore it exactly as it was. Acronis, EaseUs, AOEMEI, BootIce, etc, Clonezilla, GParted (I think), can all facilitate backing it up / cloning it.