Skip to content
The record
Finding20 September 20266 min read

Reading the installed operating system offline, and the rule that encrypted outranks everything

libblkid types an encrypted volume as "BitLocker" rather than "ntfs", so an ntfs-only volume filter walked past the one disk that mattered and reported "No operating system installed" for a machine whose data was wholly intact and merely unreadable; the fix generalised into a precedence rule, alongside an honest account of which Windows licence facts are provable from a dead disk.

hardware-testingsystemsmethod

What was done

Reworked the hardware profile from a grid of cards into one table (Category, Parameter, Value, Status, Details, Tested on), stopped it asserting rows it had never measured, and banned the word "Unknown" from any operator-facing output — every field carries a value or says specifically why it does not. Added offline OS capture: the station boots Linux, so the machine's Windows is never running, but the lock checks already mount its volume read-only and read the hives with hivex, so the same machinery reports product name and edition, feature update, build with UBR, product ID, install date and architecture. The defining defect was that libblkid types an encrypted volume as "BitLocker" rather than "ntfs", so an ntfs-only filter walked past a BitLocker machine laid out ESP + MSR + C: and reported "No operating system installed" for a disk holding every byte of the customer's data. It became an ordered precedence rule where encrypted outranks everything, with a mounted Linux root at / recognised as the station's own Ubuntu. The licence line reports only what a dead disk can prove — the ACPI MSDM or SLIC firmware table and a configured KMS host — never "Activated", and MSDM is recorded as presence only because it embeds a working OEM product key.

volume scan (internal disks only)
            |
            v
  ENCRYPTED    BitLocker seen     <- outranks all
  LINUX <mnt>  mounted, not "/"      "/" is the
  NTFS         Windows not opened    station's own
  OTHER        apfs, LVM, LUKS
  SCANFAILED   lsblk did not run  <- never "NONE"
  UNREADABLE   disk refused a dd  <- never "NONE"
  UNCHECKED    could not even try <- never "NONE"
  NONE         disks seen, blank
 
first match wins, top to bottom. "NONE" is the
one answer that must be earned by having looked.

The one-word verdict the volume scan returns, in precedence order.


Status

Shipped, 20–21 September 2026.

The hardware profile

** then — lay the profile out the way the operator designed it, then show it as one table rather than a dozen cards.**

The profile had grown to dozens of fields across many groups, rendered as a grid of cards. Reading it meant scanning a dozen boxes for the one line you wanted. The operator supplied a design: one table — Category, Parameter, Value, Status, Details, Tested on — and it reads far better for the same content.

stop the profile asserting things it never measured. Several rows presented as measured facts were defaults or inferences.

stop the word "unknown" reaching the hardware table. The house rule: "Unknown" appears in no output the operator sees. Every field either carries a value or says, specifically, why it does not.

put Touchscreen back on the Display group, and unpin the guards. The table rewrite dropped the Touchscreen row entirely. It was found in a final full-suite run, not by the reviewers who had graded the change low-risk. The guards protecting the OS rows had also been pinned to an exact source literal, so they passed vacuously after the rewrite — they were loosened to accept the new shape and taught the new shape, so they did not silently become no-ops.

A test that no longer tests anything still passes. That is the transferable finding here.

Reading the installed operating system

read the installed OS off the machine's own registry.

The station boots Linux, so the machine's Windows is never running. But the lock checks already mount the Windows volume read-only and read its hives with hivex — so the same machinery can answer what is installed on this machine, which is what tells a technician whether it still holds somebody's data before anyone presses Wipe.

show it on the bench screen, not only in the web record. The person who needs it most is standing at the machine.

Composed honestly: product name and edition, the feature update, the build with its UBR, the product ID, the install date, and the architecture — including the registry quirk that makes a fully patched Windows 11 call itself "Windows 10 Pro".

The defect that defined the rule

stop a BitLocker machine being reported as wiped.

libblkid on a modern util-linux types an encrypted volume as "BitLocker", not as "ntfs". The volume scan filtered for ntfs only, so it walked straight past the one disk that most needed noticing. A BitLocker machine laid out ESP + MSR + C: has no NTFS anywhere, scored nothing, and was reported as "No operating system installed" — on a machine holding every byte of the customer's data, intact and merely unreadable.

The rule that came out of it, now enforced throughout the OS detection:

Encrypted outranks everything. A volume nobody can read is the fact that decides what happens to the machine, and it must not be pushed aside by a second system that merely happened to be easier to look at.

And the one that guards the station itself: a mounted Linux root at / is the station's own Ubuntu, and reporting it as the customer's operating system would be the worst answer the code could give.

The licence line

report the Windows licence the machine can actually prove.

The operator asked for a green "Activated" tick. It cannot honestly exist: activation is evaluated at runtime from sealed, machine-bound stores; an expired KMS grant looks identical on disk to a live one; and a digital-licence entitlement lives in Microsoft's cloud.

What is provable offline is the firmware licence — the ACPI MSDM (OA 3.0) or SLIC (OA 2.x) table — and a configured KMS host. So that is what is reported, with three rules: the word "Activated" is never claimed, a firmware table that could not be listed never reads as "no licence", and —

MSDM embeds a working 29-character OEM product key at offset 56. Record presence only. Never open the file.

A source-level test asserts that no reader in the OS block is ever pointed at that directory. These records get exported and emailed.

What was deliberately not built

No decoding of DigitalProductId, and no mapping of the product ID's middle group — there is no published mapping for Windows 8/10/11, and a guessed channel on a resale record is a false claim.

Open questions

None outstanding.


The code

The verdict function: classify what each internal volume is, then answer in a fixed order where encrypted wins.

case "$fs" in
  ext2|ext3|ext4|xfs|btrfs|f2fs)
    # Mounted, and not the live system's own root — reporting the station's
    # Ubuntu as the machine's OS is the worst answer this block could give.
    [ -n "$mp" ] && [ "$mp" != "/" ] && [ -z "$linux_mp" ] && linux_mp="$mp" ;;
  # Named by libblkid itself, so a value we READ, not an inference.
  *BitLocker*|*bitlocker*)                       enc=1 ;;
  ntfs|ntfs3)                                    ntfs=1 ;;
  apfs|hfsplus|zfs_member|LVM2_member|crypto_LUKS) other=1 ;;
esac
# ... then, in this order, first match wins:
[ "$enc" = "1" ]         && { printf 'ENCRYPTED'; return 0; }
[ -n "$linux_mp" ]       && { printf 'LINUX %s' "$linux_mp"; return 0; }
[ "$ntfs" = "1" ]        && { printf 'NTFS'; return 0; }
[ "$scan_failed" = "1" ] && { printf 'SCANFAILED'; return 0; }  # not NONE
[ "$disks" -gt 0 ]       && { printf 'NONE'; return 0; }
From tools/hardware-audit.sh — an excerpt, trimmed to the technique it illustrates.

Not shown. Nothing from the licence block is shown: no MSDM or SLIC file paths, no offsets, and none of the reader that lists firmware tables, because that path sits next to a working OEM product key and these records are exported and emailed. The hive-reading code and the mount options used on a customer's Windows volume are also withheld — the read-only mount is a safety control on someone else's data.

A published copy. Commit references and internal identifiers have been removed and the operator is not named; the engineering, the counts and the stated limits are unchanged.