1. Reload the switch

2. Hit “Ctrl+B” as the switch boot up to enter extended boot menu

3. From the menu select 5(Restore to factory default configuration)

4. If “Password recovery capability is enabled”. you could not perform a factory reset. You will have to disable the function first.

5. Reload the switch and enter the command below to disable password recovery.
undo password-recovery enable

6. reload the switch and hit “Ctrl+B” when switch boot up to enter extend boot up menu

7. From the menu select 5(Restore to factory default configuration)
8. Wait the switch being restore to factory default

If I could login to device with a password, i wouldnt need a factory reset using boot menu.
This is useless.
I’ll try to do another lab to reset if password was lost and update this post. My guess is that a fresh firmware install will be the way if password was lost.