Verifying initial APT initialization after a restart
Fresh console evidence, an unchanged original plan and read-only initialization-history verification after reboot.
After a restart the server has a new boot ID. The original console confirmation remains evidence of the previous boot, not permission to execute the old plan again. We separately check whether the initial APT initialization survived, using fresh evidence from an independent console.
What this check covers
This is a practical check on a separate local Debian 13 VM. After initial initialization we performed an ordinary restart, signed in again through an independent serial console and confirmed the same machine with a different boot ID. This VM did not receive a cloud-kernel installation or run the complete server setup wizard. Its restart creates the conditions for testing the historical-record reader.
Before reboot we retained the original plan and the independent initialization completion check. After reboot we keep these files and the server journals. A new request file points to fresh console evidence; the rest of the access selection must match the original.
Manually checking owners and permissions
The fixture read all nine paths in one stat invocation; below that invocation and its response are split into two groups. First come the four standard lock files. This command only reads metadata; a file existing does not by itself prove that a lock is currently held.
stat -c '%U:%G %a %n' \
/var/lib/dpkg/lock-frontend \
/var/lib/dpkg/lock \
/var/lib/apt/lists/lock \
/var/cache/apt/archives/lock
The fixture returned:
root:root 640 /var/lib/dpkg/lock-frontend
root:root 640 /var/lib/dpkg/lock
root:root 600 /var/lib/apt/lists/lock
root:root 600 /var/cache/apt/archives/lock
Next we check the five directories prepared for acquiring APT indexes and archives:
stat -c '%U:%G %a %n' \
/var/lib/apt/lists \
/var/cache/apt/archives \
/var/lib/apt/lists/partial \
/var/lib/apt/lists/auxfiles \
/var/cache/apt/archives/partial
The actual response:
root:root 755 /var/lib/apt/lists
root:root 755 /var/cache/apt/archives
_apt:root 700 /var/lib/apt/lists/partial
_apt:root 755 /var/lib/apt/lists/auxfiles
_apt:root 700 /var/cache/apt/archives/partial
Owner and permission values matched before and after reboot. This is a useful manual check, but it does not connect the directories to the original approved plan or verify journal integrity. That requires a separate read of the original records.
Reading historical initialization with the CLI
The CLI receives the original request, a new request carrying current console evidence and the unchanged original plan with its SHA256. The following is a command template: replace values in angle brackets with your own paths and digest, removing the brackets. Secrets remain in the private environment file rather than being passed as argument values.
deploy-cli host image packages init-history-read \
--env-file <PRIVATE_ROOT_ENV> \
--request-file <ORIGINAL_ACCESS_REQUEST> \
--current-request-file <NEW_CONSOLE_ACCESS_REQUEST> \
--plan-file <ORIGINAL_INITIALIZATION_PLAN> \
--plan-sha256 <ORIGINAL_INITIALIZATION_SHA256>
Before connection, the reader checks the same machine, a different boot ID and an identical access selection. The current SSH channel independently checks the current boot identity. Historical records are compared with the original plan; the old boot ID is never presented as the current one.
The reader takes the existing APT/dpkg POSIX locks and checks original intent and completion records, parent-directory identity and lock-file and directory metadata. A busy lock, incomplete journal or changed record stops the read. Package installation, journal repair and repeated initialization are outside this command.
The fixture result
Below are selected fields from the actual JSON response. The original plan and manifest digests remain in the private verification record.
{
"status": "passed",
"write_performed": false,
"action": "initialization-history-verified",
"access_verified": true,
"checks": {
"current_console": "verified",
"historical_bindings": "retained",
"initialization_records": "verified",
"whole_host_ready": "false"
}
}
The completion manifest matched the initial init-verify result from before reboot. Retained server records, their hashes, inodes, modes, owners and mtime matched before and after the read. The command verified historical initialization without writing these files.
Negative checks
Passing the old console evidence instead of the new evidence produced a refusal. Selected fields from that response:
{
"status": "failed",
"write_performed": false,
"access_verified": false
}
We separately tested a changed plan SHA256 and a new request with changed access selection. Both were refused. Ordinary init-verify with the old evidence also refused after reboot. A controlled foreign file in the journal stopped the historical reader; it neither deleted that file nor rewrote the records.
What the result establishes
This success verifies retained initial APT initialization. Complete image acceptance still needs separate checks of installed versions, actual package history, EFI and postboot state. The whole_host_ready value remains false.
On a preceding separate VM, full preparation stopped while fetching indexes because the connection to deb.debian.org timed out. The update was not repeated; its refusal journal was retained and the VM was shut down gracefully. The success shown here comes from a fresh VM used only for postboot initialization checking. It does not establish a completed APT refresh or complete image acceptance.
The illustration below shows a genuine terminal summarizing already saved results. It is a labeled summary rather than raw server command output. Reboot and initialization were not repeated during capture.

