LoginSignup
0
1

More than 1 year has passed since last update.

BackupImageで起動したJUNOSの修復方法

Posted at

JUNOSがBackupImageで起動した際の表示

JUNOSが破損した場合、BackupImageで起動します。
その際、以下のような表示がされます。

image.png

WARNING: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE
It is possible that the primary copy of JUNOS failed to boot up properly, and so this device has booted from the backup copy.
Please re-install JUNOS to recover the primary copy in case it has been corrupted.

プライマリパーティーションにインストールされているJUNOSが破損した事により、バックアップ(alternate)パーティーションのJUNOSが起動しています。

JUNOSを復旧する

JUNOSを復旧するには、以下の2つの手順を踏みます

  1. プライマリパーティーションの復旧
  2. JUNOSのアップデート

この記事について

以下の記事を清書したものになります。
内容は当時(2015.02.12)のものとなります。
https://blog.mikalab.info/archives/644271.html

環境

Juniper EX2200-48T-4G

パーティーションの復元

現在起動しているバックアップパーティーションを、プライマリパーティーションにコピーします。
以下のコマンドを実行します
request system snapshot media internal slice alternate

root@:RE:0% cli
root> request system snapshot media internal slice alternate
Formatting alternate root (/dev/da0s1a)...
Copying '/dev/da0s2a' to '/dev/da0s1a' .. (this may take a few minutes)
The following filesystems were archived: /

パーティーションの確認

以下のコマンドで、パーティーションの状態を確認します。
show system storage partitions

root> show system storage partitions
Boot Media: internal (da0) ←SRX/EX内部のUSBマスストレージ
Active Partition: da0s1a ←プライマリのパーティーション
Backup Partition: da0s2a ←バックアップ(alternate)のパーティーション
Currently booted from: backup (da0s2a)
(中略)
root>

プライマリパーティーションからのリブート

最後に、JUNOSをリブートします。
明示的にプライマリパーティーションから起動するよう、オプションを付与します。
request system reboot slice alternate media internal

root> request system reboot slice alternate media internal
Reboot the system ? [yes,no] (no) yes
(中略)
*** FINAL System shutdown message from root@ ***
 
System going down IMMEDIATELY

JUNOSをバージョンアップする。

再起動後、現在のJUNOSバージョンを確認します。
バックアップパーティーションのJUNOSがバージョンは古い為、実際に使用するものにバージョンアップする必要があります。

root> show version
Model: ex2200-48t-4g
JUNOS Base OS boot [11.4R7.5]
JUNOS Base OS Software Suite [11.4R7.5]
JUNOS Kernel Software Suite [11.4R7.5]
JUNOS Crypto Software Suite [11.4R7.5]
JUNOS Online Documentation [11.4R7.5]
JUNOS Enterprise Software Suite [11.4R7.5]
JUNOS Packet Forwarding Engine Enterprise Software Suite [11.4R7.5]
JUNOS Routing Software Suite [11.4R7.5]
JUNOS Web Management [11.4R7.5]
JUNOS FIPS mode utilities [11.4R7.5]

USBメモリをマウントする。

JUNOSをバージョンアップする手段はいくつかありますが、今回はUSBメモリ上のJUNOSイメージを使用します。
事前にFATでフォーマットされたUSBメモリに、英字のみでイメージを配置します。
今回は、USBメモリの/JUNOS/EX2200以下にJUNOSイメージを保存しています。

root@:LC:0% mount_msdosfs /dev/da1s1 /mnt
root@:LC:0% ls /mnt/JUNOS/EX2200/
jinstall-ex-2200-12.3R6.6-domestic-signed.tgz
jinstall-ex-2200-12.3R7.7-domestic-signed.tgz

USBメモリからJUNOSイメージを展開する。

CLIモードに移行し、以下のコマンドでJUNOSイメージを展開します。
request system software add no-copy no-validate <JUNOSイメージのフルパス 例:/mnt/JUNOS/EX2200/>

リブート

以下のコマンドでリブートを行います。
request system reboot

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1