シスコのIOSが起動しないときの対処

最近プロジェクトでIOSが起動せず現場で冷や汗をかいてしまったプロジェクトがあった。

IOSが起動しない、という事象はまず遭遇する経験が少ないため、非常に焦ったのですが、そのときにググりつつなんとか対応できたので、以下に今後のために必要な情報をまとめる。

FlashにあるIOSが起動しなくなってしまったとき

例えば、ブートストラップが起動し、IOSを読み込んでは失敗し、何度も再起動を繰り返してしまうようなことがあるかと思います。そういうときには、RMONを起動することが必要になる。

RMONの起動方法

電源を入れて、起動するまでに、Puttyの場合は、Ctrl+Breakコマンドを連打します。

Breakコマンドは通常のキーボードにはないので、念の為USBキーボードを持参しておきましょう。

もしなければ、Teratermで以下を試してください。

Alt-b

各ソフトごとのキー配置はこちらで確認できます。

https://www.cisco.com/c/en/us/support/docs/routers/10000-series-routers/12818-61.html

RMON起動後は、、以下のコマンドで次回にブートストラップではなく、いきなりRMONを起動するようにする。

rommon 7> confreg
Configuration Summary
enabled are:
console baud: 9600
boot: the ROM Monitor
do you wish to change the configuration? y/n [n]: y
enable “diagnostic mode”? y/n [n]: y
enable “use net in IP bcast address”? y/n [n]:
enable “load rom after netboot fails”? y/n [n]:
enable “use all zero broadcast”? y/n [n]:
enable “break/abort has effect”? y/n [n]:
enable “ignore system config info”? y/n [n]:
change console baud rate? y/n [n]: y
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400 [0]: 0
change the boot characteristics? y/n [n]: y
enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system
[0]: 0
Configuration Summary
enabled are:
diagnostic mode
console baud: 9600
boot: the ROM Monitor
do you wish to change the configuration? y/n [n]:
You must reset or power cycle for new config to take effect

enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system

この部分で確実に0を入力すること。

こうすることで壊れたIOSではなく、RMONを自動的に起動することになる。

reset後に、IOSの起動ファイルを変更する。

正常なIOSファイルをコピーする

rmonでもcopyコマンドが利用できる。そのため、正常なIOSファイルをUSBなどからFlashにコピーする。

copy usb0: bootflash:

その後、そのIOSを起動するようにする。

boot bootflash:

自動的に指定したIOSが起動するので以下のコマンドでRMONではなく、ブートストラップが起動するように戻す。

confreg 0x2101
wr

これで一旦通常通りのIOSが起動できるようになる。

使う頻度は少ないがいざというときにかなり役に立つ。


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *