Skip down to the research record

LUKS2 records to log before a laptop reimage: 3 entries

Quota Forecast Editorial Team · Published · 12 min read

Before a Linux laptop with an encrypted disk is reimaged, log its LUKS2 format, its key slots, and a header backup.

Key takeaways

  • Read the LUKS2 format and cipher from the disk itself, not from an old note.
  • List every key slot with its holder's role and the decision made for it.
  • Keep a header backup off the laptop, with its file name and the date it was made.
  • Get a written note from IT before the reimage is approved.

When a sales rep leaves, the laptop usually goes back to IT to be wiped and handed to someone new. On a Linux machine with an encrypted disk, the wipe is the last step in a longer chain. Before it starts, a few facts about the encryption need to be settled, because a reimage removes the disk contents and nobody can inspect them afterward.

The stakes are practical. A sales laptop often holds customer contacts, saved email, exported reports, and sometimes stored log-ins. A reimage is meant to clear all of that. The encryption choices made at setup shape what the wipe actually removes, and those choices are often known only to whoever configured the machine, who may have left the firm too.

This post covers three records to make before a reimage. Each one lines up with an example in the cryptsetup manual page, the reference for managing dm-crypt and LUKS volumes on Linux. We follow one invented case through all three so the steps stay concrete. Your IT team's change process and your own setup will differ, so treat this as a list of questions, not a procedure to run.

This guide is for the revenue leader who is asked to approve a reimage and wants to know what should exist first. No Linux background is needed to follow it. For the limits a wipe can hit before a rep device is reissued, see wipe limits to check before reissuing a rep device.

The case we will follow

The case is invented. A rep worked for a small firm on a Linux laptop. Its data disk is encrypted with LUKS, and the device is /dev/sdX, the same name the cryptsetup manual uses in its first example. The rep has left, and the firm plans to hand the laptop to a new hire after a reimage.

The laptop is the kind of machine a revenue team depends on. It has a calendar synced to it, a saved set of contacts, and a browser signed in to tools the firm pays for. Those accounts live on the vendors' servers, not on the disk, so the wipe does not touch them. That question is outside this post.

Earlier, IT added a second passphrase to key slot 5 so a spare person could unlock the disk in an emergency. The rep never knew. Nobody noted which key slots were in use, and nobody kept a copy of the disk's header.

The timeline is ordinary. The rep gave notice, the manager told IT, and the laptop came back to the office in a bag with a charger. Nobody on the IT side opened the encryption settings, because the laptop booted and asked for a passphrase the way it always had. That is the usual way this goes wrong: the machine works fine, so nobody looks underneath it.

The rest of the post takes the three records in order. Each section says what the record holds and why it matters before the laptop is wiped.

Log 1: The format version

The first example in the manual creates a LUKS2 container on a block device. This post assumes that format, so the first line of the log is the format version of the disk as it sits today. Read it from the disk itself, not from an old install note or from memory.

The line should hold four things: the device name, the format version, the cipher and mode in use, and the date and person who read it. In our case the disk reports LUKS2, and the cipher is noted beside it. The cipher matters because it bears on the key slots in the next section.

Keep the device name paired with the format. Device names can shift when a laptop is opened, docked, or has a disk swapped. A name copied from an old note may point to a different disk entirely, so the pair is the reliable identifier.

The format also decides which of the manual's steps apply, and a wrong guess sends the team down the wrong path on wipe day. The manual says a device can be converted between LUKS1 and LUKS2 format "if possible." If the disk turns out to be LUKS1, do not fold a conversion into the reimage. A conversion changes the disk, so it belongs in a planned change with a backup already in hand.

The manual also says "LUKS2 uses locks, other formats do not use this mechanism." Note whether another tool was using the device when the format was read. Our reading came from an idle device, which kept the result clean.

Tools that read the disk have platform limits of their own. Support rules differ from tool to tool, so the format should come from the disk itself, not from whatever helper happens to be installed.

A reading that is unclear is a gap, and the entry should say so plainly. Nothing else should be built on it until IT has looked again.

Some laptops are not encrypted at all. If there is no LUKS container on the device, the other two logs change. There are no keys or headers to describe, but the entry should still say so, so the wipe plan is not built on an assumption.

Log 2: Key slots and their holders

The second example adds a passphrase to key slot 5. The lesson for the log is the idea behind that example. One LUKS container can hold several passphrases, each in its own key slot, and the person whose passphrase is being retired may not be the only one who can unlock the disk.

The manual's note on key sizes is blunt: the key data is "only 128/256/512 bits of key data depending on used cipher and mode." Two disks can therefore differ even when they run the same tools, which is why the cipher from Log 1 belongs on the same page as the slot list.

In our case, slot 5 holds the spare passphrase IT added earlier. If the encrypted volume survives the reimage, for example to keep the rep's files for the firm, that spare still opens it. Whether the volume survives depends on how IT runs the reimage, so the entry should state which path was chosen.

Slot 5 is a useful example because it was added on purpose. Entries often miss deliberate additions like this one, since they were made for a good reason and then forgotten. Treat every slot as a decision someone made, and find the reason behind each one.

A passphrase tied to a person is easy to name. One added for a shared purpose, such as an emergency spare, needs a named role and an owner who will still be at the firm after the departure. Otherwise the entry just moves the problem somewhere else.

Each key slot entry needs four fields:

  • the slot number and whether it is in use;
  • who holds the passphrase, described by role;
  • whether the passphrase belongs to the departing rep;
  • what was decided for the slot, and who approved it.

A short answer such as "IT" is not enough for the last field. Name the decision and the approver, so the next reader can see why a slot was left alone or changed.

A list built from memory tends to miss deliberate additions like slot 5, which is why the list has to come from the disk itself. Someone who was not in the room should be able to read each entry and understand what the slot is for, who can use it, and whether it should survive the wipe. If an entry needs its original author to explain it, the entry is not finished.

Any slot without a named owner is an open question for IT before the wipe, not after it. The reimage waits until every slot has an entry.

Log 3: The header backup

The third example creates a LUKS header backup and saves it to a file. The manual describes the result this way: "Stores a binary backup of the LUKS header and keyslot area." The backup is only useful if it exists before the wipe and can still be read afterward.

Because the file contains the keyslot area, treat it as sensitive. Two rules follow:

  • Keep it off the laptop being reimaged. A copy on a disk that gets wiped is gone with the disk.
  • Limit who can read it, and keep passphrases somewhere else.

The location deserves the same care as the laptop. A backup on a shared drive that many people can open is a weaker place than a locked folder limited to a few named people. Pick the location with the access list in mind, not as an afterthought.

The entry for this log holds the file name, where the file is stored, when it was made, and who can open it. A file that cannot be found on wipe day is no better than no file at all, so the entry should say where to look.

In our case, no backup existed. The laptop had run without one for as long as anyone could say, and that gap is what this log exists to catch.

Take the backup while the disk is idle and before anyone starts the reimage. If a key slot is added or removed after the backup is made, the old file no longer matches the disk, and a new one is needed.

Why the order matters

The three logs come in a set order for a reason. The format decides which steps apply. The key slots decide who can open the disk. The header backup comes last because it has to match the disk as it stands after any slot changes. Reading them out of order can leave a backup stale and make the slot list harder to trust.

When the logs get written

The departure is usually known well before the laptop comes back. Starting the three logs then, rather than on wipe day, leaves room for questions. By the wipe date the disk may already be in a box, the person who set up encryption may have moved on, and the answers are harder to find. Decisions about key slots are also easier to make calmly, before anyone is in a hurry.

What a weak entry looks like

A weak entry is easy to spot once you know the pattern. It says "encrypted" without naming a format. It lists a passphrase as "IT's" without naming a role. It says a backup "should exist" rather than giving a location and a date. Each line looks finished, and each one fails the first time someone needs it.

What one log entry looks like

A good entry is short and specific. For our case, the entries would read like this:

FieldEntry
Device/dev/sdX, the encrypted data volume
Format and cipherLUKS2, cipher noted on the same log line
Read byIT, device idle; read 2026-11-02 (illustrative)
Key slot 5Spare passphrase, cleared before handover; IT lead's decision and approval noted
Header backupIllustrative file header-backup.img, made 2026-11-02; kept off the laptop; viewable by the IT lead and the revenue leader

Each row answers one question a later reader would ask.

Who handles what before the wipe

Several people touch this job, and the logs only work if each one knows their part.

RoleWhat they handle
Revenue leaderApproves the reimage once the three entries exist, and holds the date until then
ITReads the format and slots from the disk, decides each slot, stores the backup, and runs the wipe
Rep's managerNames the accounts and files the rep used, so IT knows what the laptop may have held
Account ownerCloses the rep's account access in its own step, rather than assuming the wipe covers it

How our case ends

In the case we followed, the three entries changed the plan. The format reading showed LUKS2 on an idle device, so no conversion was needed. The slot list showed slot 5 holding IT's spare passphrase, which the rep never knew about. The header backup did not exist, so IT made one once the format and slot entries were written.

IT then decided what to do with slot 5 and cleared it before the laptop went to the new hire. Because the slot changed, the first backup no longer matched the disk, so IT made a fresh one and stored it on a firm system with access limited to the IT lead and the revenue leader. The reimage went ahead only after those entries were in place.

The lesson is small. Nothing in the case required a new tool or a clever trick. It required three facts about the disk, pinned down before a wipe that could not be undone.

Had the entries been skipped, the team would have wiped a disk nobody could describe. The spare passphrase would have stayed a surprise, and the firm would have had no copy of the header to fall back on.

What this post leaves out

This post does not cover how to close a departed rep's accounts, how to set up a replacement laptop, or what employee data rules apply where you work. Those need their own steps and owners, and they belong on the same checklist so that nothing depends on the wipe to finish it. For mail from a departed rep, see Departed rep's mail: 3 steps to save deal evidence.

What to ask IT before the reimage

This is where the post asks IT for a written note, and it matters most here. You do not need to run any commands yourself. Your job as the revenue leader is to make sure the three entries exist before anyone signs off on the reimage. Ask IT for a short written note that covers:

  • the format version and cipher from Log 1, and any conversion plan;
  • the key slot list, with IT's decision for each slot;
  • the header backup's location, its access list, the date it was made, and confirmation that the file is present and not empty.

Test the note with a few plain questions:

  • Which device was read, and when?
  • Which key slots are in use, and who can unlock with each one?
  • Where is the header backup, and who can open it?
  • Does any part of this depend on the wipe to finish?

If a question has no answer, IT should say so in writing rather than leave the gap unstated. After the wipe, ask for one line confirming that the reimage ran against the device named in the entries. That line connects the records to the outcome.

The UK National Cyber Security Centre's small organisations guide says: "Protect your business with the NCSC’s cyber security tips on backups, protecting your devices and accounts, and spotting scams." How it fits your own rules is a question to settle locally. Its advice on backups and devices still fits this job. A reimage is the point where a missing backup becomes permanent.

Once all three entries are on file, the reimage can go ahead. Until then, it should wait. A wipe cannot be undone, and these entries are what anyone would compare against afterward.

Next step today

Today, ask IT to read the format and the key slots from the disk, and to write each on one line with the device name and the date.

Sources