Compare the raw IMG with the whole disk
For an uncompressed raw, byte-for-byte IMG, compare its logical file length with the target whole disk’s OS-reported capacity, both in exact bytes. A larger image establishes a capacity shortfall. An equal or smaller image establishes numerical capacity compatibility only: it does not validate the device or image, guarantee booting, or establish enough working space after installation.
Matching advertised capacities are not exact measurements. A full-device backup can include unused filesystem space; deleting files inside that filesystem does not by itself shorten an existing raw image. Keep the original backup unchanged while investigating.
Four values, only two comparison inputs
Compressed download
Transfer or archive size. Record for context; exclude from the raw capacity comparison.
Extracted raw IMG length
Logical file bytes. This is the required space for the whole raw byte stream.
Comparison input AWhole target disk capacity
OS-reported total disk bytes, after identifying the intended device.
Comparison input BFilesystem free space
Unused space within a volume. Record which volume; exclude from this comparison.
Raspberry Pi’s 11 December 2025 repository-format guide separates expanded-image size from download size. Compression or renaming does not reduce the expanded byte stream. For archives, extract the raw IMG or obtain a documented raw-size value for that exact image. DMG, sparse and other container formats need their own documented workflow; their file lengths are outside this guide’s comparison.
Extracted raw IMG
Logical file length in bytes → image requirement (A)
Intended whole disk
Total reported capacity in bytes → target capacity (B)
Compare B − A. Compressed download size and filesystem free space stay outside this calculation.
- Boot volume: Explorer may show only this volume
- Other partitions: may not appear as readable drives in Windows
- Any unallocated space: still inside the whole disk
Conceptual layout, not to scale; partition layouts vary. A volume’s capacity or free space does not describe the whole device. Empty filesystem space can still occupy positions within a raw backup.
Read exact values on Windows
These PowerShell commands retrieve information; they do not write or format a disk. They are documentation-based instructions, not a hardware-tested card-reader procedure. The webpage does not inspect your drives.
- List disk properties. Get-Disk returns disks visible to Windows. Use a property list to retain exact numeric values rather than a rounded capacity display.
Get-Disk | Format-List Number,FriendlyName,SerialNumber,BusType,Size,LogicalSectorSizeIdentify the intended SD disk using multiple properties and your knowledge of the connected reader/card. Disk number alone, a generic reader name or BusType alone is insufficient. Serial numbers can be absent or unhelpful. If identity is uncertain, the disk is missing, or Size is unavailable, record unknown; do not guess from a drive letter. Keep serial numbers and personal paths out of public support posts.
Microsoft defines MSFT_Disk.Size as the total disk size in bytes and LogicalSectorSize as bytes per logical sector. This is reported capacity, not a test of authentic or healthy physical storage.
- Measure the already extracted raw IMG. Replace the illustrative path with your file’s literal path. Confirm the file’s provenance and raw format; an .img extension alone is not proof.
Get-Item -LiteralPath 'C:\Images\backup.img' | Select-Object FullName,LengthFor a file, FileInfo.Length gives logical bytes. Use Length, not allocated “size on disk.” An error, directory result or uncertain file format leaves this measurement unknown. Record exact integer bytes, not rounded GB/GiB.
- Compare and keep the imager’s checks. Subtract image bytes from disk bytes. A negative result is a shortfall; zero is the exact boundary; a positive result is only whole-disk margin. If the imager still refuses, preserve its full message and recheck the image, target and measurement provenance. This guide does not override its checks.
Sector counts need their own units
Bytes = sector count × bytes per sector. Record the sector size attached to each count; never assume every tool’s “sector” means 512 bytes or use physical sector size as a substitute. If the unit is missing, the comparison is unknown. Different sector units require conversion to bytes first.
In Imager issue #769, 27 December 2023, the user posted a Win32 Disk Imager message with 249,737,216 required sectors, 249,670,656 available sectors and a 512-byte sector size. These are historical reported values, not measurements from our hardware or current image-size requirements.
Required: 249,737,216 × 512 = 127,865,454,592 bytes
Available: 249,670,656 × 512 = 127,831,375,872 bytes
Shortfall: 34,078,720 bytes = 32.5 MiB (1 MiB = 1,048,576 bytes).
A synthetic unit check: 2,000 sectors at 512 bytes is 1,024,000 bytes; 300 sectors at 4,096 bytes is 1,228,800 bytes. The larger sector count can describe fewer bytes. Equal byte capacities also do not establish that a different sector geometry is supported by the image or imager.
Check the conclusion in four cases
Try selecting the relevant measurements before reading each answer. Synthetic cases were created for this guide on 16 November 2026.
Too large: historical sector report
- Raw image length
- 127,865,454,592 bytes
- Whole target disk
- 127,831,375,872 bytes
Answer: Shortfall: 34,078,720 bytes (32.5 MiB). The reported target cannot hold the entire raw image. This capacity comparison does not validate the image or device.
Equal: synthetic exact boundary
- Raw image length
- 8,000,000,000 bytes
- Whole target disk
- 8,000,000,000 bytes
Answer: Equal: zero byte difference. Numerical capacity compatibility only; this does not validate the image or device, prove boot success, or establish free space after installation.
Smaller: synthetic capacity margin
- Raw image length
- 8,000,000,000 bytes
- Whole target disk
- 8,100,000,000 bytes
Answer: Within capacity: 100,000,000 bytes of whole-disk margin. Numerical capacity compatibility only; this does not validate the image or device. Disk margin is not a measurement of filesystem free space.
Unknown: download and volume figures only
- Raw image length
- Not established
- Whole target disk
- Not established
Answer: Unknown: a 2 GB compressed download and 200 MB free on a boot volume do not supply either required measurement. Obtain raw-image length and whole-disk capacity first; image and device validity remain unestablished.
Choose a supported next step
- Shortfall established: check the image provider’s supported smaller alternatives or use a suitable device with sufficient reported capacity. For Raspberry Pi OS, consult the official operating-system choices and their current requirements; a different edition may omit software you need.
- A backup must be retained: review a documented shrinking workflow on a copy. PiShrink’s README says it shrinks the final partition and requires that partition to be ext2, ext3 or ext4. Automatic expansion has further requirements, including the final partition being the root filesystem. It is not a universal image converter, and it was not executed for this guide.
- Equal or within capacity: continue with the provider’s supported imaging and verification workflow. Capacity arithmetic alone does not diagnose another error or prove sufficient runtime headroom.
- Unknown: obtain the missing format, device identity, exact bytes or sector units before deciding.
Do not truncate an image, force a partial write or treat formatting as a way to add physical capacity. This guide provides no disk-modification commands.
Optional four-value evidence record to copy and print
Copy this outline into a local document to fill it in or print it. Check print preview first; print layout has not been verified. Keep unknown values labelled unknown.
- Date; operating system; imager and version; exact error:
- Image source/version and confirmed format:
- Compressed download size and units (context only):
- Extracted raw IMG logical length in exact bytes (A), measurement source:
- Intended whole disk identity, checked using multiple properties:
- Whole-disk reported capacity in exact bytes (B), measurement source:
- Filesystem free space and which volume (context only):
- If using sector counts: required count/unit, available count/unit; bytes per sector for each:
- B minus A; shortfall / equal / within capacity / unknown:
- Missing evidence and supported next step:
Record conclusion: “This establishes only the reported numerical capacity comparison. Device authenticity, health, image integrity, booting and post-installation free space are not established.”
Evidence and limits
Reviewed 16 November 2026. A 2018 backup question documents the same-label expectation. Imager issue #354 (2022) illustrates download-size confusion, and Bookworm issue #419 (2025) records another byte shortfall. Historical reports establish examples of the problem, not a current software defect.
AI inspected the documentation and reports; arithmetic was checked programmatically. No attached-card measurement, imaging operation, hardware compatibility test, expert review or human usability study occurred. The commands’ behavior across Windows versions and card readers remains untested here.