您的位置:首页 > 移动开发 > IOS开发

Cisco Catalyst 交换机一直处于rommon模式无法启动IOS问题的解决

2012-06-28 18:29 513 查看
发现Cisco Catalyst交换机重启一直处于Rommom模式下,执行Confreg命令选择启动模式为1(从第一个文件启动)时,系统一直重启,无法进入正常界面。enter to boot:0 = disable autoboot1 = the first file from internal flash device2 = commands specified in 'BOOT' environment variable[2]: 1
分析认为可能IOS文件损坏或者被清除,或者启动未找到正确的IOS。若IOS损坏或被清除,则需要从新导入一个IOS到flash,从网上查得有两种方法,一种是TFTP上传,一种是XMODEM方式上传,XMODEM上传比较慢,需要几个小时。TFTP上传是先设置系统变量,然后执行tftpdnld命令,但是发现这个交换机没有tftpdmld命令。后来发现XMODEM命令也不支持。于是只有考虑把flash卡拔下来,放到别的交换机里导入IOS。不过还是先看看flash里有没有IOS再说吧。
检查flash里的IOS。在Rommom模式下输入命令:dir bootflash: 显示flash上的文件,果然第一个文件不是正确的IOS文件,第二个才是正确的IOS文件。这下就容易多了。
用confreg命令设置启动模式为2,然后手动从正确的IOS启动:rommon 2 >boot bootflash:cat4000-is-mz.121-11b.EWRommon reg: 0x30004180Running diags......
等启动完了,进入了IOS界面,于是修改启动参数:Switch>enableSwitch#dir bootflash:查看当前的启动参数:Switch#show bootvar
开始配置:Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#no boot system flash bootflash:cat4000-is-mz.121-8a.EwSwitch(config)#boot system flash bootflash:cat4000-is-mz.121-11b.EWSwitch(config)#end
保存在查看:Switch#write memorySwitch#show bootvarBOOT variable = bootflash:cat4000-is-mz.121-11b.EW,1CONFIG_FILE variable does not existBOOTLDR variable does not existConfiguration register is 0x2102
[/b]参考文档:[/b]http://www.cisco.com/en/US/products/hw/switches/ps663/products_configuration_example09186a0080094ecf.shtml
[/b]相关错误输出:**********************************************************
* *
* Welcome to Rom Monitor for WS-C4948 System. *
* Copyright (c) 2003-2007 by Cisco Systems, Inc. *
* All rights reserved. *
* *
**********************************************************Rom Monitor Program Version 12.2(31r)SGA1
Supervisor: WS-C4948 Chassis: WS-C4948
Hardware Revisions - Board: 6.0 CPLD: 5 Dagobah: 226
MAC Address : 00-1e-be-38-06-ff
Ip Address : Not set.
Netmask : Not set.
Gateway : Not set.
TftpServer : Not set.
Main Memory : 256 MBytes***** The system will autoboot in 5 seconds *****
Type control-C to prevent autobooting.
. . . . .******** The system will autoboot now ********
config-register = 0x2102
Autobooting using BOOT variable specified file.....Could not find a valid file in BOOT environment variable.
BOOT variable can be set from IOS. To find currently set
Rom Monitor variables, please type 'set' command.For help on choosing a boot method, type 'confreg' command.
本文出自 “小何贝贝的技术空间” 博客,请务必保留此出处http://babyhe.blog.51cto.com/1104064/912072
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐