I asked if there was a way to recover from a corrupted AP image. Since the IAP will not fully boot we needed a way to replace the corrupted image via the AP boot menu options. These commands aren’t well documented so I figured I would post this to hopefully help out others that face the same issue.
The first step is to reboot the AP and break the boot cycle. You will need to press any key when prompted:
APBoot 1.5.5.5 (build 55373)
Built: 2016-06-09 at 11:36:40
Model: AP-32x
DRAM: 491 MB
SF: Detected MX25U3235F with page size 64 kB, total 4 MB
Flash: 4 MB
N
Hit <Enter> to stop autoboot: 0
apboot>
There are a number of options in the apboot menu: (may change on older firmware)
apboot> ?
? – alias for ‘help’
boot – boot the OS image
clear – clear the OS image or other information
dhcp – invoke DHCP client to obtain IP/boot params
factory_reset – reset to factory defaults
help – print online help
mfginfo – show manufacturing info
osinfo – show the OS image version(s)
ping – send ICMP ECHO_REQUEST to network host
printenv – print environment variables
purgeenv – restore default environment variables
reset – Perform RESET of the CPU
saveenv – save environment variables to persistent storage
setenv – set environment variables
tftpboot – boot image via network using TFTP protocol
upgrade – upgrade the APBoot or OS image
version – display version
In this post I’m going to concentrate on the OS related commands. The first thing we did was clear the corrupt os using the “clear os” command:
apboot> clear os
512 bytes written to volume aos0
Next we validated that partition0 is clear using the “osinfo” command:
apboot> osinfo
Partition 0 does not contain a valid OS image
Partition 1 does not contain a valid OS image
The next step is to get network connectivity. If the network has DHCP available simply type the “dhcp” command:
apboot> dhcp
eth0: link up, speed 1 Gb/s, full duplex
DHCP broadcast 1
DHCP DNS domain:
If DHCP is not available you will need to assign a static IP. Here is a sample of that configuration:
apboot> setenv ipaddr 192.168.11.2
apboot> setenv netmask 255.255.255.0
apboot> setenv gatewayip 192.168.11.1
Now that we are on the network we need to provide the address of the TFTP server. This is accomplished using the “serverip” command:
apboot> setenv serverip <TFTP server IP>
Ensure that a valid IAP image is in the TFTP directory of your server. Make sure you use the correct image for the AP model that you are trying to upgrade. In my example I’m upgrading an IAP-325.
Upgrade the OS using the “upgrade os” command:
apboot> upgrade os ArubaInstant_Hercules_8.3.0.6_69128
eth0: link up, speed 1 Gb/s, full duplex
Using eth0 device
TFTP from server 172.20.50.51; our IP address is 172.20.70.100; sending through gateway 172.20.70.1
Filename ‘ArubaInstant_Hercules_8.3.0.6_69128’.
Load address: 0x44000000
Loading: #################################################################
#################################################################
#################################################################
#######################################
done
Bytes transferred = 15293120 (e95ac0 hex)
Image is signed; verifying checksum… passed
Signer Cert OK
Policy Cert OK
RSA signature verified.
15293120 bytes written to volume aos0
Verifying flash…
Upgrade successful.
Validate the image using the “osinfo” command:
apboot> osinfo
Partition 0:
image type: 0
machine type: 40
size: 15293120
version: 8.3.0.6-8.3.0.6
build string: ArubaOS version 8.3.0.6-8.3.0.6 for Hercules (p4build@pr-hpn-build07) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #69128 SMP Thu Feb 14 08:35:24 UTC 2019
flags: Instant preserve
oem: aruba
Image is signed; verifying checksum… passed
Signer Cert OK
Policy Cert OK
RSA signature verified.
Validate the IAP boot partition is set to the correct partition using “printenv” command. Look for the os_partition variable:
apboot> printenv
os_partition=0
If the partition is not correct, set the os_partition using the “set_env” command:
apboot> setenv os_partition 0
Make sure you save your settings:
apboot> save
Now your IAP is ready to be reloaded using the “reset” command or just power cycle the AP. The IAP should boot with the newly upgraded image.
Hope this helps.