Entering ROMMON Mode
Power ON the switch and the press the MODE Button (1) ONLY when you see “System LED” is rapidly blinking. Pressing and holding the MODE button on startup WILL NOT WORK.
Reference: https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/hardware/install/b_c9300_hig/b_c9300_hig_chapter_01001.html
Setting up manual boot variable
!
config t
!
boot system flash:packages.conf
exit
!
copy run start (or write mem)
!
reload
!
Password Reset
1. Enter ROMMON Mode
Switch:
Switch: SWITCH_IGNORE_STARTUP_CFG=1
Switch: reset
2. Once the switch has booted, copy the Startup-config the Running-config.
Switch>
Switch> enable
Switch# copy start runn
3. From here, you may SET THE NEW PASSWORD or Add new user profile(s)
4. Revert to DEFAULT STARTUP by removing the "ignore startupconfig" variables
Switch# no system ignore startupconfig switch all
Switch# copy runn start
Reference: https://community.cisco.com/t5/switching/c9300-switch-reset-to-factory/td-p/3358278