简介
本文档介绍在CGR 1000上恢复bootflash和系统映像的故障排除步骤。
背景信息
CGR1000使用思科安全数字(SD)卡内存存储启动映像、系统映像、配置等 在极少数情况下,SD卡损坏。结果,启动映像和/或系统映像损坏。这会阻止CGR启动。启动顺序如图所示。本文中的步骤大纲是从损坏的SD卡内存状态恢复CGR。
先决条件
1.本地PC上安装的简单文件传输协议(TFTP)服务器
2.设置TFTP服务器,使其具有启动映像和系统映像
要求
Cisco 建议您了解以下主题:
1.控制台电缆
2.第5类
3.启动映像和系统映像
使用的组件
本文档仅限于在CGR 1120和CGR1240上运行的CGOS版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
恢复步骤
1.使用putty设置控制台电缆。
2.将CAT5电缆从本地pc网卡连接到CGR ETH 2/2。这是恢复过程中唯一工作的接口。
3.将本地pc NIC设置为与CGR位于同一子网中。
例如,PC网卡是192.0.2.1子网255.255.255.0。
对于CGR,子网为192.0.2.2,子网为255.255.255.0。
4.在“Putty”课程中,您会看到:
"loader>"
IOFPGA @ 0xd0000000 version=0x30020700, datecode=0xc080d17 CPLD version 0x14
Reset Reason = 0(0)
Scratch pad test passed !!!
BIOS Version: Build # 12 - Wed 06/27/2012
CGR Loader Version: 1.00.01
Filesystem type is ext2fs, partition type 0x83
Filesystem type is ext2fs, partition type 0x83
GNU GRUB version 0.97
CGR Loader Version 1.00.01
loader>
5.使用命令“set ip”设置ETH2/2的IP地址。
set ip 192.0.2.2 255.255.255.0
Correct - ip addr is 192.0.2.2, mask is 255.255.255.0
Found Intel IOH GBE [2:0.1] at 0xe020, ROM address 0x0000
Probing...[Intel IOH GBE]
MAC address 78:da:6e:8:ad:e1
External PHY link UP @ 1000/full
Address: 192.0.2.2
Netmask: 255.255.255.0
Server: 0.0.0.0
Gateway: 0.0.0.0
loader>
6.使用命令“set gw”将网关地址设置为本地PC网卡。
set gw 192.0.2.1
Correct gateway addr 192.0.2.1
Address: 192.0.2.2
Netmask: 255.255.255.0
Server: 0.0.0.0
Gateway: 192.0.2.1
7.使用命令“boot tftp://”从本地tftp服务器启动启动映像。
loader> boot tftp://192.0.2.1/cgr1000-uk9-kickstart.5.2.1.CG4.3.SPA.bin
Address: 192.0.2.2
Netmask: 255.255.255.0
Server: 192.0.2.1
Gateway: 192.0.2.1
Filesystem type is tftp, using whole disk
Booting: /cgr1000-uk9-kickstart.5.2.1.CG4.3.SPA.bin console=ttyS0,9600n8nn quie
t loader_ver="1.00.01"....
...............................................................................
................Kickstart image verification Successful
Image verification OK
INIT: Checking all filesystems ....... done.
Warning: switch is starting up with default configuration
Creating boot config file...
/etc/rc.d/rcS.d/S26check-flash: line 528: /mnt/bootloader/boot/grub/menu.lst.local: No such file or directory
cp: cannot stat `/mnt/cfg/0/boot/grub/menu.lst.local': No such file or directory
WARNING: image sync is going to be disabled after a loader netboot
Loading system software
INIT: Sending processes the TERM signal[H[J
INIT: Sending processes the TERM signal
INIT: Sending processes the
KILL signal
8. 映像启动后,您将看到类似于此输出的输出。
Router(boot)# ?
Exec commands:
clear Reset functions
config Enter configuration mode
copy Copy from one file to another
delete Delete a file or directory
dir Directory listing for files
exit Exit from the EXEC
find Find a file below the current directory
format Format disks
init Initialize internal disk
load Load system image
mkdir Create new directory
move Move files
no Disable debugging functions
pwd View current directory
reload Reboot this supervisor module
rmdir Remove existing directory
show Show running system information
sleep Sleep for the specified number of seconds
ssh SSH to another system
tail Display the last part of a file
telnet Telnet to another system
9.使用命令“format bootflash:”格式化损坏的SD卡。
This command is going to erase the contents of your bootflash:.
Do you want to continue? (y/n) [n] y
Formatting bootflash:
Formatting started at: Fri Feb 20 23:56:00 UTC 2015
mke2fs 1.35 (28-Feb-2004)
Formatting finished at: Fri Feb 20 23:56:52 UTC 2015
Formatting completed
10.运行init系统(选项步骤:此命令格式化SD卡并清除所有内容)。
Router(boot)# init system
This command is going to erase your startup-config, licenses as well as the contents of your bootflash:.
Do you want to continue? (y/n) [n] yInitializing the system
mount: /dev/mmcblk0p4 already mounted or /bootflash busy
mount: according to mtab, /dev/mmcblk0p4 is already mounted on /bootflash
ERROR: cannot mount filesystem
cp: omitting directory `/bootflash/'
Partitioning failed
11.设置管理接口(将启动和系统映像复制到bootflash中需要此接口)。
Router(boot)# configure terminal
Router(boot)(config)# interface mgmt0
Router(boot)(config-if)#ip address 192.0.2.2 255.255.255.0
Router(boot)(config-if)#no shut
12.将启动和系统映像复制到bootflash中。
Router(boot)# copy tftp://192.0.2.1/cgr1000-uk9-kickstart.5.2.1.CG4.3.SPA.bin bootflash:
Trying to connect to tftp server......
Connection to server Established. Copying Started.....
TFTP get operation was successful
Copy complete, now saving to disk (please wait)...
Router(boot)# copy tftp://192.0.2.1/cgr1000-uk9.5.2.1.CG4.3.SPA.bin bootflash:
Trying to connect to tftp server......
Connection to server Established. Copying Started.....
TFTP get operation was successful
Copy complete, now saving to disk (please wait)...
13.使用“dir”验证启动和系统映像是否在CGR上。
Router(boot)#dir
29167616 Feb 21 00:39:59 2015 cgr1000-uk9-kickstart.5.2.1.CG4.3.SPA.bin
143332283 Feb 21 00:42:06 2015 cgr1000-uk9.5.2.1.CG4.3.SPA.bin
372 Feb 23 17:55:52 2015 fpga.log
1905 Feb 23 18:39:54 2015 mts.log
Usage for bootflash://
691462144 bytes used
8859394048 bytes free
9550856192 bytes total
14.使用“load bootflash”命令启动系统映像。
Router(boot)# load bootflash:cgr1000-uk9.5.2.1.CG4.3.SPA.bin
Loading system software
Uncompressing bootflash:/cgr1000-uk9.5.2.1.CG4.3.SPA.bin..........done. (in 37 seconds)
Loading plugin 0: core_plugin...
INIT: Switching to runlevel: 3
INIT: Sending processes the TERM signal
Router(boot)#
INIT:
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
System is coming up ... Please wait ...
2015 Feb 21 00:47:56 %$ VDC-1 %$ %COPP-2-COPP_NO_POLICY: Control-plane is unprotected.System is coming up ... Please wait ...
2015 Feb 21 00:47:58 %$ VDC-1 %$ %VDC_MGR-2-VDC_ONLINE: vdc 1 has come online 2015 Feb 21 00:47:58 Router %$ VDC-1 %$ %PLATFORM-2-
INPUT_POWER_SOURCE_TRANSITION: Three Phase and DC Input Status Alert: L1 Phase ON, L2 Phase OFF, L3 Phase OFF, DC Input Absent
15. CGR启动到系统映像后,您需要使用“install all bootflash:<kickstart-image> system bootflash:<system image>”安装启动和系统映像。
cgr1120# install all kickstart bootflash:cgr1000-uk9-kickstart.5.2.1.CG4.3.SPA.bin system bootflash:cgr1000-uk9.5.2.1.CG4.3.SPA.bin
Verifying image bootflash:/cgr1000-uk9-kickstart.5.2.1.CG4.3.SPA.bin for boot variable "kickstart".
-- SUCCESS
Verifying image bootflash:/cgr1000-uk9.5.2.1.CG4.3.SPA.bin for boot variable "system".
-- SUCCESS
Verifying image type.
-- SUCCESS
Extracting "system" version from image bootflash:/cgr1000-uk9.5.2.1.CG4.3.SPA.bin.
-- SUCCESS
Extracting "kickstart" version from image bootflash:/cgr1000-uk9-kickstart.5.2.1.CG4.3.SPA.bin.
-- SUCCESS
Extracting "bios" version from image bootflash:/cgr1000-uk9.5.2.1.CG4.3.SPA.bin.
-- SUCCESS
Checking for Battery Power Mode.
-- SUCCESS
Checking for Module Power Status.
-- SUCCESS
Checking for WPAN upgrade compatibility.
-- SUCCESS
Performing module support checks.
-- SUCCESS
Notifying services about system upgrade.
-- SUCCESS
Compatibility check is done:
Module bootable Impact Install-type Reason
------ -------- -------------- ------------ ------
1 yes disruptive reset Hitless upgrade is not supported
Images will be upgraded according to following table:
Module Image Running-Version(pri:alt) New-Version Upg-Required
------ ---------- ---------------------------------------- -------------------- ------------
1 system 5.2(1)CG4(3) 5.2(1)CG4(3) no
1 kickstart 5.2(1)CG4(3) 5.2(1)CG4(3) no
1 bios v16.1.0(10/15/2013):V12.1.0(06/27/2012) v16.1.0(10/15/2013) no
1 fpga 2.07.00 2.07.00 no
Switch will be reloaded for disruptive upgrade.
Do you want to continue with the installation (y/n)? [n] y