今日升级一台上个世纪的cisco 3500XL交换机,从网上找到了一个IOS文件3M左右,哪个文件是3550系列的.刷完后开机直接进入到switch:状态,一下心就凉了。
  从晚上找到一些资料开始试这恢复IOS(幸亏升级前备份了IOS),下面是恢复时候遇到的问题:
  网上介绍通过COPY命令恢复输入 copy xmodem:flash:c3500XL-c3h2s-mz-120.5-XW.bin
总是报错.后来发现是我的命令格式有问题,输入 copy xmodem: flash:c3500XL-c3h2s-mz-120.5-XW.bin 在xmodem:后面我没有跟空格.正确输入命令后。
出现如下提示:
Begin the Xmodem or Xmodem-1K transfer now...
我用的是SecureCRT,从菜单选择传输(T)从下拉菜单中在选发送xmodem(N)之后找到自己的IOS文件,开始通过XMODEM接收IOS文件,收了不到5分钟就提示空间不够 ..........flash:c3500XL-c3h2s-mz-120.5-XW.bin: no space .
  通过dir  flash:命令查看发现之前写的IOS还在里面而且占用了很多空间,直接在switch:下输入?显示如下:
      switch: ?
           ? -- Present list of available commands
        boot -- Load and boot an executable p_w_picpath
         cat -- Concatenate (type) file(s)
        copy -- Copy a file
      delete -- Delete file(s)
         dir -- List files in directories
  flash_init -- Initialize flash filesystem(s)
      format -- Format a filesystem
        fsck -- Check filesystem consistency
        help -- Present list of available commands
 load_helper -- Load and initialize a helper p_w_picpath
      memory -- Present memory heap utilization information
       mkdir -- Create dir(s)
        more -- Concatenate (display) file(s)
      rename -- Rename a file
       reset -- Reset the system
       rmdir -- Delete empty dir(s)
         set -- Set or display environment variables
      set_bs -- Set attributes on a boot sector filesystem
   set_param -- Set system parameters in flash
       sleep -- Sleep a specified number of seconds
        trap -- Cause a software breakpoint to occur
 -- MORE --
                   type -- Concatenate (type) file(s)
       unset -- Unset one or more environment variables
     version -- Display boot loader version
里面有个delete命令,开始用此命令试着删除原来的IOS文件 c3550-i5q3l2-mz.121-8.EA1c.bin
输入下面命令并根据提示选择了Y,结果提示拒绝删除,
delete c3550-i5q3l2-mz.121-8.EA1c.bin
Are you sure you want to delete "c3550-i5q3l2-mz.121-8.EA1c.bin" (y/n)?y
File "c3550-i5q3l2-mz.121-8.EA1c.bin" not deleted -- permission denied
开始还以为是和以前DOS一样文件被加属性了不让删,再次用"?"查看命令里面是否带有取消文件属性的命令,结果没有。这时不知道那里来的灵感突然想到哪个文件是放在flash里面的我在delete里面加入flash试试,成功的删除了IOS
delete flash:c3550-i5q3l2-mz.121-8.EA1c.bin
Are you sure you want to delete "flash:c3550-i5q3l2-mz.121-8.EA1c.bin" (y/n)?y
File "flash:c3550-i5q3l2-mz.121-8.EA1c.bin" deleted
从新执行copy命令选择之前备份的IOS,由于是通过consle写入速率只有9600比较慢等待了大概30分钟左右写入完毕。
在switch:下输入boot命令,交换机从新启动恢复到正常状态。