Factory Reset for Configuration Settings

Adriana Kobylak anoo at linux.ibm.com
Fri Aug 31 04:33:43 AEST 2018


This note is to propose a new Factory Reset implementation to clear out 
configuration settings and restore them to default. The following 
applies for both static and ubi filesystem layouts.

The current Software implementation of the Factory Reset clears the 
whole read-write filesystem[1].
The reset can be problematic for example if it's issued when the host is 
on, since the inventory gets deleted and the fan controller has no 
knowledge if the system has working fans, leading to shutting off the 
host.
This can be unexpected if the user just wants to reset the configuration 
data, like user passwords or LDAP settings.

The /etc dir is intended to contain the configuration files[2], so we 
can implement the configuration reset by clearing out the data in /etc 
and putting back the defaults. The /etc dir is an overlay, so this can 
be accomplished by clearing the overlay's upper dir.

Proposal:
* Move any configuration file that is currently created in /var to /etc, 
like the Time Owner and Reboot Policy (most are currently under the 
Settings interface).
* Have the init script which mounts the overlay, clear the etc upper dir 
before mounting if a u-boot environment variable is set.
* Implement a new Reset method under the path 
/xyz/openbmc_project/settings/ or configuration/ or 
settings/configuration/ or other.


---
[1] 
https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Common/FactoryReset#xyzopenbmc_projectsoftwarebmcupdater

[2] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s07.html



More information about the openbmc mailing list