startup-config messed up.

ZoomerZoomer Member Posts: 126
This is probably a very dumb question, but if someone screwed up the startup-config (wrong configuration, etc) and saved it is there any way to reboot the switch into it's original default configuration? Like holding down the mode button for 7 seconds?

I'm new to Cisco devices. icon_confused.gif

Comments

  • xwesleyxwillisxxwesleyxwillisx Member Posts: 158
    Power off the switch. While holding the mode button plug the power back in. This bypasses the normal boot sequence and gets you into ROMmon mode. From there you can either erase the config stored in flash or rename it. If you rename it and reboot the switch you can keep the config.

    I'm assuming there is a password on the device you don't know?
  • tech-airmantech-airman Member Posts: 953
    Zoomer wrote:
    This is probably a very dumb question, but if someone screwed up the startup-config (wrong configuration, etc) and saved it is there any way to reboot the switch into it's original default configuration? Like holding down the mode button for 7 seconds?

    I'm new to Cisco devices. icon_confused.gif

    Zoomer,

    As far as configuration files go, there are at least two types: 1) startup-config 2) running-config. The startup-config file is used when the networking device is physically being powered up. Then the startup-config file is loaded into RAM and becomes the current running-config. At this point, both startup-config and running-config are identical.

    Now, in order for "...someone [to] screw...up the startup-config..." that someone would also have to have "...screwed up..." the current running-config also. That's because you can't directly edit the startup-config file. You can configure/modify the running-config then copy the running-config file from RAM to the startup-config file in NVRAM. Now you've got both a "screwed up startup-config" file and a "screwed up running-config" file. Now, once you execute the priviledged mode command of "copy running-config startup-config" then you have overwritten the previous startup-config file. The effect is that in this case, the screwed up startup-config file now becomes the "default configuration" that is used when the networking device is either power cycled or reloaded. So with reference to the "original default configuration" comment, once you overwrite the startup-config file, the previous "original default configuration" file no longer exists so you can't restart the networking device into the "original default configuration" file.

    Now, if the networking device is not a production networking device (in other words it's a practice networking device), you may do the following:
    1. >enable
    2. #erase startup-config
    3. #configuration terminal
    4. (config)#[unconfigure or reconfigure whatever is "screwed up"]
    5. (config#exit
    6. #copy running-config startup-config
    7. #

    Now, you should have a networking device that is "unscrewed up" as far as the running-config goes and also the "screwed up startup-config" is fixed because you fixed the current running-config file which was copied to the startup-config file.

    I hope this helps.
Sign In or Register to comment.