C9300 not saving the config after a reboot

After configuring the C9300 switch, can successfully save the config using “write mem” or “copy run start”, but after a reboot switch will go back to factory-default configuration.

This happens when there was password recovery and the command “Switch: SWITCH_IGNORE_STARTUP_CFG=1” was ran.

Fix it by running the following commands:

! tested successfully on ver. 17.x.x
(config)# no system ignore startupconfig switch all
! command below only works on ver 16.x.x or older
(config)# switch all config-register 0x102
# copy run start
# reload

Reference:s

Understand Configuration Register Usage on all Routers – Cisco