今日升級一臺上個世紀的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命令,交換機從新啟動恢復到正常狀態。