Foundations Level: Beginner Chapter 1: How Windows Works Underneath
Firmware and Partitioning
Firmware starts your computer before Windows loads, and partitioning decides how your disk is divided. Modern computers pair UEFI firmware with GPT partitioning.
Lesson 4 of 5 in Chapter 1: How Windows Works Underneath. Previous step in this path: Services and Service Accounts. 3 learning objectives, 4 examples, and a knowledge check.
Start: what you will learn
Firmware starts your computer before Windows loads, and partitioning decides how your disk is divided. Modern computers pair UEFI firmware with GPT partitioning.
Learning objectives
- Tell BIOS apart from UEFI firmware
- Tell MBR apart from GPT partitioning
- Use Get-Disk, Get-Partition, and Get-Volume to read your own disk layout
Concept in simple words
What it is: Firmware is the small software built into your computer that runs first when you press the power button, before Windows loads. It checks the hardware and finds something to boot from. Partitioning is how a disk is divided into sections, and each section is called a partition. A partition can then hold a file system and appear as a drive, such as C, in Windows.
Why it works
Why it works this way: Windows needs a safe way to find its own boot files, and it needs a map of the disk that survives normal use. The old pairing is BIOS firmware with MBR partitioning. MBR stands for Master Boot Record, and it keeps the partition map in one place at the very start of the disk, with room for at most 4 primary partitions, and it does not handle disks larger than 2 TB well. The modern pairing is UEFI firmware with GPT partitioning. UEFI stands for Unified Extensible Firmware Interface, and GPT stands for GUID Partition Table, where a GUID is a globally unique ID given to each partition.
Think of it like this
Think of it like this: MBR is like a paper map kept in one single drawer. If that drawer is damaged, you lose the whole map. GPT is like keeping the same map in two places, at the start and at the end of the disk, with a checksum on each part. A checksum is a small value computed from the data, and if the data changes by accident, the checksum no longer matches, so Windows can spot the damage. With two copies, Windows can often rebuild the map from the good copy.
How it works, step by step
How it works, step by step: First, on a modern computer, UEFI firmware runs and looks for boot entries on a small EFI System Partition, which is a special partition that holds boot files. Next, UEFI hands control to the Windows Boot Manager found there. On an old BIOS computer, the firmware instead reads the first sector of the disk, which holds the MBR boot code and the partition table, and runs what it finds there. In both cases, the goal is the same, find the right partition, and start the Windows boot files on it.
Let us walk through an example: Run Get-Disk on your own computer and look at the PartitionStyle column. If it says GPT, your disk uses the modern layout, with a backup header and checksums. If it says MBR, your disk uses the old layout, with one map at the start. Then Get-Partition shows the partitions on a disk, and Get-Volume shows the drives Windows gives you, with their drive letters and file systems. A partition and a drive letter are related, but they are not the same thing, because a partition can exist without a drive letter, for example the EFI System Partition.
When to use it
When to use it, and when not to: Use Get-Disk, Get-Partition, and Get-Volume to look and learn, because they only read information and do not change your disk. Do not change a disk from MBR to GPT, or repartition a disk, just to try it, because that can destroy data. Do not assume a drive letter tells you the whole disk story, because one disk can hold several partitions, and some of them have no letter at all.
Start from zero: Your computer cannot run Windows until something finds Windows. That something is firmware, which is small software stored on a chip on the motherboard, not on your hard disk. When you press power, the processor runs firmware first, because there is no operating system in memory yet. Firmware checks the hardware in a basic way, then looks for a boot device, then looks for boot files on that device. Only then can Windows start to load. If firmware cannot find a boot device, Windows never gets a chance to run, no matter how healthy Windows itself is.
BIOS, in depth: BIOS is the old firmware style. It is simple, and it works in a very old CPU mode. It reads the first sector of the boot disk, which is 512 bytes, and that sector holds a small boot program plus the MBR partition table. BIOS then runs that boot program, and the program continues the chain. Because the MBR table lives in that one sector, it has room for at most 4 primary partitions. A common old workaround is an extended partition, which can hold extra logical drives inside it, but that is still a workaround for a small table, not a modern design. BIOS also does not handle disks larger than 2 TB well, because its addressing runs out of room.
UEFI, in depth: UEFI is the modern firmware style. It is far more capable than BIOS, and it can use drivers of its own to read disks and other devices before Windows loads. Instead of reading one boot sector, UEFI reads boot entries stored in firmware memory, called NVRAM, which list where boot files live. On a Windows machine, those entries point to files on the EFI System Partition, a small special partition that holds boot files. UEFI then runs the Windows Boot Manager from that partition. Because UEFI does not depend on one small boot sector, it is more flexible, and it can support modern features such as Secure Boot, which is covered in the next lesson.
GPT, in depth: GPT keeps a header at the start of the disk, plus a table of partition entries, and it keeps a backup header and a backup table at the end of the disk. Each partition gets two GUIDs, one that says what kind of partition it is, and one unique ID for that exact partition. Each header and table also carries a checksum, which is a value computed from the data. If data is damaged by accident, the checksum no longer matches, so Windows can spot the damage. If the main header is damaged, Windows can often rebuild it from the backup at the end. That pair of copies, plus checksums, is why GPT survives damage far better than a single MBR table.
Partition, volume, and file system, kept apart: A partition is a slice of a disk, defined in the partition table. A volume is a partition that has been formatted and that Windows can use, or in some cases a volume can span more than one disk, but in this lesson think of one formatted slice as one volume. A file system, such as NTFS or FAT32, is the organising system inside the volume, which tracks file names, folders, and where file data lives. A drive letter is then assigned to a volume, so you can reach it as C, or D, and so on. A partition without a file system, or without a drive letter, is still a partition. It simply is not a drive you can open in the usual way.
A typical modern Windows GPT layout, in order: First comes the EFI System Partition, which holds boot files and has no drive letter in normal use. Next comes the Microsoft Reserved Partition, often shortened to MSR, which is a small reserved slice with no file system and no drive letter, kept for future Windows use. Next comes the Windows partition, which holds Windows itself and normally gets the letter C. Last often comes a Recovery partition, which holds recovery tools and also has no drive letter in normal use. The exact sizes and order can vary, so do not memorise sizes. Memorise the idea, namely that a healthy Windows disk holds several partitions, and only one of them is normally your C drive.
Reading Get-Disk, Get-Partition, and Get-Volume as a chain: Start with Get-Disk, which tells you how many disks you have, their numbers, their friendly names, their partition styles, and whether they are online. A disk that is offline will not show its partitions in the usual way, so check that first. Next, use Get-Partition with the disk number you just saw, which tells you the slices on that one disk. Next, use Get-Volume, which tells you the formatted volumes, their drive letters, their file systems, and their sizes. If a partition has no matching volume, that usually means it has no file system or no letter, such as the EFI System Partition or the MSR, and that is normal.
Disk numbers, in depth: A disk number is not a permanent name for a physical disk. It is the number Windows assigned to that disk in this boot, in this setup. If you unplug a USB disk and plug it back in, or if you add a new disk, the numbers can change. That is why every disk example in this chapter says to check Get-Disk first. Disk 0 is used only as an example, because on many machines the main internal disk happens to be disk 0, but on your machine it might not be. Never copy a disk number from a guide, a screenshot, or yesterday, without checking the live Get-Disk list first.
Two edge cases worth knowing: First, a PartitionStyle of RAW means Windows does not recognise a partition table on that disk. That can mean a brand new disk that has never been set up, or it can mean a damaged table. Either way, do not format it just to explore it, because formatting can destroy data that might still be recoverable with the right help. Second, a disk can be GPT and still hold an old MBR style protective entry at the very start, which is there to stop old tools from thinking the disk is empty. That protective entry does not make the disk an MBR disk. The PartitionStyle column is the answer you trust, not the presence of one old style entry.
Worked examples
Read each example in order. Each one explains its parts, then shows what to look for in the output.
Syntax
Get-DiskExample 1
Get-Disk asks Windows for the physical disks on the machine. The pipe, written as |, passes those disk objects to the next command. Select-Object keeps only the Number, PartitionStyle, and OperationalStatus properties, so you can see at a glance whether a disk uses MBR or GPT and whether it is online.
Get-Disk | Select-Object Number, PartitionStyle, OperationalStatusIllustrative output: Number PartitionStyle OperationalStatus ------ -------------- ----------------- 0 GPT Online
Example 2
Get-Partition asks Windows for the partitions on a disk. The -DiskNumber parameter picks which disk to look at, and 0 is used here only as an example, so check Get-Disk first and use the number shown for your own disk. The result lists the partitions on that disk, including their numbers and sizes.
Get-Partition -DiskNumber 0Illustrative output: DiskNumber PartitionNumber DriveLetter Size ---------- --------------- ----------- ---- 0 1 100 MB 0 2 C 200 GB
Example 3
Get-Volume asks Windows for the volumes on the machine. The -DriveLetter parameter narrows the result to the volume with the letter C, which is normally the Windows volume. The pipe, written as |, passes that volume object to the next command. Select-Object then keeps the DriveLetter, FileSystem, Size, and SizeRemaining properties. Look for FileSystem, which is normally NTFS for a Windows volume, and compare Size with SizeRemaining to see how much space is left. If you change the letter to a letter that has no volume, you get no useful row, so check Get-Volume first and use a letter that really exists on your machine.
Get-Volume -DriveLetter C | Select-Object DriveLetter, FileSystem, Size, SizeRemainingIllustrative output: DriveLetter FileSystem Size SizeRemaining ----------- ---------- ---- ------------- C NTFS 200000000000 50000000000
Example 4
Get-Disk asks Windows for the physical disks on the machine. The pipe, written as |, passes those disk objects to the next command. Select-Object then keeps the Number, FriendlyName, PartitionStyle, and Size properties. Look for FriendlyName first, because a name such as a model name helps you tell two disks apart far better than a number alone. Look for PartitionStyle to see whether each disk uses GPT or MBR, and look for Size to confirm which disk is which. If you then run Get-Partition, use the Number shown here for your own disk, not a number copied from an example.
Get-Disk | Select-Object Number, FriendlyName, PartitionStyle, SizeIllustrative output: Number FriendlyName PartitionStyle Size ------ ------------ -------------- ---- 0 ExampleDisk GPT 500000000000
Nothing on this page executes PowerShell code. The outputs above are illustrative only.
Common mistakes and troubleshooting
Read these before you try the examples, so you can spot the same problems in your own work.
- Thinking a drive letter and a partition are the same thing, when a partition can exist with no drive letter, such as a boot partition.
- Changing a disk layout or converting MBR to GPT without a backup, and losing data that could have been saved.
- Assuming every disk must be GPT, when an old BIOS computer can still use MBR, and the pairing is what matters.
- Using a disk number from yesterday, or from a guide, after unplugging or adding a disk, when disk numbers can change and you must check Get-Disk first every time.
- Thinking a small SizeRemaining value means the disk is failing, when it usually only means the volume is nearly full, which is a space problem, not a hardware fault by itself.
- Formatting a RAW disk just to explore it, when RAW can mean a damaged table, and formatting can destroy data that might still be recoverable with the right help.
Knowledge check
Knowledge check
You run Get-Disk and the PartitionStyle column says GPT. What does that tell you about the disk?
Pick one answer. Feedback appears right away, and you can try again.
Remember this and next step
Remember this: BIOS is old and simple and pairs with MBR, UEFI is modern and pairs with GPT, GPT survives damage better because it keeps a backup header and checksums, and Get-Disk shows the style, Get-Partition shows the partitions, and Get-Volume shows the drives you can actually use.
Next step: Boot Phases and Boot Defenses