Skip to contentSkip to conversation

doc/README.factory-reset.md: Minor corrections, verification steps and what to look for during factory reset

PATCH [email protected] 1 participant 1 message Feb 9 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Jan,

Any comments on this?

Regards,
Adithya Balakumar
________________________________
From: [email protected] <[email protected]> on behalf of Adithya Balakumar <[email protected]>
Sent: Friday, February 6, 2026 3:29 PM
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: balakumar adithya(TSIP DITC_DIT-OST) <[email protected]>; kunijadar shivanand(TSIP DITC_DIT-OST) <[email protected]>; dinesh kumar(TSIP DITC_DIT-OST) <[email protected]>; onuki koshiro(大抜 倖司朗 □DITC○CPT) <[email protected]>; hayashi kazuhiro(林 和宏 □DITC○CPT) <[email protected]>; [email protected] <[email protected]>
Subject: [cip-dev] [isar-cip-core][PATCH v3] doc/README.factory-reset.md: Minor corrections, verification steps and what to look for during factory reset

From: Adithya Balakumar <[email protected]>

---
 doc/README.factory-reset.md | 40 +++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)
doc/README.factory-reset.md +32 -8
index 729912b..aa8dd1c 100644
@@ -1,18 +1,18 @@
 # Enable Factory-reset
 
 To enable the factory-reset functionality the following two elements need to be installed:
- - initramfs-factory-reset-hook which executes the factory-reset
-  ```
-  INITRAMFS_INSTALL += "initramfs-factory-reset-hook"
-  ```
+- initramfs-factory-reset-hook which executes the factory-reset
+```
+INITRAMFS_INSTALL += "initramfs-factory-reset-hook"
+```
 - factory-reset-helper which provides the helper scripts to set the factory-reset marker
-  ```
-  IMAGE_INSTALL += "factory-reset-helper"
-  ```
+```
+IMAGE_INSTALL += "factory-reset-helper"
+```
 
 ## Technical details
 
-The by executing `set-factory-reset.sh --create` a marker is stored as a EFI variable or on disk (default `/dev/disk/by-partlabel/efi`).
+By executing `set-factory-reset.sh --create`, a marker is stored as an EFI variable or on disk (default `/dev/disk/by-partlabel/var`).
 The marker on disk is intended for devices which do not provide the facilities to set EFI variables.
 The initramfs reads this marker and formats the hard-drives provided by the variable `INITRAMFS_FACTORY_RESET_DEVICES`.
 The initramfs-hook will try to detect the previous used file system and will format the partition with the detected type.
@@ -27,3 +27,27 @@ The removal of the TPM keys can be deactivated by setting the variable `INITRAMF
 As the factory-reset is executed before the disks are unlocked in the initramfs, the file system type must be provided with the
 variable `INITRAMFS_FACTORY_RESET_LUKS_FORMAT_TYPE`. The factory-reset of encrypted partition is not supported with the file based
 marker.
+
+## Verification
+
+- Create a test file in a target partition (ex: `/var`)
+```
+root@demo:~# touch /var/to-be-deleted
+```
+
+- Set the factory-reset marker with the below command:
+```
+root@demo:~# set-factory-reset.sh --create
+```
+
+- Trigger a reboot as factory-reset happens in the initramfs step:
+```
+root@demo:~# reboot
+```
+
+- Factory reset runs during the initramfs. The reset scripts format the target partition with the required filesystem. If disk encryption is enabled, the initramfs scripts also encrypts the target partitions. Both of which can be observed in the boot logs.
+
+- After the reboot, confirm that the test file created in step 1 is deleted.
+```
+root@demo:~# find /var -name "to-be-deleted"
+```

--
2.39.5