Documentation Index
Fetch the complete documentation index at: https://mintlify.com/garatc/BitUnlocker/llms.txt
Use this file to discover all available pages before exploring further.
parse_sdi.py parses a Windows SDI (System Deployment Image) file and prints its header, all non-empty blob table entries, and a layout map of every region in the file. It is primarily useful for validating a patched SDI produced by patch_sdi.py before booting, confirming that offsets and sizes in the blob table are correct and that no entry extends past the end of the file.
Usage
Arguments
Path to the SDI file to inspect. Can be the stock
boot.sdi or a patched
file such as boot_patched.sdi. The script exits with an error if the file
is not found.SDI file format
The SDI format used by the Windows boot manager is structured as follows:-
Header (512 bytes, offset
0x000) — begins with the 8-byte ASCII signature$SDI0001. The parser reads this field and reports whether it is valid. -
Blob table (4 096 bytes, offset
0x200) — an array of 64 entries, each 64 bytes wide. Each entry describes one data blob stored elsewhere in the file:Known type tags:Field Size Offset in entry Description Type tag 4 bytes ASCII 0x00Identifies the blob type Attributes uint64LE0x08Flags (type-specific) Data offset uint64LE0x10Absolute file offset of blob data Data size uint64LE0x18Byte size of blob data Blob ID uint64LE0x20Numeric identifier Tag Meaning PARTRaw partition image (NTFS volume) WIM\x00Windows Imaging Format — the WinRE image BOOTBoot code -
Data blobs — stored after the blob table. The first data blob starts at
the next 8 KiB-aligned boundary (
DATA_ALIGNMENT = 0x2000) after the blob table. Any gap between the end of the blob table and the first data blob is reported as padding in the layout map.
Example output
The following output is from parsing a patched SDI that has a custom WIM appended at offset0x501000:
What to check after patching
Confirm the signature is valid
Look for
Valid: Yes in the header section. If you see
NO - expected b'$SDI0001', the file header has been corrupted.Check the WIM entry offset
The
Offset shown for the WIM\x00 entry must match the append position
that patch_sdi.py printed in its patch plan (e.g. 0x00501000).Check the WIM entry size
The
Size shown for the WIM\x00 entry must equal the byte size of your
custom WinRE.wim file.Check for EOF overruns
Confirm there are no
WARNING: extends past EOF lines in the output. Such
a warning means a blob entry claims data beyond the end of the file, which
will cause the boot to fail.