Date created: Monday, January 25, 2016 10:19:35 AM. Last modified: Friday, November 11, 2016 11:27:57 AM

ASR9001 - Erase and fresh install via ROMMON

References:
https://supportforums.cisco.com/document/12276406/asr9k-asr-9001-s-ios-xr-installation-procedure

Update:
Using a USB drive/disk in the ASR will take the process of say a 5.3.3 + SP4 install from like 3 hours down to about 1. This can be booted from using the ROMMON command "boot disk1://asr9k-mini-px.vm-5.3.5 -a none -o none"


Update 2:
To boot into ROMMON it may not be possible to enter the key sequence CTRL+R via a remote console server. Whilst the box is still running "normaly" setting the config-reg to 0 and then reloading the box will drop it into ROMMON:
admin
config-register 0x0
exit
reload

 

An example of an ASR9001 on which the software packages are screwed and it won't boot properly

# Wait until this point in the boot process than hit CTRL+C to interupt and drop into ROMMON mode

MBI validation sending request.
HIT CTRL-C to abort
....... [CTRL-C]
 MBI Validation aborted

 Boot Status 15
Serial ID: XXXXX
rommon B1 >

# "set" shows the current variables and their values
rommon B4 > set
PS1=rommon ! >
IOX_ADMIN_CONFIG_FILE=
ACTIVE_FCD=1
TFTP_VERBOSE=2
IP_ADDRESS=192.168.58.2
IP_SUBNET_MASK=255.255.255.0
DEFAULT_GATEWAY=192.168.58.1
TFTP_RETRY_COUNT=4
TFTP_TIMEOUT=600000
TFTP_CHECKSUM=1
TFTP_MGMT_INTF=1
TFTP_FILE=asr9k-mini-px.vm-5.2.2
TFTP_SERVER=192.168.58.1
TFTP_BLKSIZE=1250
TURBOBOOT=
CLUSTER_NO_BOOT=
BOOT_DEV_SEQ_CONF=
BOOT_DEV_SEQ_OPER=
BOOT=disk0:asr9k-os-mbi-5.2.2/0x100000/mbiasr9k-rp.vm,1;
BSI=0
?=0

# Clear the boot variable so we don't book from disk
rommon B5 > unset BOOT

# Clear the TFTP file name, I don't want to boot 5.2.2, I want to boot 4.3.4
rommon B6 > unset TFTP_FILE

# Disable disk mirroring (no mirroring on ASR9001): unset MIRROR_ENABLE

# Config IP details for the Mgmt0 interface so we can TFTP
rommon B7 > IP_ADDRESS=10.116.26.62
rommon B8 > IP_SUBNET_MASK=255.255.255.0
rommon B9 > DEFAULT_GATEWAY=10.116.26.1


# Enable turbo boot and format the disk (no space between commans)
rommon B10 > TURBOBOOT=on,disk0,format

# Tweak some of the TFTP settings
rommon B11 > TFTP_TIMEOUT=6000
rommon B12 > TFTP_VERBOSE=2
rommon B13 > TFTP_RETRY_COUNT=2
rommon B14 > TFTP_MGMT_INTF=0
rommon B15 > TURBOBOOT=on,disk0,format
# The turboboot option will copy the VM to RAM, then install it to disk and reboot and boot from disk.
# Without this the router boots from the VM running in RAM and after reboot its blank still, show ver
# shows the following in that case
RP/0/RSP0/CPU0:ios#show ver
System image file is "tftp://192.168.30.73/asr9k-mini-px.vm-4.3.4"

rommon B16 > confreg 0x102

# Save these changes (they haven't taken effect yet)
rommon B17 > sync

# View variables and values to check it's all correct
rommon B18 > set

# Now boot the core VM image extrated from the full IOS-XR 4.3.4 default tarball
rommon B19 > boot tftp://192.168.30.73/asr9k-mini-px.vm-4.3.4 -a none -o none


 Boot Status 16

          IP_ADDRESS: 10.116.26.62
      IP_SUBNET_MASK: 255.255.255.0
     DEFAULT_GATEWAY: 10.116.26.1
         TFTP_SERVER: 192.168.30.73
           TFTP_FILE: asr9k-mini-px.vm-4.3.4

Performing tftpdnld
TFTP: Enabling cache

Mgt LAN 0 interface is selected using TSEC.

dtsec_init_hw: configuring DTSEC (port 8) for: 1GB, Full Duplex
Initializing interface.
Interface link state up.

ARPing for 10.116.26.1
ARP reply for 10.116.26.1 received.  MAC address 1005.ca9e.1b65
tftp_process_packet: received OACK.
tftp_process_packet: Change blksize to 1250.
Receiving asr9k-mini-px.vm-4.3.4 from 192.168.30.73 !!!!

tftp_process_packet: last packet, block=16310, size=1043.
File reception completed.
Image size=348067293, TFTP download size=348067293

TFTP: Disabling cache
.........
program load complete, entry point: 0x202518, size: 0x14bf06dd

# (if booting a pre 17th Nov 2015 image, like 4.3.4 one must watch the TFTP copy and boot up process,
# there is a y/n option that only displays for a few seconds, its a warning about the certificate has expired
# because of http://www.cisco.com/c/en/us/support/docs/field-notices/639/fn63979.html)

# Also note the login screen can show before the system has actually finished copying some packages and booting
# It will give an error...
  Enter root-system username: cisco
  Enter secret:
  Enter secret again:
 Could not commit admin config.

# Wait for the various TURBOBOOT: messages to stop...

Feb 01 05:32:13.816 : TURBOBOOT: Resetting TURBOBOOT rommon variable to (TURBOBOOT=).
Feb 01 05:32:13.882 : TURBOBOOT: Setting config-register to autoboot the router and disable send break.
Feb 01 05:32:13.939 : TURBOBOOT: Turboboot completed successfully: the router will now reload from disk
Feb 01 05:32:13.941 : TURBOBOOT: *** RESETTING IN 30 SECONDS ***

# IOS-XR re-boots and then one has to create a new root account and then login as that account


RP/0/RSP0/CPU0:ios#show ver
System image file is "tftp://192.168.30.73/asr9k-mini-px.vm-4.3.4"

# Erase all the config data and free space (optional)
RP/0/RSP0/CPU0:ios#erase nvram:
RP/0/RSP0/CPU0:ios#erase nvram-raw:
RP/0/RSP0/CPU0:ios#format disk0a:
RP/0/RSP0/CPU0:ios#format harddisk:
RP/0/RSP0/CPU0:ios#format configflash:
RP/0/RSP0/CPU0:ios#format bootflash: location 0/0/cpu0


# Ensure all line cards are showing "READY" or "RUN" - some show "IOS XR PREP" for a while until they are fulling online
RP/0/RSP0/CPU0:ios#show platform


# Check if any LCs need upgrading
RP/0/RSP0/CPU0:ios#admin
RP/0/RSP0/CPU0:ios(admin)#show hw-module fpd location all
# If any LC firmware needs upgrading, upgrade it before continuing:
RP/0/RSP0/CPU0:ios(admin)#exit
RP/0/RSP0/CPU0:ios#conf t
RP/0/RSP0/CPU0:ios(config)#interface MgmtEth 0/RSP0/CPU0/0
RP/0/RSP0/CPU0:ios(config-if)#ipv4 add 10.116.26.62/24
RP/0/RSP0/CPU0:ios(config-if)#no shut
RP/0/RSP0/CPU0:ios(config-if)#commit
RP/0/RSP0/CPU0:ios(config-if)#exit
RP/0/RSP0/CPU0:ios(config)#router static address-family ipv4 unicast 0.0.0.0/0 10.116.26.1
RP/0/RSP0/CPU0:ios(config)#commit
RP/0/RSP0/CPU0:ios(config)#end
RP/0/RSP0/CPU0:ios#admin
RP/0/RSP0/CPU0:ios(admin)#install add tftp://1.0.0.10/asr9k-fpd-px.pie-4.3.2 actvate sync
RP/0/RSP0/CPU0:ios(admin)#show install active summary
RP/0/RSP0/CPU0:ios(admin)#install commit 
RP/0/RSP0/CPU0:ios(admin)#upgrade hw-module fpd all location all
RP/0/RSP0/CPU0:ios(admin)#exit


# Copy the remaining IOS-XR 4.3.4 packages across...
# This is much faster via USB:
# admin install add tar disk1:ASR9K-iosxr-px-K9-5.3.3.tar sync
RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-mpls-px.pie-4.3.4 disk0: RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-optic-px.pie-4.3.4 disk0: RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-mgbl-px.pie-4.3.4 disk0: RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-mcast-px.pie-4.3.4 disk0: RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-li-px.pie-4.3.4 disk0: RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-k9sec-px.pie-4.3.4 disk0: RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-services-px.pie-4.3.4 disk0: RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-fpd-px.pie-4.3.4 disk0: # Becasue this is something pre 17th Oct 2015 (IOS-XR 4.3.4) this means a temporary root certificate # needs installing and SMU applying as per http://www.cisco.com/c/en/us/support/docs/field-notices/639/fn63979.html RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/asr9k-px-4.3.4.CSCut52232.pie disk0: Destination filename [/disk0:/asr9k-px-4.3.4.CSCut52232.pie]? Accessing tftp://192.168.30.73/asr9k-px-4.3.4.CSCut52232.pie C 289740 bytes copied in 0 sec RP/0/RSP0/CPU0:ios(admin)#copy tftp://192.168.30.73/css-root.cer disk0: Destination filename [/disk0:/css-root.cer]? Accessing tftp://192.168.30.73/css-root.cer C 1217 bytes copied in 0 sec RP/0/RSP0/CPU0:ios(admin)#exit RP/0/RSP0/CPU0:ios#sam add certificate /disk0:/css-root.cer root trust SAM: Successful adding certificate /disk0:/css-root.cer RP/0/RSP0/CPU0:ios#admin RP/0/RSP0/CPU0:ios(admin)#install add disk0:/asr9k-px-4.3.4.CSCut52232.pie synchronous RP/0/RSP0/CPU0:ios(admin)#show install inactive RP/0/RSP0/CPU0:ios(admin)#install activate disk0:asr9k-px-4.3.4.CSCut52232-1.0.0 synchronous RP/0/RSP0/CPU0:ios(admin)#install commit RP/0/RSP0/CPU0:ios(admin)#install add disk0:/asr9k-mpls-px.pie-4.3.4 disk0:/asr9k-optic-px.pie-4.3.4 disk0:/asr9k-mgbl-px.pie-4.3.4 disk0:/asr9k-mcast-px.pie-4.3.4 disk0:/asr9k-li-px.pie-4.3.4 disk0:/asr9k-k9sec-px.pie-4.3.4 disk0:/asr9k-services-px.pie-4.3.4 asr9k-fpd-px.pie-4.3.4 synchronous RP/0/RSP0/CPU0:ios(admin)#show install inactive RP/0/RSP0/CPU0:ios(admin)#install activate disk0:asr9k-mpls-px-4.3.4 disk0:asr9k-optic-px-4.3.4 disk0:asr9k-mgbl-px-4.3.4 disk0:asr9k-mcast-px-4.3.4 disk0:asr9k-li-px-4.3.4 disk0:asr9k-k9sec-px-4.3.4 disk0:asr9k-services-px-4.3.4 disk0:asr9k-fpd-px-4.3.4 RP/0/RSP0/CPU0:ios(admin)#install commit # Check everything is OK then reboot the router for good measure RP/0/RSP0/CPU0:ios(admin)#install verify packages synchronous
# remove any unused packages with "install remove inactive sync" RP/0/RSP0/CPU0:ios(admin)#show platform RP/0/RSP0/CPU0:ios(admin)#reload # If all the device configs have been applied the follow additional checks can be made: admin cfs check ! Check for any file system corruption from all the copying admin show configuration failed incompatible ! Check for any configuration inssues admin clear configuration inconsistency ! Clear the configuration issues flag