Chinaunix首页 | 论坛 | 博客
  • 博客访问: 186720
  • 博文数量: 30
  • 博客积分: 4115
  • 博客等级: 上校
  • 技术积分: 930
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-11 10:02
文章分类

全部博文(30)

文章存档

2010年(3)

2009年(20)

2008年(7)

我的朋友
最近访客

分类: 系统运维

2009-06-26 14:48:05

   今天在升级cisco2610路由时,由于中途断电,导致系统ios文件损坏,因而造成无法启动,只要启动就进入rommon模式。
   那么在这种模式下怎么样去恢复ios文件呢,有两种方法:一是通过网线使用tftp方式;二是通过console口用xmodem方式。
   1,通过tftp方式
首先运行Cisco TFTP Server,把2600的IOS文件放到TFTP默认目录下。
然后远去 meminfo命令,查看系统内存有多大(注意,在2600系列中,2610默认是32mb,所以2610的ios文件大小不超过10mb,一般在5mb多)
 
在 rommon 状态下输入:(注意大小写)

rommon 1 >IP_ADDRESS=192.168.0.1(路由器的ip地址,即连接电脑的网口)

rommon 2 >IP_SUBNET_MASK=255.255.255.0(路由器的掩码)

rommon 3 >DEFAULT_GATEWAY=192.168.0.2(网关,是pc机的ip地址)

rommon 4 >TFTP_SERVER=192.168.0.2(是pc机的ip地址)

rommon 5 >TFTP_FILE=c2600-i-mz.120-7.T.bin(上传文件的名称)

rommon 6 >sync(保存)

rommon 7 >set(查看)

rommon 8 >tftpdnld(传送文件)出现提示选择y

pc机的设置:

ip地址 192.168.0.2

掩码 255.255.255.0
 
网关 192.168.0.1
2,通过xmodem方式
 
rommon 1 > confreg 回车

Configuration Summary

enabled are:

load rom after netboot fails

console baud: 9600

boot: image specified by the boot system commands

or default to: cisco2-C2600

do you wish to change the configuration? y/n [n]: y (选择 yes)

enable "diagnostic mode"? y/n [n]: n (选择 no)

enable "use net in IP bcast address"? y/n [n]: n (选择 no)

disable "load rom after netboot fails"? y/n [n]: n (选择 no)

enable "use all zero broadcast"? y/n [n]: n (选择 no)

enable "break/abort has effect"? y/n [n]: n (选择 no)

enable "ignore system config info"? y/n [n]: n (选择 no)

change console baud rate? y/n [n]: y (选择 yes)

enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400

4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7 (选择 7,用最大的115200速率的xmodem传输)(如果这里选择的9600,时间就多几倍,一般15mb得5个小时左右,所以建议这个地方修改成115200)

change the boot characteristics? y/n [n]: n (选择 no)

Configuration Summary

enabled are:

load rom after netboot fails

console baud: 115200

boot: image specified by the boot system commands

or default to: cisco2-C2600

do you wish to change the configuration? y/n [n]: n (选择 no)

You must reset or power cycle for new config to take effect

rommon 2 > reset 回车

注意:在此时键入 reset键之前,修改超级终端里设置速率为115200,记住,一定这么做!否则出现乱码! 然后关闭这个超级终端,重新建立一个超级终端连接,(期间系统重新启动)启动后,出现

rommon 1> 提示符

然后,输入

rommon 1> xmodem -r

Do not start the sending program yet...

Invoke this application only for disaster recovery.

Do you wish to continue? y/n [n]: y (选择 yes)

Ready to receive file ...

此时,在超级终端的菜单上的“传送”---“发送文件”----选择IOS镜像文件所在地以及选择使用“xmodem”协议,点击“发送”即可

然后等待10-20分钟左右就把3-6M的IOS灌进去了!

注:通过这二种方法重灌成功后正常进入系统后,需要用tftp方式再重新上传一次,因为这种方式上传后只是保存在系统内存中,重新启动后又会丢失。
 
通过上面两种方法上传成功后,以rommon模式下输入:confreg 0x2102
 
否则以后每次启动都会进入到rommon模式,然后中通过远行boot命令才能正常启动。
 
 
阅读(948) | 评论(0) | 转发(0) |
0

上一篇:Linux命令 一句话

下一篇:OUTLOOK错误号解析

给主人留下些什么吧!~~