Introduction
This document shows how to perform access point image recovery on an ISR (Integrated Services Router) with an embedded AP802. The method described here relies upon the fact that the AP802's flash partition is directly accessible from the host router. This technique cannot be used from a router with an embedded AP801; on such platforms, you will need to perform AP (access point) image recovery from the AP801 console (bootloader.) (How to tell if you have an AP801 or AP802).
Example router CLI log
The example given below was performed on an 819HWD running IOS (Internetwork Operating System) 15.2(4)M5.
Router flash contents
819HWD#dir all-filesystems
[ ... ]
Directory of flash:1:/
2 -rw- 100041 Aug 1 2014 19:37:46 +00:00 event.log
25 -rw- 215 Sep 15 2014 17:17:38 +00:00 env_vars
4 -rw- 125729 Aug 1 2014 12:29:16 +00:00 event.capwap
5 -rw- 281 Jun 9 2014 23:28:12 +00:00 info
6 -rw- 8216 Sep 15 2014 17:17:50 +00:00 private-multiple-fs
7 drw- 0 Dec 26 2013 19:52:46 +00:00 ap802-rcvk9w8-mx
17 -rw- 3072 Dec 26 2013 20:02:30 +00:00 cpconfig-ap802.cfg
3 -rw- 0 Sep 15 2014 17:18:02 +00:00 config.txt
18 -rw- 5 Jun 25 2014 21:06:00 +00:00 private-config
19 -rw- 64 Jun 24 2014 23:12:10 +00:00 sensord_CSPRNG1
20 -rw- 64 Jun 24 2014 23:21:44 +00:00 sensord_CSPRNG0
21 drw- 0 Jul 31 2014 18:29:32 +00:00 configs
Reformatting AP flash
The flash:1: filesystem is the partition used by the AP802. In our test, we will format this filesystem to wipe it clean, then reboot the AP802 to cause it to boot into the AP bootloader. (Note: do not reformat AP flash unless necessary - this is done here for illustrative purposes.)
819HWD#format flash:1:/
Format operation may take a while. Continue? [confirm]y
Format operation will destroy all data in "flash:1:". Continue? [confirm]y
Format: All system sectors written. OK...
Format: Total sectors in formatted partition: 80801
Format: Total bytes in formatted partition: 41370112
Format: Operation completed successfully.
Format of flash:1: complete
819HWD#service-module wlan-ap 0 reset
Use reset only to recover from shutdown or failed state
AP config will not be saved
Do you want to reset?[confirm]y
Trying to reload Service Module wlan-ap0.
Pause - wait for open files to finish...
819HWD#
*Sep 15 17:28:30.232: %SECONDCORE-5-BOOTSTAGE: ROMMON on 2nd core UP
*Sep 15 17:28:30.248: %SECONDCORE-5-BOOTSTAGE: AP-BOOTLOADER on 2nd core UP
Connect to AP802
Connect to the AP802's console to verify that its flash is now empty.
819HWD#service-module wlan-ap 0 session
Trying 192.168.148.8, 2002 ... Open
Connecting to AP console, enter Ctrl-^ followed by x,
then "disconnect" to return to router prompt
ap: dir flash:
Directory of flash:/
41168896 bytes available (139264 bytes used)
ap:
Ctrl-^x
819HWD#disco
Closing connection to 192.168.148.8 [confirm]y
Copy AP IOS onto router flash
Copy the desired AP IOS tarball from a TFTP (Trivial File Transfer Protocol) server onto the router's main flash partition. In this case, we use ap802-k9w7-tar.152-4.JB5.tar which is autonomous IOS 15.2(4)JB5. (See the article Understanding Access Point IOS Images.)
819HWD#copy tftp flash:
Address or name of remote host [192.168.148.1]?
Source filename [/192.168.148.1/ap802-k9w7-tar.152-4.JB5.tar]? ap802-k9w7-tar.152-4.JB5.tar
Destination filename [ap802-k9w7-tar.152-4.JB5.tar]?
Accessing tftp://192.168.148.1/ap802-k9w7-tar.152-4.JB5.tar...
Loading ap802-k9w7-tar.152-4.JB5.tar from 192.168.148.1 (via GigabitEthernet0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 13834240 bytes]
13834240 bytes copied in 46.368 secs (298357 bytes/sec)
Extract AP IOS
Unbundle the tarball onto AP flash (flash:1:), using the archive tar /xtract command.
819HWD#archive tar /xtract ap802-k9w7-tar.152-4.JB5.tar flash:1:
extracting info (282 bytes)
ap802-k9w7-mx.152-4.JB5/ (directory)
ap802-k9w7-mx.152-4.JB5/html/ (directory)
[ ... ]
extracting info.ver (282 bytes)
819HWD#dir flash:1:
Directory of flash:1:/
4 -rw- 282 Sep 15 2014 17:31:40 +00:00 info
5 drw- 0 Sep 15 2014 17:31:42 +00:00 ap802-k9w7-mx.152-4.JB5
199 -rw- 282 Sep 15 2014 17:33:38 +00:00 info.ver
41308160 bytes total (26963968 bytes free)
Configure AP to boot new IOS image
Console to the AP802's bootloader, and configure it to boot the IOS image. Note that AP's IOS image is normally called flash:/platform-featureset-mx.version/platform-featureset-mx-version. Then boot AP IOS.
819HWD#service-module wlan-ap 0 session
Trying 192.168.148.8, 2002 ... Open
ap: dir flash:
Directory of flash:/
4 -rw- 282 <date> info
5 drw- 0 <date> ap802-k9w7-mx.152-4.JB5
199 -rw- 282 <date> info.ver
26963968 bytes available (14344192 bytes used)
ap: set BOOT flash:/ap802-k9w7-mx.152-4.JB5/ap802-k9w7-mx.152-4.JB5
ap: reset
Are you sure you want to reset the system (y/n)?y
System resetting...
*Sep 15 17:35:12.758: %SECONDCORE-5-BOOTSTAGE: AP-IOS on 2nd core SAFE FOR RESET
IOS Bootloader - Starting system.
[ ... ]
*Sep 15 17:35:25.329: %SECONDCORE-5-BOOTSTAGE: ROMMON on 2nd core UP
*Sep 15 17:35:25.345: %SECONDCORE-5-BOOTSTAGE: AP-BOOTLOADER on 2nd core UPLoading "flash:/ap802-k9w7-mx.152-4.JB5/ap802-k9w7-mx.152-4.JB5"...###############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
File "flash:/ap802-k9w7-mx.152-4.JB5/ap802-k9w7-mx.152-4.JB5" uncompressed and installed, entry point: 0x18003000
[ ... ]
Cisco IOS Software, AP802 Software (AP802-K9W7-M), Version 15.2(4)JB5, RELEASE SOFTWARE (fc1)
[ ... ]
*Sep 15 17:37:29.371: %SECONDCORE-5-BOOTSTAGE: AP-IOS on 2nd core UP
*Sep 15 17:37:37.435: %WLAN_AP_SM-6-UNIFIED_IMAGE: Embedded AP will change boot image to mini-IOS also called LWAPP recovery
Please check router config to ensure connectivity between WLC and AP
Use service-module wlan-ap 0 reload to boot up mini-IOS image on AP
Save the autonomous configuration file with a file name other than
flash:[config.txt] as it will be erased upon AP reload
Press RETURN to get started!
ap>
Ctrl-^x
819HWD#disco
Closing connection to 192.168.148.8 [confirm]y
819HWD#
Clean up router flash and configure for autonomous
Now delete the tarball from router flash, as it is no longer needed. Also address the "WLAN_AP_SM-6-UNIFIED_IMAGE" message, which indicates that the router thinks that the AP should be running lightweight IOS, so we need to use the service-module-wlan n bootimage command to tell the router that the AP is running autonomous (or lightweight).
819HWD#del flash:/ap802-k9w7-tar.152-4.JB5.tar
Delete filename [ap802-k9w7-tar.152-4.JB5.tar]?
Delete flash:/ap802-k9w7-tar.152-4.JB5.tar? [confirm]
819HWD#conf t
Enter configuration commands, one per line. End with CNTL/Z.
819HWD(config)#service-module wlan-ap 0 bootimage autonomous
819HWD(config)#end
819HWD#wri
Building configuration...[OK]
How to tell whether an ISR has AP801 or AP802
Q: How do you tell whether an ISR has an AP801 or an AP802?
A1. Do a show version on the AP.
A2. http://www.cisco.com/c/en/us/products/routers/800-series-routers/brochure-listing.html > Cisco 800 Series ISR Comparison Chart