cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
310
Views
0
Helpful
3
Replies

Seem to be in a bit of a loop. Unable to login, unable to flash_init

I seem to have got myself in a bit of a pickle while configuring a switch.

So I ended up just issuing a reset command thinking I could start over... Oops

After the reboot; I could no longer login at all. (Bad username and password) Also the switch still has the hostname I gave it. I thought this would have been removed after the reset???

So, I restart it holding down the mode button to go to ROMON mode so I can reset the password however its not accepting flash_init

It seems I have few command in this mode as shown in this output:

switch: version

System Bootstrap, Version 17.12.1r [FC3], RELEASE SOFTWARE (P)
Compiled Mon 07/10/2023 04:38:53 by rel

Current ROMMON image : Primary
C9200L-24P-4G platform with 2097152 Kbytes of main memory

switch:
switch: flash_init
Error: command 'flash_init' not found. Use 'help' to list commands.
switch: help
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
arp Dump or Clear ARP Table
boot Load and boot an executable image
cat Display text content from a file
copy Copy a file
dir List filesystems or a directory on a filesystem path
help List command information
history Show command history
idprom Show idprom data
ping Ping use ICMP protocol to get an ICMP ECHO_RESPONSE from host
ping6 Ping use ICMP protocol to get an ICMP ECHO_RESPONSE from host
reset Reset entire system
set Set an environment variable value
unset Unsets an environment variable
version Show sboot version and runtime info

-------------------------------

Hers the dir contents of flash:

switch: dir flash:

Attributes Size Name
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-rw-r--r-- 336 lateshutdown.log
-rw-r--r-- 2056 vlan.dat
drwxrwxrwx 4096 SHARED-IOX
-rwxr-xr-x 0 mode_event_log
drwxrwxrwx 4096 .prst_sync
drwxr-xr-x 4096 .installer
drwxr-xr-x 4096 .rollback_timer
drwxr-xr-x 4096 core
drwxr-xr-x 4096 .USWAP
drwxr-xr-x 4096 .CRFT
-rw-r--r-- 999 bootloader_evt_handle.log
drwxrwxrwx 4096 gs_script
drwxr-xr-x 4096 tech_support
drwxr-xr-x 4096 dc_profile_dir
drwxr-xr-x 4096 EDScisco
-rw-r--r-- 2162 boothelper.log
-rw-r--r-- 137940 memleak.tcl
drwxr-xr-x 4096 Tbot
drwxr-xr-x 4096 sys_report
drwxr-xr-x 4096 fp_cc_crash
drwxr-xr-x 4096 .rommon_sync
lrwxrwxrwx 13 NVRAM -> /flash1/NVRAM
-rw-r--r-- 1338 DigiCertGlobalRootCA.ca
-rw-r--r-- 1924 ISRGRootX1CrossSignDST.ca
-rw-r--r-- 1606 StarfieldServicesRootCA.ca
-rw-r--r-- 1261 Baltimore.ca
drwxr-xr-x 4096 pcap
-rw-r--r-- 2162 boothelper.log.old
drwxr-xr-x 4096 .dbpersist
-rw-r--r-- 15325 rdope_out.txt
-rw-r--r-- 89 rdope.log
drwxr-xr-x 4096 onep
drwxr-xr-x 4096 pnp-info
drwxr-xr-x 4096 license_evlog
-rw------- 0 dope_hist
-rw-r--r-- 2097152 nvram_config
-rw-r--r-- 2097152 nvram_config_bkup
drwxr-xr-x 4096 pnp-tech
-rw-rw-rw- 4917 packages.conf
-rw-rw-rw- 406425600 cat9k_lite-rpbase.17.09.04a.SPA.pkg
-rw-rw-rw- 44255443 cat9k_lite-rpboot.17.09.04a.SPA.pkg
-rw-rw-rw- 5636096 cat9k_lite-srdriver.17.09.04a.SPA.pkg
-rw-rw-rw- 14860288 cat9k_lite-webui.17.09.04a.SPA.pkg

Any help would be appreciated!

 

 

 

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

you do not need in the later version of IOS XE and New cat 9300 

Below steps work for me all time :

Cat 9300 Password recovery : (if you not added username or you locked yourself)

Power cycle the switch by removing the power cord from switch. Press Mode button. Hold the button till you see switch:

Switch:

Add the following variables.

Switch: SWITCH_IGNORE_STARTUP_CFG=1 (this should be CAPS, Lower one ignores)

Then boot the switch.

Switch: boot

Once the switch has booted you can copy the saved config back into the running config.

Switch# copy start running

Next set your password(s). Finally we want to remove the variables we set while in Boot Loader.

Switch# no system ignore startupconfig switch all

Save your new config.

Switch# copy runn start

Switch# reload

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

3 Replies 3

shambhu.kumar
Level 1
Level 1

Step 1
Ignore the startup configuration with the following command:

Switch: SWITCH_IGNORE_STARTUP_CFG=1

Step 2
Boot the switch with the packages.conf file from flash.

Switch: boot flash:packages.conf

Step 3
Terminate the initial configuration dialog by answering No.

Would you like to enter the initial configuration dialog? [yes/no]: No

Step 4
At the switch prompt, enter privileged EXEC mode.

Switch> enable
Switch#

Step 5
Copy the startup configuration to running configuration.

Switch# copy startup-config running-config Destination filename [running-config]?

Press Return in response to the confirmation prompts. The configuration file is now reloaded, and you can change the password.
Step 6
Enter global configuration mode and change the enable password.

Switch# configure terminal
Switch(config)#

Step 7
Write the running configuration to the startup configuration file.

Switch(config)# copy running-config startup-config

Step 8
Confirm that manual boot mode is enabled.

Switch# show boot

BOOT variable = flash:packages.conf;
Manual Boot = yes
Enable Break = yes

Step 9
Reload the device.

Switch# reload

Step 10
Boot the device with the packages.conf file from flash.

Switch: boot flash:packages.conf

Step 11
After the device boots up, disable manual boot on the device.

Switch(config)# no boot manual

balaji.bandi
Hall of Fame
Hall of Fame

you do not need in the later version of IOS XE and New cat 9300 

Below steps work for me all time :

Cat 9300 Password recovery : (if you not added username or you locked yourself)

Power cycle the switch by removing the power cord from switch. Press Mode button. Hold the button till you see switch:

Switch:

Add the following variables.

Switch: SWITCH_IGNORE_STARTUP_CFG=1 (this should be CAPS, Lower one ignores)

Then boot the switch.

Switch: boot

Once the switch has booted you can copy the saved config back into the running config.

Switch# copy start running

Next set your password(s). Finally we want to remove the variables we set while in Boot Loader.

Switch# no system ignore startupconfig switch all

Save your new config.

Switch# copy runn start

Switch# reload

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Leo Laohoo
Hall of Fame
Hall of Fame

Post the complete output to the command "set".

Review Cisco Networking for a $25 gift card