Bootable Hardware Audit & Secure Erasure Tool
A single Linux script that turns an unknown, operating-system-less device into a complete hardware record and a certified erasure. It runs from a SystemRescue USB, reads the machine directly from firmware and sysfs, optionally performs a NIST-aligned purge, verifies the result, and uploads everything to the ITAD platform.
- Role
- Designer and engineer
- Timeline
- Jun 2025 — Present
- Status
- live
- Hardware categories captured
- 10Identification, system, CPU, memory, storage, graphics, display, battery, network, security.
- Erase methods dispatched
- 4NVMe format, NVMe sanitize, ATA secure erase, and overwrite — chosen per drive capability.
- Safety gates before any erase
- 2Off by default in config, plus a typed confirmation per machine.
Latest updates
Restoring Windows from a shared image server now works end to end
A technician can now pick a Windows image held on a server on the warehouse network and load it onto a laptop from the station. The image comes from the latest Clonezilla, the restore is checked for real data written, the laptop gets its boot entry, and Windows starts. Proven on a Dell Latitude: the restored laptop booted into Windows set-up.
- The problem
- The first real use of the feature on a bench failed. Each problem it hit was hiding the next one. The station never mounted the server and said only 'no image server set'. The restore could not start. The stick's Clonezilla was missing its own library. Then a restore reported Completed and the laptop said 'No bootable devices found'. Behind that was the stick's partclone (0.3.27), which could not read images saved by current Clonezilla with XXH128 checksums. It refused every partition while Clonezilla still exited 0, so 23 MB were written for a 12.5 GB image and the station called it a success.
- What changed
- Nine changes, each found by the one before it. The image-server mount and the restore driver now run through the same privilege helper as the wipe engine. A cable that reaches the router but nothing beyond it no longer holds the route over a working Wi-Fi. Every restore keeps its full log on the stick, and a failed one keeps its reason on screen. Clonezilla's own library (drbl) and the tools it calls ship on the stick and install at boot, only where missing. After a restore the station adds the UEFI boot entry for Windows itself, but only when the restored EFI partition really holds the loader. A restore that wrote far less than the image, or that partclone refused, is now a failure and is filed as one. Finally, Debian's partclone 0.3.53 with its two newer libraries ships on the stick: at every boot it is unpacked privately, self-tested, and only then put in front of the old one. The wipe engine is untouched.
- How it was fixed
- Every step was diagnosed from evidence rather than guessed: the server's own Samba log, Clonezilla's words once the station saved them to the stick, and the decompressed image header, whose checksum byte (0x31) is XXH128 in partclone's source. The new partclone was proven before it shipped, in an Ubuntu 24.04 container (the stick's own base) against the real image's files. The old partclone reproduced the bench error exactly. The new one restored the EFI partition as a clean FAT file system holding the Windows boot loader, and the recovery partition as readable NTFS, both found by name through Clonezilla's own reset search path. CI ran the same install on its own machine, and a broken package leaves the old partclone untouched.
- Improvements
- Images are made with the latest Clonezilla; nobody has to keep an old version
- A restore that did not happen can no longer be reported, or filed, as Completed
- The restored laptop starts on its own: the station adds the Windows boot entry
- Every restore leaves its full log on the stick, so a failure can be read on any PC
- Confirmed on hardware by the owner: image restored from the server on a Dell Latitude, and Windows started. Only one of the stations' sticks has the update so far
The station can now choose or make a box for each audit, even with no network
After choosing a batch, the technician can pick a box in it, make a new one by name, or choose no box, and every audit, wipe and restore filed while a box is chosen goes into it. A box made while the stick is offline is kept on the stick and created on the server the first time a record reaches it.
- The problem
- The station filed every machine straight into the batch, so sorting into boxes had to be redone later from paper. And a box needs a reference issued by the server, which the stick cannot have when it has no connection.
- What changed
- A box picker sits under the batch picker, and a name field makes a box. The server issues the reference. When there is no connection the box is kept under a key of the stick's own; records into it carry the key and the box's name, and just before an audit is sent the station asks the server to make the box under that key and gives the record its id. The server answers the same box to every ask with the same key, so many queued records, a retry, or a reboot between asks cannot make two boxes. A box the page names badly is refused before anything is filed or erased, because dropping it silently would leave the operator believing a machine was boxed.
- How it was fixed
- The wipe route now carries the box in the record it files, which changes the code the engine's version fingerprint covers. The guard exists to force a version bump whenever that code changes, so the tool version moved to 1.8.1 and the fingerprint was re-pinned; no erase behaviour changed. Another existing test forbids any keyboard handler outside the keyboard test, so the new field submits as a form. A new test runs the real station code against a fake server that behaves like the box routes, covering the offline box, a reboot between asks, a box of another batch and a bad box.
- Improvements
- Machines are filed into the right box as they are audited, so nothing is sorted from paper afterwards
- A box made offline is clearly marked until the server gives it a reference
- A box made offline cannot be duplicated, because the server keys it by the stick's own key
- Confirmed on a booted stick by the owner: a box made, a laptop audited into it, and the laptop shown in that box on the partner platform. The offline path is covered by tests; a real offline run has not yet been seen
The station can now unfreeze a drive the BIOS froze, and proves it before it wipes
Many laptops freeze their drive's security feature at power-on, which makes the drive refuse the proper secure erase. The station now shows each drive's security state, offers an Unfreeze for a frozen drive, reads the drive again afterwards, and only believes the answer of that second read. Run on a real laptop, it unfroze the drive and the wipe then used the drive's own enhanced secure erase.
- The problem
- A frozen drive refuses the ATA secure erase, so the station fell back to overwriting the drive, which is slower and weaker on a solid-state drive. The operator could not see that a drive was frozen, could not change it, and a procedure that has merely run proves nothing: a laptop can wake from suspend and be frozen again.
- What changed
- Each drive's security state (supported, password set, locked, frozen, enhanced erase) is read once when it appears and shown on the wipe screen with the erase method the drive allows. A frozen drive gets an Unfreeze button: the station suspends itself for a few seconds, wakes, and reads the drive again. The result is one of a closed set of outcomes, and 'unfrozen' is shown only when that second read says not frozen. Unfreeze is refused while anything else is running, and a drive that cannot be frozen (not ATA) or is locked has no button. Every attempt is written to a log on the stick first.
- How it was fixed
- The rule that shaped the code: never believe the procedure, believe a second read. The engine's own claim of success is compared with the station's independent re-read, and if they disagree the attempt is recorded as unconfirmed, not unfrozen. A flag the drive did not report is stored as unknown, never as false. Bench result on one sacrificial drive: the screen and the drive's own report agreed before and after, and the wipe that followed ran as ATA enhanced secure erase and read back as zeros.
- Improvements
- A frozen drive is visible on the screen before the wipe, with the method it will allow
- Unfreeze succeeds or fails on evidence: a second read of the drive, never the procedure's word
- The wipe engine is unchanged; its fingerprint matches
- Run on one laptop and one drive so far. The busy refusal and the non-ATA case are covered by tests, not yet seen on hardware
Every Unfreeze attempt is now an offline-safe record on the platform
Each Unfreeze is given its own identifier and filed on the platform through the station's offline queue. Done with the network off, it was held on the stick, sent by itself on reconnect, and appeared once on the device's page and once in the activity log.
- The problem
- A wipe record that says 'ATA enhanced erase' does not say how the drive reached a state where that was allowed. The Unfreeze lived only in a log file on the stick, so the platform never learned that a drive had been frozen, that the station was suspended to clear it, or whether a second read confirmed it.
- What changed
- A new insert-only table keeps one row per attempt, keyed by the attempt's own identifier so a resend writes nothing. The station builds the record from one shared conformance fixture that the server's tests also run, files it through the same upload queue as a wipe, and routes it to its own endpoint. The server adds a Drive security card to the device page, matched to the device by the serial of the drive its wipe records name, and one entry in the audit log on first filing only. Nothing reads the record to make a decision.
- How it was fixed
- The server refuses to store 'unfrozen' without a confirming second read, in the database itself as well as in code, so a station that overstates cannot make the platform overstate. An unusable record is answered as received so the queue does not retry it for ever, and a missing table is answered as unavailable so the record is kept. Proof: type checks, the unit and Postgres specs, the migration chain and CI passed before merge, and the live deploy was checked. On hardware, with the network off, the record sat in the queue with the same identifier as the stick's log line, then uploaded on reconnect.
- Improvements
- The platform can show, per device, that a drive was unfrozen, how it was confirmed, and which erase method followed
- A flaky connection cannot double a record: each attempt is on the device page once
- Station and server share one fixture, so the two cannot drift apart unnoticed
- Recorded evidence only: no certificate, release check or device status reads it
A smaller master for the audit station, with its boot layer built on a PC instead of a booted station
The audit station now has a 16 GB master stick, so each duplicate writes about half as much. Its boot layer was built in a Docker container on the PC, and the stick has booted a business laptop to a ready app in 35 seconds.
- The problem
- A duplicate of a stick is the size of the master's whole disk, not of its contents. The working master was 57 GB with about 6 GB in use, so every copy wrote the full size. Rebuilding on a smaller drive also exposed a second cost: building the station's boot layer needed a second machine, booted from the stick, with a terminal open on it.
- What changed
- The master was rebuilt on a 16 GB drive from the Ubuntu base image, with the station's files and the BitLocker reader synced on. The boot layer is built by the same script as before, run unchanged in a privileged container on the PC. The container's fake boot medium holds the stick's files and its real kernel, so the layer's compression is judged against the kernel that will read it. The finished layer is inspected independently, copied to the stick, and compared by hash after the copy.
- How it was fixed
- The first two builds finished without error and were still incomplete. One left out the Firefox browser, because the container had no download tool and the build blamed the network. The other left out the browser's prepared profile, because the splash and theme files on the PC were generated before a rename and the container lacked the graphics libraries that the browser's first run needs. Reading the build log and not the exit code found both. The third build produced a 162 MB layer that passed 18 of 18 inspection checks. It also surfaced four silent gaps in the stick tooling, all recorded: a prepare step that installs a boot config but not the splash image it loads, a sync that skips a build-time helper, two per-stick switches that are never synced, and generated files that go stale after a rename.
- Improvements
- A duplicate is about half the size, and a batch of copies writes in about half the time
- The boot layer can be built on an ordinary PC, with no spare machine and no terminal on the station
- A build that exits cleanly but leaves out the browser is now caught by reading the log, and the gaps that hid it are written down
- Booted on real hardware: one business laptop reached a ready app 35 seconds after the kernel started, against 82 seconds on the old layer for the same model. That is one boot. BitLocker reads, lock detection and a real wipe have not yet been run on this stick, so it is a tested candidate master and not yet a proven one
Each wipe record now carries the station's own id and its account of the run
The station now gives every drive's wipe its own identifier, so the server can file that wipe once however many times the record is resent, and it sends its own account of the run: the engine's raw result line and exit code. A drive whose engine output held one invalid byte can no longer be recorded as failed. It reaches a station only when its stick is next updated.
- The problem
- This is the station side of the fifth stage of the plan built on NIST SP 800-88 Rev. 2. The server had just learned to file a wipe record only once when it carries an identifier, and to keep the station's account of what ran, but no station sent either. On the stick, a lost answer from the server meant the queue sent the same record again and it was filed twice, and a wipe interrupted by a power cut was filed again as 'outcome unknown' on every boot. The engine's raw result line and exit code were thrown away once read. Worst of all, the station read the engine's output strictly, so a single byte that was not valid text in any line stopped the read before the result: a drive that had been erased and checked was recorded as a failed wipe.
- What changed
- Before each drive's wipe starts, the station now creates a random identifier for that drive and that attempt, and stores it in the wipe-in-progress marker it already keeps on the stick. The same identifier rides on every copy of that record: the live upload, the copy saved while uploading, the copy queued when the server cannot be reached, and the copy rebuilt after a crash, which takes it from the marker rather than making a new one. The record also carries the station's account of the run: the engine's raw result line (up to 32,768 characters, with its full length so a cut is always visible), the engine's exit code, and whether the result came from the engine, could not be read, or was recovered. When a future engine prints its own evidence line, the station passes it on unread. The engine's output is now read so that a stray byte becomes a replacement character instead of ending the read.
- How it was fixed
- The design was attacked before the build from three angles. One finding mattered most: if each drive's recorder had read the identifier from a shared loop variable, every drive in a multi-drive wipe would have carried the last drive's identifier, and the server would have filed all but one without it. The identifier is now passed to each recorder directly. After the build, a review found no code defect and two gaps in the tests, both closed. Proof: all 70 station test suites pass; the old and new station handled the same 280 engine outputs, and 279 produced identical records; the one difference is the allowed one, an output with an invalid byte that the old station filed as failed and the new one as wiped. 38 deliberately broken copies of the code were each caught. A replay through the real server showed the live, saved, queued and recovered copies of one wipe arriving byte-identical and becoming one record. The wipe engine itself is unchanged: every part of its fingerprint matches.
- Improvements
- A resent or recovered wipe record is filed once, not once per send or once per boot
- A drive erased and checked can no longer be recorded as failed because of one bad byte in the engine's output
- The engine's raw result and exit code are kept with the record, for anyone who has to check a wipe later
- Merged on 16 October 2026 with all 70 station test suites passing. It reaches a station only when its stick is next synced, and it has not run on real hardware: a bench test is written, not run
The station now checks the technique register before it erases
Before each wipe, the station now works out which erase techniques each drive may use, from the platform's register of approved techniques, and the wipe engine skips any that are not on the list. It ships changing nothing: every technique in the register is still awaiting approval and the register is set to record, so stations erase exactly as before and only record the list.
- The problem
- This is the station half of the fourth stage of a plan built on NIST SP 800-88 Rev. 2. The server half gave the platform a register of the station's erase techniques, each with an approval status, and sends it to every station with its policy. No station read it. Refusing a technique in the register could therefore only change what a certificate said after the fact: the station would still have sent that erase command to the drive. The plan asks for the opposite, that a technique which is not approved erases nothing. Nothing in the wipe engine could skip a technique on request; each erase step picked its command only from what the drive reported.
- What changed
- Before each wipe, the station now works out a list for every drive. It allows the techniques the register approves for that kind of drive, minus any the sanitisation policy refuses, minus any the stick's own settings deny. A stick's settings can make the list stricter, never looser. In enforce mode, a drive whose chosen method has nothing left on its list is refused before anything is written, and so is every drive on a stick that has no list from the server. Otherwise the engine is handed the list only when there is something to restrict. In the engine, each erase step asks the drive first and the list second. A step that is not on the list is skipped, and the next step of the same method runs: a cryptographic sanitize that is not allowed, for example, falls to the block-erase sanitize. The skip is recorded with its reason, and a skipped technique is never recorded as attempted, because the server builds its records of what ran from that field. Each wipe's decision now carries the list the station worked out.
- How it was fixed
- The engine erases customer drives, so this change had to leave the erase that runs today untouched under the register as shipped. Three things prove it. First, 53 wipe scenarios were run through the old engine and the new one with no list in force. All 53 matched in every command sent to the drive and in every line of the record. A planted difference made 6 of them disagree, which shows the comparison can see a change. Second, 30 deliberately broken copies were planted one at a time, and a test failed for each. Third, AI agents reviewed the design from three angles before any code was written, then reviewed each half and the whole. Their sceptics found real problems early. New checks placed below the point where a wipe starts would not have existed during a wipe, so every wipe would have been refused, and no test would have noticed. Another problem was a false 'other namespaces were not erased' line on a certificate. A third was a laptop suspended to unfreeze a drive for an erase that would never run. The ATA secure erase sets a temporary password on the drive, and every skip is decided before that password is set, so the earlier fixes that make sure it is removed always run. A failed enhanced erase still goes straight to the overwrite: the station never sends both erases.
- Improvements
- Approving or refusing a technique in the register will now change what a station actually does, once a register version that does so is approved
- Stopping a technique that has not been proved on hardware becomes a data change, not an engine change
- Anything the station cannot settle, such as a missing file on the stick, an engine without the new checks or a register that fails its hash, is recorded as 'not established', never as 'every technique allowed'
- The station's console log now reaches its log file at once, instead of sitting in a buffer that was lost at shutdown
- Merged on 15 October 2026 with all 67 station test suites passing. Nothing is approved or enforced: the register still has every technique pending and set to record. It reaches a station only when its stick is next synced, and it has not run on real hardware: a bench test is written, not run. Its key step, the first real run of the normal ATA secure erase on a drive that also supports the enhanced one, must pass before enforcement is ever switched on
Two test checks that could never fail now can
Deliberately broken copies of the station showed two checks in its drive-queue test passing against the very fault each one names. Both now fail when they should, without a new race against the clock.
- The problem
- An NVMe drive can be split into parts called namespaces, and the station erases the parts of one drive one after the other, never at once. A test guards that queue. Two of its checks had never been able to fail. The first says a part waiting its turn does not look stuck on screen. It looked once, a fraction of a second after the job appeared, when the time since its last activity is zero whatever the station does, so a station that never refreshed a waiting job passed it. The second says the waiting part's wipe record gives the time its erase really began, not the time it was asked for. The record is in whole seconds, the check allowed one second of slack, and the erase ahead of it lasted under a second, so a station that filed the request time passed too. That would matter: such a record says the second erase began while the first was still running, which is the very thing the queue prevents. Both were found on 11 October by the broken-copy testing in the entry below.
- What changed
- The first check now waits until the station has refreshed the waiting job twice since the test saw it waiting, and only then reads the timer. The second now lets the queued erase start only once the clock has moved into a later second than the request, and compares the record, with no slack, with the last moment the test saw that erase still waiting. The erase ahead is held until the test ends it, so neither wait can race a slow machine. The test changed; the station did not.
- How it was fixed
- The obvious repair was to hold the first erase for three seconds, so that the two times fall in different seconds. That costs three seconds on every run and still compares with a second of slack. Waiting for the next second costs nothing on a working station, because the two refreshes already take two seconds. Two refreshes, not one, because a station that refreshed a waiting job only once could pass a one-refresh check or fail it, depending on which of two threads ran first; a broken copy built to do exactly that now fails it. Nine broken copies, and one unchanged, were run against the old test and the new, one at a time. The two target faults, and the refresh-once fault, now fail exactly their own check. The others fail the same checks as before, except one, and that difference turned out to be a timing quirk already in the old test, measured at 2 runs in 8 under both tests. It was written up rather than hidden.
- Improvements
- Every check in the drive-queue test has now been shown failing against the fault it names
- It costs about two seconds a run; a station without the refresh costs two minutes, once, which is the test's existing guard against a hang
- It still passes with every disk sync slowed to 0.5, 2 and 6 seconds, and on a twentieth of a CPU core
- Merged on 15 October 2026 with all 64 station test suites passing, on GitHub's own runners as well as locally. Tests only: nothing on a station changes, so there is no stick sync and no bench test to owe
Two tests that failed only when the PC was busy
Two of the station's automated tests went red on a busy development PC with nothing wrong in the code they test. Both now keep their own time, so a slow machine makes them slower, never red.
- The problem
- On a station, the read-only questions put to each drive during an audit are bounded in real time: 8 seconds a command, 20 a drive, 60 for all the drives. A health read is not one of those checks, so its time is given back to the budget. The first test proved that with real time: it gave the checks six seconds, made two pretend health reads sleep three seconds each, and expected the drives after them still to be asked. On a busy PC, starting the test's own helper programs used up the six seconds. In the second test, a pretend erase ran for a fixed 0.6 seconds. But before starting each erase, the station writes a safety marker to its stick and syncs it to disk, and with the disk busy those writes outlasted the erase, so the test looked at a queue that had already moved on. Both stopped replays of the build pipeline on 10 and 11 October, with a disk scanner running.
- What changed
- The first test now owns its clock. Bash stops treating its SECONDS counter as a clock once it is unset, so the test sets the time itself and only the pretend health read moves it, while the station's code reads it unchanged. The health reads now take 30 seconds each against a one-second budget, and a control run with the give-back line taken out must see the drives held, which proves on every run that the check can still fail. In the second test, the pretend erase lasts until the test ends it, and the test looks once every wipe is erasing or waiting. No station code changed.
- How it was fixed
- Each failure was reproduced on demand before anything was changed: the first by holding the test to a quarter of one CPU core, the second by making every disk sync take half a second. The old tests failed there every time; the new ones pass there, and still pass at a twentieth of a core and with a six-second sync. Then 14 deliberately broken copies of the station's code were run against the old tests and the new. The new tests caught every fault the old ones caught, plus two the old drive-check test let through. The same run found two checks that could never fail; they were written up for the owner rather than changed in passing, and were made real on 15 October (the entry above).
- Improvements
- A red result on these tests now means the code is wrong, not that the PC was busy
- The drive-check test is sharper: one second of a health read charged to the wrong budget is caught, where it used to take most of six
- Merged on 15 October 2026 with all 64 station test suites passing. Tests only: nothing on a station changes
A drive that arrives with a password is no longer wiped in silence
Some laptops lock their drive with a password and unlock it at every start. After a wipe, the station now asks the drive whether such a password is still set, and puts it on the record instead of certifying the drive as if it carried no lock.
- The problem
- A laptop can put a password on its own drive and unlock it at every start, so the station saw an ordinary unlocked drive. It wiped it by overwriting, read it back clean and recorded it as wiped, with nothing said. But the password was still on the drive: it locks again every time it is switched on, and in any other machine nobody can unlock it. The previous fix only covered the temporary password the station sets itself, and deliberately never touches one it did not set. This gap was found while making that fix, by reading the code, not from a returned drive.
- What changed
- At the end of every SATA wipe the station now asks the drive whether a password is set. It only reads: it never sends a password it did not set, and it never guesses at one. A password from a previous owner goes on the wipe record as a limitation, so the certificate reads "Wiped — with limitations" and says the drive has a password the station could not remove. The operator is told on screen what that means and how to clear it. A drive that is locked outright cannot be written at all, so its wipe fails, and the screen says why.
- How it was fixed
- The answer is read from the drive's own report one whole line at a time, the same way the two earlier fixes read theirs, and a report that could not be read is recorded as "could not check", never as "no password". Whether such a drive should fail or pass with a caveat was a judgement call. The station did not set this password and cannot remove it, which is the position of a firmware lock a device arrives with, and those are certified with the lock printed. So the default is a caveat, it is one line to reverse, and it is left to the owner to confirm. The real hdparm 9.65 was fed made-up drive data to check every case, and that run caught one case the first version had read too kindly.
- Improvements
- A certificate for such a drive says "Wiped — with limitations" and why, instead of reading like any other
- The station never tries a password on a drive, so it never uses up the drive's lock-out counter
- A drive whose password state cannot be read is recorded as unchecked, never as having no password
- Merged on 11 October 2026 with the station's test suites passing. It reaches a station only when its stick is next synced, and it has not run on real hardware: a bench test is written, not run
The station records a decision for each drive before it wipes it
Before it wipes a drive, the station now checks it against the sanitisation policy and writes that decision, with the policy version, into the wipe's record. The decision itself needs no network. The check ships in record mode and refuses nothing. Merged on 10 October 2026; not yet run on real hardware.
- The problem
- This is the station half of the third stage of a plan built on NIST SP 800-88 Rev. 2. The plan asks for a decision made before a drive is sanitised, recorded against the version of the policy it was made under. The server half gave the platform a written policy and a check that runs when a wipe record arrives. That check comes after the wipe, so it can only say a drive was handled wrongly once it has already been erased. No policy decision was made, or recorded, beforehand. Only the station can do that: it is the only thing present when a wipe starts, it is often offline, and it must never be held up by a server that says no. A decision made first is also the evidence an assessor asks for: which policy version, which rule, what was established about the data and the drive, and what was not. The gap was found by mapping a list of requirements drawn from the standard onto the code.
- What changed
- When a wipe is started, the station decides each drive against the sanitisation policy: after its existing refusals, and before it writes the stick's marker for a wipe in progress or starts any erase. The decision goes into that marker and the wipe's record, and names the policy version and where the station got it, the rule applied, the method asked for, and what was and was not established about the data and the drive. The policy is the one fetched from the server, else the stick's copy of the last fetch, else version 1 as shipped on the stick. A copy that does not reproduce its own hashes is treated as no policy, never as an empty one. Deciding reads memory and the stick only, never the network. The check ships in record mode: it records every decision and refuses nothing. An enforce mode, which refuses the whole request before anything is written, is built and tested but not switched on. A stick's setting can tighten the mode, never relax it. Version 1 approves any of the station's five erase methods, so today the decision changes no wipe.
- How it was fixed
- The server's decision rules are TypeScript; the station runs Python and must decide alone, so it carries its own copy. Two copies of one rule drift, so both run the same hand-written fixture, about eleven thousand inputs, comparing codes, never sentences. Where the station cannot see what classification the server will use, such as when the wipe will be filed under a lot it cannot see, it decides under each candidate it can name, keeps the strictest answer and records what it weighed. That lot could hold a stricter class still; that is left to the server's own checks after the wipe. Version 1 has no classifications, so this changes nothing today. Record mode was chosen because station and server decisions have not yet been compared on real wipes. A review by AI agents from three angles sent 21 findings to sceptical re-checks: 17 were confirmed, 14 distinct problems, all fixed, and four were refuted. The most serious-looking said a decision made without knowing the classification is filed as an approval that the release check then counts as a prior decision. Three sceptics refuted it; a narrower form is kept as an open question, dormant under version 1. 24 deliberate faults were planted one at a time, and a test failed for each.
- Improvements
- Each drive's decision is made after the station's existing refusals and before anything is written, and it rides in the stick's marker for a wipe in progress as well as the record, so in the automated tests a wipe whose outcome is lost still files the decision made before it
- The station's Python copy of the decision rules and the server's copy run one shared fixture, so a change to either copy that changes one of the fixture's answers fails a test; the station's fixed constants are also compared with the server's to the byte
- A policy copy that fails its hash check is never read as an empty or partial policy: the station falls back to the next source; with none left, or if its own check faults, record mode still lets the wipe run and records that nothing was decided
- Not yet proved on real hardware, among other things: writing the policy copy to a real stick, what real controllers report as a drive's type, and fetching the policy from the live server. Decisions from the stick's copy or the shipped version cannot be set up at the bench, so automated tests are their only proof
- Merged on 10 October 2026 in record mode: the check refuses nothing, and enforce is not switched on. It reaches a station only when its stick is next synced, and none of it has run on real hardware; a bench test is written, not run. All 60 station test suites passed in a local replay of the pipeline
A drive left password-locked can no longer pass as wiped
A drive's built-in secure erase needs a temporary password. The station now makes the drive itself confirm that password is gone, and fails the wipe if it cannot.
- The problem
- A SATA drive will only run its built-in secure erase once a password has been set on it, so the station sets a temporary one, runs the erase, and removes it again. When the erase failed, the station sent the command that removes the password and never looked at whether it had worked. A drive with a password still set stays unlocked until it is next switched off, so the fallback overwrite ran normally, read back clean, and the drive was recorded as wiped — eligible for a certificate. At its next power-on it would have come up locked, with a password its new owner does not know. The data was gone, so the erasure claim was true; the claim that the drive was ready for reuse was not. This was found by reading the code after the previous fix, not from a returned drive.
- What changed
- Every path that may have set the password now ends by asking the drive, and the drive must answer that its security is not enabled. A removal that fails is retried once. If the password still cannot be shown to be gone, the wipe is recorded as failed — so the drive gets no certificate — and the operator is told on screen that the drive may be locked, and how to unlock it. A password the drive arrived with is never guessed at: each wrong attempt counts towards the drive's own lock-out.
- How it was fixed
- The choice was between failing the wipe and recording it as wiped with a caveat. A wipe recorded with a caveat still gets a certificate; a failed wipe gets none. The release check draws the same line: a caveat is a caution, a failed wipe is a blocker. A lock the station itself put on a drive comes off in a minute at the bench, so the drive goes back, is unlocked and is wiped again for a clean record. The overwrite still runs first, so no data is left on a drive that might be mishandled later. To test it, the simulated drive now remembers whether a password is set and reports it exactly as hdparm 9.65 does — checked by feeding the real program constructed drive-identity data, since no drive in that state was to hand. New test modes make the removal fail, fail once, or report success while the password stays. Those tests fail against the old engine in 44 places and pass against the new one.
- Improvements
- A drive that would lock at its next power-on is recorded as a failed wipe and never certified, with the reason on the screen and in the record
- The command's exit status is not taken as the drive's answer: the password counts as removed only when the drive itself reports it
- A password the drive already had is never guessed at, so the station cannot run down the drive's lock-out counter
- All 60 station test suites pass. The change was merged on 10 October and reaches the stations with their next update; a bench test is written to prove on a real drive that a good erase is not failed by the new check and that the drive does not lock after a full power-off; a removal that fails cannot be caused on demand, so that path is proven by the simulated tests only
Drives without the enhanced erase now get their own secure erase
One misread line in the drive's own report sent every such drive down the slowest erase path. The station now reads that report line by line, and records "could not check" instead of guessing when a drive does not answer.
- The problem
- Before erasing a SATA drive, the station asks it which secure-erase commands it supports. A drive without the stronger "enhanced" erase answers with the line "not supported: enhanced erase" — and the station searched the answer for "supported: enhanced erase", which that line also contains. So every such drive was sent an erase it does not have. It refused; a temporary drive password had been set and cleared around the refusal; and the station fell back to overwriting the whole drive, which takes hours longer on a large disk. The recorded erasure level was still correct, so no certificate claimed too much — but these drives never got the erase they do support. Separately, when a drive could not be queried at all, the record said it did not support the command: a claim about the drive that nothing had checked.
- What changed
- The station now matches the drive's answer one whole line at a time, so the "not" line can no longer read as support. A query that fails or comes back empty is recorded as "could not be checked", never as "not supported" — on the screen, in the record and on the certificate.
- How it was fixed
- The tests had passed for the wrong reason: their simulated drive answer left the "not" line out entirely, the one case where the faulty search happens to give the right result. The simulated answers were rewritten to match real hdparm 9.65 output, tabs and all, checked against the tool's own binary rather than written from memory. That check turned up one more quiet case: hdparm can print nothing but its header and still report success, so the station now looks at what came back, not only at the exit status. The new tests fail against the old engine and pass against the new one, and the engine's version was raised and its code fingerprint re-pinned, so every erasure record names the build that wrote it.
- Improvements
- SATA drives without the enhanced erase get their own built-in secure erase instead of an hours-long overwrite, with no password set around a command bound to fail
- A drive that cannot be queried is recorded as unchecked, following the station's rule that a check which could not run is never read as a negative
- Simulated drive output now copies the real tool where it matters, with regression tests that fail on the old code
- All 60 station test suites pass. The fix was merged on 10 October and reaches the stations with their next update; a bench test on a real drive is written for the next station run
No black or white flashes during boot
From the laptop maker's logo to the audit console, the station now shows its own artwork the whole way through.
- The problem
- A boot filmed on a Dell laptop showed about ten seconds of black screen between the firmware logo and the splash, and then a white browser window — with its address bar — flashing up before the console appeared. An operator reads a black screen as a crashed machine, and the white flash looked like an error.
- What changed
- The boot loader now paints the artwork from its first moment, and the kiosk browser's own window is drawn dark until the console has rendered.
- How it was fixed
- The boot loader (GRUB) sets the artwork as its graphics background the instant it switches into graphics mode, and hands that same framebuffer to the kernel, so the picture stays on screen while the system loads. Console logging on the boot entry was quietened so a routine firmware warning cannot clear the screen before the splash takes over. The white flash turned out to be the browser's own window rather than the page, so page settings could not reach it; a browser-chrome stylesheet now paints the window charcoal and makes the toolbar transparent. The console page itself is pixel-for-pixel unchanged.
- Improvements
- On the filmed boot, twelve seconds that used to be black now show the artwork, and the splash takes over with no gap
- No white window or browser toolbar before the console appears
- Each fix proven frame by frame — the boot loader in an emulator, the browser recorded at ten frames a second — before it reached real hardware
- Rolled out to every station stick, with each stick's previous boot configuration kept for a one-step restore
4K display support
The audit console now fills high-resolution laptop screens at a readable size.
- The problem
- On a 13-inch 4K laptop the console appeared as a small window in the top-left corner of a black screen, with text about a third of its normal size — too small to run an audit with.
- What changed
- The kiosk now recognises the browser's main window by what it is rather than by its size, and scales the page for high-density panels.
- How it was fixed
- The station's kiosk session has no window manager, so a small helper resizes the browser to fill the screen. It only resized windows that already covered most of the screen — and on a 4K panel the browser opens at about a third of it, so it was taken for a pop-up and left alone. The helper now identifies the browser's main window directly, while still never touching menus, dialogs or secondary windows. Separately, nothing told the browser the panel was high-density, so the page is now scaled to lay out as it would on a 1080p screen: twice the size on 4K, unchanged on ordinary screens.
- Improvements
- The console fills any resolution, from 1366×768 to 8K
- Readable text on 4K panels, with ordinary screens left exactly as they were
- Reproduced and verified with a real browser on an emulated 4K display before the fix shipped
- Automated tests for the window rules and the scaling, including the failure cases
New boot and shutdown screens that fit any display
Redesigned splash artwork, with a live progress bar at start-up and a spinning ring at shutdown.
- The problem
- The new artwork showed progress frozen at 70%, which on every boot and every shutdown reads as a hung machine — and the station boots on hardware of every resolution and shape, so a fixed-size picture would fill only part of many screens.
- What changed
- The frozen indicators were painted out and replaced with live, animated ones, and the artwork is scaled to cover whatever screen the machine has.
- How it was fixed
- The splash runs on Plymouth's script engine, which reads the screen size at boot: the artwork is scaled to cover the display without stretching, and the logo and text are never cropped. The progress bar is redrawn live in the place the design put it, and the shutdown ring is pre-rendered into 72 rotation frames so the animation costs nothing per frame.
- Improvements
- Rendered with the real boot-splash engine at nine screen sizes, from 800×600 to 4K, before deployment
- Live indicators instead of a misleading frozen percentage
- A matching fallback screen if the primary splash engine cannot load
The problem
Devices arrive for disposition already wiped. That is good for the client and inconvenient for the process: with no operating system there is nothing to run an inventory agent on, so every specification has to be typed in by hand from a label that may not exist. Meanwhile the erasure step — the part with legal weight — was being recorded as an assertion rather than performed and proven.
Research
I worked through what a live Linux environment can actually see without an installed OS: DMI tables for machine identity, lscpu for processor topology, sysfs for battery, TPM and UEFI state, lspci for graphics and network, and smartctl for drive health and wear. The gap analysis was as valuable as the capability list — operating system build, BitLocker state, BIOS password status and EDID display data are frequently unreadable on a wiped, live-booted unit, and I chose to omit those fields rather than guess at them.
Challenges
- 01
Verification has to be method-aware
An overwrite should read back as zeros; a cryptographic erase leaves ciphertext and never will. Verifying both the same way would either fail every crypto erase or pass every failed overwrite. The tool samples the start, middle and end of each drive after an overwrite, and falls back to a full zero-overwrite and re-verify if a fast erase does not read clean — while recording a crypto erase as controller-confirmed instead.
- 02
A locked drive is worse than an unwiped one
ATA secure erase sets a password before erasing. If that password is still on the drive when the station is done, the drive locks at its next power-on and is effectively bricked. The implementation handles the frozen-state case explicitly and removes the password on every way out, retrying once. It then asks the drive itself: a drive that cannot be shown free of the password is recorded as a failed wipe, never certified, so a failure degrades to 'not erased' rather than 'unusable'. A password the drive arrived with is never guessed at; it goes on the wipe record instead.
The solution
The tool boots unattended via SystemRescue's autorun, reads its credentials and target from a config file beside it, and asks the operator only what it genuinely cannot infer — which purchase lot the device belongs to. It builds a nested hardware profile, optionally erases the internal drives, verifies the erase, and posts the result. Every erase command targets exactly one device explicitly; there is no autonuke path that could take a whole bus with it. USB, removable and SD media are excluded structurally, so the boot stick can never be a target.
Result
Field-tested on real machines across Dell and Lenovo hardware. The capture path is reliable enough that devices are now created in the inventory system directly from the audit, rather than being registered by hand first — and the same pass produces the erasure record that the compliance certificate is generated from.
What I took from it
Documentation describes what a standard permits, not what a drive implements. An NVMe SSD that reported no crypto erase via FORMAT supported it via SANITIZE.
Destructive tools should be hard to misfire and easy to abort. Two gates, single-device commands, structural exclusion of removable media.
Write for the operator you actually have. The console guidance had to be explicit, one command at a time, and safe against spaces in paths.