Today I had to update a 3560x but when I consoled into the switch it was at Boot Loader prompt (switch:) and I wasn’t sure so I tried to boot and this is what happened.
switch: boot Loading "flash:/c3560e-universalk9-mz.122-53.SE2/c3560e-universalk9-mz.122-53.SE2.bin"...flash:/c3560e-universalk9-mz.122-53.SE2/c3560e-universalk9-mz.122-53.SE2.bin: no such file or directory Error loading "flash:/c3560e-universalk9-mz.122-53.SE2/c3560e-universalk9-mz.122-53.SE2.bin" Interrupt within 5 seconds to abort boot process. Boot process failed... The system is unable to boot automatically. The BOOT environment variable needs to be set to a bootable image.
I would like to show you how to recover a Cisco switch (ex. 3560x/3750x) from Boot Loader prompt (switch:) because from my experience the documentation I found on Cisco is incorrect or I am really stupid for not able to understand.
Here what I think is incorrect in the documentation and else where they copy pasted the instructions without verifying it.
Step 8 Start the file transfer by using TFTP.
a. Specify the IP address of the TFTP server:
switch: set IP_ADDR ip_address/mask
The above statement “Specify the IP address of the TFTP server” in the documentation is incorrect as I have repeatedly failed transferring the file and the reason is because it should have said “Specify the IP address of the Switch Managment Interface“.
So follow the steps below if you are also trying to recover the switch from boot load using TFTP to transfer file. If you like to use USB flash drive to transfer image to the flash click here.
Method 1: Transferring IOS image using TFTP
Step 1: Console into the Switch.
Step 2: Connect your Labtop (or TFTP Server) to the back port of the Switch (10/100TX, next to console/serial port) via Straight cable.
Note: I was using my Mac book and activated TFTP on it. You can do the same on your windows or mac laptop if you don’t have a separate TFTP Server.
Step 3: Initialize flash:
switch: flash_init
Step4: Initialize Management Interface
switch: mgmt_init
Step5: Assign IP address/Subnet Mask of the Management Interface (Not TFTP Server, which is mentioned in the Cisco documentation and is an error.) and default gateway. Make sure the variable are set in the same format below.
switch:
set IP_ADDR ip_address/maskswitch:
set DEFAULT_ROUTER ip_address Example: switch: set IP_ADDR 10.1.100.2/255.255.255.0 switch: set DEFAULT_ROUTER 10.1.100.1
Note: After setting the variable you can check simply by typing “set“. If you make a mistake just type “unset” and the variable. (ex. unset IP_ADDR)
Step6: Once the correct image is transferred to your Laptop/TFTP server you can enter:
switch:
copy tftp://TFTP_Server_IP_Add/IOS_image_filename.bin flash:IOS_image_filename.bin
Example:
switch: copy tftp://10.1.100.3/c3560e-universalk9-mz.122-53.SE2 flash:c3560e-universalk9-mz.122-53.SE2
Note: After flash: you need to specify full file name or else it will not accept.
If your attempt failed you will get the following message after a long wait.
connection timed out
If your attempt was successful you will see following.
.......................................................................................................................................... File "tftp://10.1.100.3/c3560e-universalk9-mz.122-53.SE2" successfully copied to "flash:c3560e-universalk9-mz.122-53.SE2"
Method 2: Transferring IOS image using USB Flash drive.
Before creating this post I didn’t know the Boot Loader (Rommon) mode supports USB flash drive, until a gentle man (Leo) on Cisco forum share this little secret that’s not mention in Cisco docs. The steps as as below. (Thanks to Leo L. & Muhammad Y. for these instructions on Cisco Forum: Source, I haven’t tested this method yet so I am not 100% if this works.)
Step 1: Take a USB of any size, format it using FAT16.
Step 2: Copy a valid IOS to the USB drive.
Step 3: Insert USB to your Router/Switch.
Step 4: Reset you Router/Switch.
Step 5: Enter following comman
switch: dir usbflash0:
Step 6: Once you verify that it has detected the flash you can boot router/Switch using the following command
switch: boot usbflash0:IOS_name.bin
Note: In case it’s not accepting the USB drive, try formatting it to 256 MB. Also “boot usbflash0:” is not only hidden but you might need to upgrade the router’s Bootstrap before you can use the command. Newer switches, like the 2960X/X, 3650 and 3850, and ISR G2s now support this command.
I hope I have covered every step here. Please leave a comment and let me know if there is anything you feel is incorrect and if this have helped you or not.
If the above didn’t resolve your issue. Please also look at this blog post.
Thanks for sharing this.
Superb blog! Do you have any tips for aspiring writers?
I’m planning to start my own website soon but I’m a little lost on everything.
Would you recommend starting with a free platform like
Wordpress or go for a paid option? There are so many options out there that I’m totally
overwhelmed .. Any recommendations? Many thanks!
Thanks man,..
its working good..
Awesome! You’re a lifesaver!
many thanks it’s working very will
switch: set IP_ADDR 192.168.10.1/255.255.255.0
switch: set DEFAULT_ROUTER 192.168.10.4
switch: copy tftp://192.168.10.4/c2960-lanbasek9-mz.122-50.SE5 flash:c2960-lanbasek9-mz.122-50.SE5
tftp://192.168.10.4/c2960-lanbasek9-mz.122-50.SE5: no such device
I use the same command but am steel having problem “NO such device”
my laptop / tftp server 192.168.10.4 255.255.255.255.0 with flash file-c2960-lanbasek9-mz.122-50.SE5
gateway is my laptop IP address Am trying to use 192.168.10.1
Please need your help…
This i wrote after i recovered a ws-3750G-12s that “suffered” a “format flash” command which erased everything.
Follow this procedure, using transfer on console port.
Xmodem Recovery:
1.Speed Up Xmodem Recovery – “switch: set BAUD 115200” (with 9600 was estimated 3hrs, with 115200 was only about 30 min for a 7.7MB file)
(restart the console program with new settings chosen)
2.Start Xmodem IOS file Tranfer – “switch: copy xmodem: flash:c3750-advipservicesk9-mz.122-25.fz.bin”
3.If you use HyperTerminal, on top of the window, choose Transfer > Send File then browse to the file and select it (i assume you have this, otherwise google it and download the bin file – NOT tar- for your device) , also on protocol (in the browse window) choose “xmodem” then “send”. Transfer will start, but is going to take a lot of time.
4.Issue the show version command in order to verify the file, if is OK, proceed to next step otherwise retry transfer
5.Boot the new image that you just copied by issuing the “boot flash:filename” command
6.After the Xmodem recovery, set the BAUD rate back to 9600. If the set BAUD 9600 command does not bring the baud rate to 9600, issue the unset BAUD command in order to bring the baud rate to a default value of 9600 bps.
have a problem with my switches Cisco 3750 in stack.
I made a mistake and deleted flash. ( del /force /recursive flash:c3750-ipbase-mz.122-25.SEE2.bin )
Now, I haven’t a startup config.
Switches is active and I and I’m afraid to go turn off
I did write memory !!!
I have a backup … how to flash back
Help
mgmt._init is an unknown command.
God bless you man, I accidentally hosed my companies 2960 switch while on loan. Tried everything under the sun. This was the only method that worked for me. Thabks again.
How long does it take to load the file from a USB?
Pingback: How to recover a Cisco Switch from Boot Loader | Pramod The Network Guy
Hi,
By mistake I have erased the flash from erase flash on cisco catalyat 3560.
After that I tried many timess to load the image in flash from zmodem through hyper terminal but found I/O error every time.
I tried with tftp also but could not load image .
Please help me to load the image as I want full step to recover it as I new in this domain
Regards
Pratik
Hi,
I have tried all the method recommanded in this chapter ”
“Recover from a 3850 Series Switch Boot Failure” from here :
http://www.cisco.com/c/en/us/support/docs/switches/catalyst-3850-series-switches/117552-technote-cat3850-00.html#anc19
Still not possible to get the install mode. Have you any other idea or a procedure to format all the File System ?
I have a file with my commands and log results. Let me know of to upload it…
Thanks for attention and your help
Excellent Document.. appreciate for this wonderful effort ..
Appreciating the time and effort you put into your website and detailed information you present.
It’s good to come across a blog every once in a while that isn’t the same unwanted rehashed
information. Fantastic read! I’ve saved your site and I’m including your RSS
feeds to my Google account.
Hi could you please help me out here
switch: flash_init
Initializing Flash…
…The flash is already initialized.
Setting console baud rate to 9600…
switch: mgmt_init
Unknown cmd: mgmt_init
switch: set IP_ADDR 10.32.238.70/255.255.252.0
switch: set DEFAULT_SWITCH 10.32.238.72
switch: copy tftp://10.32.238.71/c3750-ipbasek9-mz.122-55.SE11.bin flash:c3750-ipbasek9-mz.122-55.SE11.bin
tftp://10.32.238.71/c3750-ipbasek9-mz.122-55.SE11.bin: no such device
Nice list. One more thing to “expand” the options… Some newer routers and switches may have an additional slot for CF card. So, boot image may be copied to empty compact flash on another router, then inserted into the failing router, and booted from another filesystem.
Another option – sometimes it may be faster to disassemble router (especially modular switches or ASA), re-format and copy working image on another device, and then re-install it.
I see your blog needs some unique content. Writing manually is
time consuming, but there is solution for this hard task.
Just search for – Miftolo’s tools rewriter
What you composed was very reasonable. However, consider this, what if
you added a little content? I ain’t saying your content isn’t good, but what if you added a headline that makes
people desire more? I mean How to recover
a Cisco Switch from Boot Loader | Unolution | Blog is a little plain. You should peek at Yahoo’s front page and note how they create
news headlines to grab viewers to click. You might
add a video or a picture or two to grab people interested about everything’ve
got to say. In my opinion, it would bring your blog a little bit more interesting.
Thank you. TFTP saved me from xmodem. Don’t have small USB drive.
I see you don’t monetize your website, don’t waste your traffic, you can earn additional
cash every month because you’ve got hi quality content.
If you want to know how to make extra money, search for:
best adsense alternative Wrastain’s tools
It’ѕ veгy simple to find out any topic on web as compaгed to books, as I found this post at this web
ѕite.
Hi everyone, i have switch 2960 x series, the problem is not boot, i cant have access to CLI. On switch there is green light an also orange line bilinging. help me pls.
I see you don’t monetize your page, don’t waste your traffic, you
can earn extra cash every month because you’ve got hi quality content.
If you want to know how to make extra bucks, search for: Boorfe’s tips best adsense alternative
Thanks a lot, fortunately I was just experimenting in the lab environment, but I was getting really frustrated with all the manuals online not having the correct commands. I started xmodem transfer in the end which was taking ages, and while waiting for it to finish I found your blog. Tftp is so much faster 😉
I have checked your website and i have found some duplicate content, that’s why you don’t rank high in google’s search results, but there is a tool that can help you to create 100% unique content, search for: Boorfe’s tips unlimited content
Hello
Many Cisco switches and routers use slightly different commands .. some you will see your added tftp commands and some switches you do not find them when in switch: (rommon) mode.
Some older Cisco switches do not even support TFTP commands in rommon mode. Then X modem or Zmodem with increased baud rate is the only option.
Now i have a 3560CG (new small 8 rj45 compact switch that has a erased flash.
I try the above commands but cannot get a interface up ..
This small switch does not have a mngmt interface.. so i am stuck. Any ideas ?
switch:
switch: set IP_ADDR 10.0.1.10/255.255.255.0
switch: set DEFAULT_ROUTER 10.0.1.1
switch: e0_init
Unknown cmd: e0_init
switch: g0_init
Unknown cmd: g0_init
switch: set
BOARD_CONFIG_REV=0
BOOT=flash:/c3560c405ex-universalk9-mz.150-2.SE5/c3560c405ex-universalk9-mz.150- 2.SE5.bin
CLEI_CODE_NUMBER=CMMD900ARC
DEFAULT_ROUTER=10.0.1.1
IP_ADDR=10.0.1.10/255.255.255.0
MAC_ADDR=0C:F5:A4:84:D8:80
MODEL_NUM=WS-C3560CG-8PC-S
MODEL_REVISION_NUM=G0
MOTHERBOARD_ASSEMBLY_NUM=73-13272-08
MOTHERBOARD_REVISION_NUM=A0
MOTHERBOARD_SERIAL_NUM=FOC18416BHP
POWER_SUPPLY_PART_NUM=341-0407-01
POWER_SUPPLY_SERIAL_NUM=LIT18390M1S
SDM_TEMPLATE_ID=0
SWITCH_PRIORITY=1
SYSTEM_SERIAL_NUM=FOC1842Z1CS
TAN_NUM=800-33676-03
TAN_REVISION_NUMBER=E0
VERSION_ID=V03
I have noticed you don’t monetize your website, don’t waste your traffic, you can earn extra cash every month because you’ve
got hi quality content. If you want to know how to make extra money, search
for: Ercannou’s essential tools best adsense alternative
Hi
Amazing!
I am not sure the place you’re getting your information,
however great topic. I must spend some time learning much more or working
out more. Thanks for wonderful info I was on the lookout
for this info for my mission.
Thanks on your marvelous posting! I seriously enjoyed reading it, you happen to be a great author.
I will ensure that I bookmark your blog and will come back in the foreseeable future.
I want to encourage you to ultimately continue your
great work, have a nice weekend!
which interface is the manegment interface ? what do i do to know that on different switches ?
I see you don’t monetize unolution.com, don’t waste your traffic, you can earn additional bucks
every month with new monetization method. This is the
best adsense alternative for any type of website (they approve all websites), for more
details simply search in gooogle: murgrabia’s tools
Pingback: Cisco Switch: Upgrading Firmwares & Recovering from Failed ones ! | Syed Jahanzaib Personal Blog to Share Knowledge !
This Error come on switch startup
flashfs[0]: 0 files, 1 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 1024
flashfs[0]: Bytes available: 32513024
flashfs[0]: flashfs fsck took 7 seconds.
…done Initializing Flash.
done.
Loading “flash:/c3750-ipbasek9-mz.122-58.SE2/c3750-ipbasek9-mz.122-58.SE2.bin”.. .flash:/c3750-ipbasek9-mz.122-58.SE2/c3750-ipbasek9-mz.122-58.SE2.bin: no such f ile or directory
Error loading “flash:/c3750-ipbasek9-mz.122-58.SE2/c3750-ipbasek9-mz.122-58.SE2. bin”
Interrupt within 5 seconds to abort boot process.
Boot process failed…
The system is unable to boot automatically. The BOOT
environment variable needs to be set to a bootable
image.