public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add data-reset to initramfs
@ 2025-04-24  9:22 Quirin Gylstorff
  2025-04-24  9:22 ` [PATCH 1/2] initramfs: add hook for data-reset Quirin Gylstorff
  2025-04-24  9:22 ` [PATCH 2/2] add data-reset hook to cip-core-initramfs Quirin Gylstorff
  0 siblings, 2 replies; 8+ messages in thread
From: Quirin Gylstorff @ 2025-04-24  9:22 UTC (permalink / raw)
  To: cip-dev, jan.kiszka

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This adds an initramfs hook to delete all data from the persistent
partitions.

This will reset the device identity `/etc/machine-id` and all
other information stored in the overlay.


I didn't call it factory-reset as it does not clean the encrypted
data partition. This would require:
- deleting all TPM data
- reformatting the encrypted partitions

Also it does not delete snapshots from btrfs or similar devices.


Quirin Gylstorff (2):
  initramfs: add hook for data-reset
  add data-reset hook to cip-core-initramfs

 .../cip-core-initramfs/cip-core-initramfs.bb  |  1 +
 .../files/local-bottom-complete.tmpl          | 76 +++++++++++++++++++
 .../initramfs-data-reset-hook_0.1.bb          | 36 +++++++++
 3 files changed, 113 insertions(+)
 create mode 100644 recipes-initramfs/initramfs-factory-reset-hook/files/local-bottom-complete.tmpl
 create mode 100644 recipes-initramfs/initramfs-factory-reset-hook/initramfs-data-reset-hook_0.1.bb

-- 
2.47.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-04-30  5:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24  9:22 [PATCH 0/2] Add data-reset to initramfs Quirin Gylstorff
2025-04-24  9:22 ` [PATCH 1/2] initramfs: add hook for data-reset Quirin Gylstorff
2025-04-28  6:35   ` Jan Kiszka
2025-04-28  8:23     ` Quirin Gylstorff
2025-04-28  9:03       ` Jan Kiszka
2025-04-29 12:30         ` Quirin Gylstorff
2025-04-30  5:11           ` Jan Kiszka
2025-04-24  9:22 ` [PATCH 2/2] add data-reset hook to cip-core-initramfs Quirin Gylstorff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox