Cisco Password reset … Unable to stat flash: error

When recovering a Cisco 3650 a flash error can occur. If you ever have to recover a Cisco 3650 switch password there are some good instructions on the Cisco web site on how to do this. However, part of the process involves accessing file(s) on the flash memory of the switch. Occasionally you might run into a problem when attempting to access the flash memory. The switch may report “unable to stat flash:/: invalid” argument. For example when you type


[shell] dir: flash


you may receive an error which says


[shell] unable to stat flash:/: invalid argument


This means the flash has not been initialized correctly. Simply typing in the command “flash” will begin the inisilization and allow you to access the flash memory. See below for a full out put from an effected switch.


[shell] switch: load_helper

switch: dir flash:
unable to stat flash:/: invalid argument

switch: flash
Initializing Flash…
flashfs[0]: 359 files, 5 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 7138816
flashfs[0]: Bytes available: 25375232
flashfs[0]: flashfs fsck took 7 seconds.
…done Initializing Flash.
Boot Sector Filesystem (bs) installed,
Setting console baud rate to 9600…

switch: dir flash:
Directory of flash:/

2 -rwx 1482 config.text.renamed
3 -rwx 5 private-config.text.renamed
364 drwx 192 c3750-ipbase-mz.122-25.SEB4
5 -rwx 556 vlan.dat
6 -rwx 27 private-config.text
7 -rwx 26768 conf