Catalyst 2960 シリーズの IOS を復活させる

一言で言うと Catalyst スイッチの設定を消そうとして CF カード内にある IOS も一緒に消しちゃいましたーということです。
本当は delete flash:vlan.dat がしたかった。
フラッシュメモリ内のファイルが全部消えるけどええのんか?って聞かれたんだけど、どうせあっても vlan.dat だろーって思ってたら違った。
CF カードには IOS も入ってる!!!!!!!
ッターンとエンターキーを押して気づいたときには時すでに遅し。

Switch#erase flash:
Erasing the flash filesystem will remove all files! Continue? [confirm]

Using driver version 1 for media type 1
Base ethernet MAC Address: 00:22:bd:89:21:80
Xmodem file system is available.
The password-recovery mechanism is enabled.
Initializing Flash...
mifs[2]: 0 files, 1 directories
mifs[2]: Total bytes     :    3870720
mifs[2]: Bytes used      :       1024
mifs[2]: Bytes available :    3869696
mifs[2]: mifs fsck took 0 seconds.
mifs[3]: 0 files, 1 directories
mifs[3]: Total bytes     :   27998208
mifs[3]: Bytes used      :       1024
mifs[3]: Bytes available :   27997184
mifs[3]: mifs fsck took 0 seconds.
...done Initializing Flash.
done.
Loading "flash:c2960-lanbasek9-mz.150-2.SE8/c2960-lanbasek9-mz.150-2.SE8.bin"...flash:c2960-lanbasek9-mz.150-2.SE8/c2960-lanbasek9-mz.150-2.SE8.bin: no such file or directory

Error loading "flash:c2960-lanbasek9-mz.150-2.SE8/c2960-lanbasek9-mz.150-2.SE8.bin"

Interrupt within 5 seconds to abort boot process.
Boot process failed...

The system is unable to boot automatically.  The BOOT
environment variable needs to be set to a bootable
image.


switch:

以下は復旧の記録。
tar で固めた IOS があるんですが、 boot loader にそんな高等機能はないので tar の中にある bin 取り出してそれを XMODEM 転送しました。

switch: copy xmodem: flash:c2960-lanbasek9-mz.150-2.SE8.bin
Begin the Xmodem or Xmodem-1K transfer now...
C

2016-11-20_21h54_35

...........................................................................................
File "xmodem:" successfully copied to "flash:c2960-lanbasek9-mz.150-2.SE8.bin"
switch: help
           ? -- Present list of available commands
        boot -- Load and boot an executable image
         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
      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 -- Pause (sleep) for a specified number of seconds
        type -- Concatenate (type) file(s)
 -- MORE --
       unset -- Unset one or more environment variables
     version -- Display boot loader version

switch: dir flash:
Directory of flash:/

    2  -rwx  11834880                 c2960-lanbasek9-mz.150-2.SE8.bin

16066560 bytes available (11931648 bytes used)
switch: boot flash:c2960-lanbasek9-mz.150-2.SE8.bin
Loading "flash:c2960-lanbasek9-mz.150-2.SE8.bin"...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
File "flash:c2960-lanbasek9-mz.150-2.SE8.bin" uncompressed and installed, entry point: 0x3000
executing...

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE8, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Thu 14-May-15 02:39 by prod_rel_teamInitializing flashfs...
Using driver version 3 for media type 1
mifs[4]: 0 files, 1 directories
mifs[4]: Total bytes     : 3870720
mifs[4]: Bytes used      : 1024
mifs[4]: Bytes available : 3869696
mifs[4]: mifs fsck took 0 seconds.
mifs[4]: Initialization complete.

mifs[5]: 1 files, 1 directories
mifs[5]: Total bytes     : 27998208
mifs[5]: Bytes used      : 11931648
mifs[5]: Bytes available : 16066560
mifs[5]: mifs fsck took 0 seconds.
mifs[5]: Initialization complete.

...done Initializing flashfs.
Checking for Bootloader upgrade..
Boot Loader upgrade not required (Stage 2)

POST: CPU MIC register Tests : Begin
POST: CPU MIC register Tests : End, Status Passed

POST: PortASIC Memory Tests : Begin
POST: PortASIC Memory Tests : End, Status Passed

POST: CPU MIC interface Loopback Tests : Begin
POST: CPU MIC interface Loopback Tests : End, Status Passed

POST: PortASIC RingLoopback Tests : Begin
POST: PortASIC RingLoopback Tests : End, Status Passed

POST: PortASIC CAM Subsystem Tests : Begin
POST: PortASIC CAM Subsystem Tests : End, Status Passed

POST: PortASIC Port Loopback Tests : Begin
POST: PortASIC Port Loopback Tests : End, Status Passed

Waiting for Port download...Complete


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C2960-8TC-L (PowerPC405) processor (revision A0) with 65536K bytes of memory.
Processor board ID FOC1230U65J
Last reset from power-on
1 Virtual Ethernet interface
8 FastEthernet interfaces
1 Gigabit Ethernet interface
The password-recovery mechanism is enabled.

64K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address       : 00:22:BD:89:21:80
Motherboard assembly number     : 73-10611-07
Power supply part number        : 341-0208-01
Motherboard serial number       : FOC12287J8F
Power supply serial number      : LIT12260BQV
Model revision number           : A0
Motherboard revision number     : C0
Model number                    : WS-C2960-8TC-L
System serial number            : FOC1230U65J
Top Assembly Part Number        : 800-28132-01
Top Assembly Revision Number    : C0
Version ID                      : V01
CLEI Code Number                : COM8A00ARA
Hardware Board Revision Number  : 0x01


Switch Ports Model              SW Version            SW Image
------ ----- -----              ----------            ----------
*    1 9     WS-C2960-8TC-L     15.0(2)SE8            C2960-LANBASEK9-M




Press RETURN to get started!


*Mar  1 00:00:33.839: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
*Mar  1 00:00:34.225: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
*Mar  1 00:00:35.282: %DC-4-FILE_OPEN_WARNING: Not able to open flash:/dc_profile_dir/dc_default_profiles.txt
*Mar  1 00:00:35.282: %DC-6-DEFAULT_INIT_INFO: Default Profiles DB not loaded.
*Mar  1 00:00:55.641: %SYS-5-RESTART: System restarted --
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE8, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Thu 14-May-15 02:39 by prod_rel_team


         --- System Configuration Dialog ---

Enable secret warning
----------------------------------
In order to access the device manager, an enable secret is required
If you enter the initial configuration dialog, you will be prompted for the enable secret
If you choose not to enter the intial configuration dialog, or if you exit setup without setting the enable secret,
please set an enable secret using the following CLI in configuration mode-
enable secret 0 
----------------------------------
Would you like to enter the initial configuration dialog? [yes/no]: no
Switch>en
Switch#
  • Ciscoデバイスの管理 – Catalystスイッチ – xmodemによるIOSのダウンロード