Knowledge Base

Bare Metal Recovery Walkthrough

Bare Metal Recovery Walkthrough

Resurrecting Datacenters

Disaster recovery is not merely about having backups; it is about the speed and reliability of the restoration process. When a server's physical hardware fails completely, restoring the operating system, boot partitions, and data onto a completely blank machine (Bare Metal Recovery - BMR) is traditionally fraught with driver issues, partition misalignments, and bootloop failures.

StateWarden’s BMR V2 architecture eliminates this friction.

We do not just restore files; we reconstruct the underlying geometry of the disk, automatically adapt to target environments, and execute intelligent, priority-based EFI fixups to guarantee the system boots successfully on the first attempt.

This tutorial walks you through executing a full Bare Metal Recovery using our Kiosk Mode Recovery ISO.


1. Preparing the Recovery Media

The StateWarden Recovery ISO is a lightweight, purpose-built Alpine Linux environment designed exclusively to run the StateWarden Agent in a standalone Recovery Mode.

Step 1: Download the Kiosk ISO

  1. Log in to the StateWarden Dashboard.
  2. Navigate to your Realm Settings or the Downloads section.
  3. Download the latest sw-recovery.iso.

Step 2: Boot the Target Machine

  1. Flash the ISO to a USB drive using Rufus/BalenaEtcher, or attach it directly to a virtual machine hypervisor (e.g., Proxmox, VMware).
  2. Boot the target machine from the ISO.

The ISO will load directly into the StateWarden Recovery TUI (Text User Interface), bypassing standard OS configuration steps entirely. You will be presented with an immediate prompt for a Recovery Token.

2. Generating a BMR Token

For OpSec reasons, you do not log in to the Recovery ISO with a username and password. Instead, you authorize the specific recovery task securely from the Dashboard using a time-limited BMR Token.

  1. On a secure workstation, open the StateWarden Dashboard.
  2. Navigate to Devices -> select the specific Device you need to restore.
  3. Click on the BMR Restoration tab or action button.
  4. Select the specific backup snapshot you wish to deploy.
  5. Click Generate BMR Token.

Security Note: The token is mathematically bound to the selected backup, valid only for 24 hours, and can only be used once. It securely transports the decryption key (via the PrimeKEM engine) down to the isolated Recovery Agent without exposing it to the user.

3. Executing the Restoration

Return to the machine running the Recovery ISO.

Step 1: Authenticate the Agent

  1. Type or paste the generated BMR Token into the Recovery TUI.
  2. The Agent will authenticate with the Control Plane (Artemis), verify the token, and securely retrieve the required Master Key via our Zero-Knowledge architecture.

Step 2: Select the Target Disk

  1. The TUI will display the disks currently attached to the blank machine (e.g., /dev/sda, /dev/nvme0n1).
  2. Select the destination drive.

Warning: BMR is a destructive process. All existing data and partition tables on the selected target disk will be irreversibly overwritten.

Step 3: The "Zero-Skip" Advantage

Once confirmed, the Agent begins streaming the deduplicated chunks from the Data Plane (Driad).

During this process, StateWarden employs BMR Zero-Skip technology. The Agent analyzes the block stream; if a chunk consists entirely of zeros (unallocated space on the original drive), it utilizes BLKDISCARD/PUNCH_HOLE logic to skip the physical write operation entirely. This drastically accelerates the restoration time and prevents massive, unnecessary write-wear on target SSD/NVMe drives.

4. Post-Restoration and EFI Fixups

As the data transfer completes, StateWarden performs the critical "Last Mile" steps that traditional solutions fail at:

  1. Partition Table Reconstruction: The Agent accurately restores the original GPT/MBR structures.
  2. Priority-Based EFI Fixups: The Agent analyzes the restored ESP (EFI System Partition). Instead of blindly relying on NVRAM variables (which do not exist on the new motherboard/VM), it automatically reconstructs the bootloader paths (bcdboot equivalents, GRUB configuration) to ensure the system firmware recognizes the OS.
  3. Completion: The TUI will display RESTORE_SUCCESS.

5. Resuming Operations

  1. Remove the USB drive or detach the ISO from the VM.
  2. Reboot the machine.

The system will boot identically to its state at the time of the backup. The OS, applications, and data are accurately intact, ready for production.


StateWarden: Resilience Engineered.

Was this article helpful?