How to recover a Cisco Switch from Boot Loader

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

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/mask
switch: set DEFAULT_ROUTER ip_address

switch: set IP_ADDR
switch: set DEFAULT_ROUTER

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

switch: copy tftp:// 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://" 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.

37 thoughts on “How to recover a Cisco Switch from Boot Loader

  • By adam - Reply

    Thanks for sharing this.

  • By flash drive rescue - Reply

    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!

  • By hareesh - Reply

    Thanks man,..

    its working good..

  • By tech - Reply

    Awesome! You’re a lifesaver!

  • By Alheeshi - Reply

    many thanks it’s working very will

  • By Abiadha Massawe - Reply

    switch: set IP_ADDR

    switch: set DEFAULT_ROUTER

    switch: copy tftp:// flash:c2960-lanbasek9-mz.122-50.SE5
    tftp:// no such device

    I use the same command but am steel having problem “NO such device”
    my laptop / tftp server with flash file-c2960-lanbasek9-mz.122-50.SE5
    gateway is my laptop IP address Am trying to use
    Please need your help…

    • By Marius Rotundu - Reply

      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.

  • By s - Reply

    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

  • By Anonymous - Reply

    mgmt._init is an unknown command.

  • By andrew - Reply

    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.

  • By Nick - Reply

    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

  • By Pratik - Reply


    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


  • By DImitri - Reply

    I have tried all the method recommanded in this chapter ”
    “Recover from a 3850 Series Switch Boot Failure” from here :
    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

  • By Ak - Reply

    Excellent Document.. appreciate for this wonderful effort ..

  • By Ecio - Reply

    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.

  • By Raj - Reply

    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

    switch: set DEFAULT_SWITCH

    switch: copy tftp:// flash:c3750-ipbasek9-mz.122-55.SE11.bin
    tftp:// no such device

  • By Headset Adapter Co. - Reply

    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.

  • By RyanWolcotth - Reply

    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

  • By server bootrom - Reply

    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.

  • By David - Reply

    Thank you. TFTP saved me from xmodem. Don’t have small USB drive.

  • By 86Virgilio - Reply

    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

  • By valley - Reply

    It’ѕ veгy simple to find out any topic on web as compaгed to books, as I found this post at this web

  • By Harsil - Reply

    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.

  • By FirstJenifer - Reply

    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

  • By jakub - Reply

    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 😉

  • By MatthewSmall - Reply

    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

  • By Tim - Reply


    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: set IP_ADDR

    switch: set DEFAULT_ROUTER

    switch: e0_init
    Unknown cmd: e0_init

    switch: g0_init
    Unknown cmd: g0_init

    switch: set
    BOOT=flash:/c3560c405ex-universalk9-mz.150-2.SE5/c3560c405ex-universalk9-mz.150- 2.SE5.bin

  • By BestGerman - Reply

    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

  • By philip - Reply


  • By round plunge pools - Reply


  • By Kevin - Reply

    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.

  • By Maricruz - Reply

    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!

  • By Aymen - Reply

    which interface is the manegment interface ? what do i do to know that on different switches ?

  • By BestAnton - Reply

    I see you don’t monetize, 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 !

  • By Muhammad Sadaqat - Reply

    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.
    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

Leave a Reply

Your email address will not be published. Required fields are marked *
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>