01-18-2024 12:22 PM
On a C9117AXI-E I have removed both partitions using "ubi remove part1" and "ubi remove part2".
I need to find a way to restore one of the partitions so the device can boot again.
Any attempt in using tftp has failed so far, it seems impossible to connect. I tried using a USB flash drive, which can connect, but I'm not able to get the device working again.
It tried the following commands to recreate the partitions and add a .bin file data inside.
setenv mtdids nand0=nand0 && setenv mtdparts mtdparts=nand0:0x40000000@0x0(fs) && ubi part fs
ubi remove part1
ubi remove part2
ubi create part1 20000000
ubi create part2
usb start
fatload usb 0:1 ${loadaddr} C9800-AP-iosxe-wlc.bin
ubi write.part ${loadaddr} part1 ${filesize}
But after booting, this is not accepted and errors are thrown.
Which commands can allow to restore the access point ?
01-19-2024 12:12 AM
>...But after booting, this is not accepted and errors are thrown.
- What are the errors ?
M.
01-19-2024 02:07 AM - edited 01-19-2024 02:14 AM
Thank you for your quick response, the error I'm getting is: Error reading superblock on volume 'ubi:part1' errno=-22!
Output of the device:
Execution of the writing using ubi:
(BTLDR) # ubi create part1 20000000
Creating dynamic volume part1 of size 536870912
(BTLDR) # ubi create part2
No size specified -> Using max size (481746944)
Creating dynamic volume part2 of size 481746944
(BTLDR) # usb start
starting USB...
USB0: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
USB1: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 1 for devices... 1 USB Device(s) found
(BTLDR) # setenv loadaddr 0x80000000
(BTLDR) # saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done
(BTLDR) # fatload usb 0:1 ${loadaddr} C9800-AP-iosxe-wlc.bin
reading C9800-AP-iosxe-wlc.bin
285656088 bytes read in 151007 ms (1.8 MiB/s)
(BTLDR) # ubi write ${loadaddr} part1 ${filesize}
285656088 bytes written to volume part1
Trying to run it:
(BTLDR) # bootipq
Specified BOOT: part1
ubi0: detaching mtd2
ubi0: mtd2 is detached
ubi0: attaching mtd2
ubi0: scanning is finished
+-------------------------------+
| part1: 2115 PEBs|
| part2: 1897 PEBs|
+-------------------------------+
ubi0: attached mtd2 (name "mtd=0", size 1024 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 4096, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 0, total reserved PEBs: 4096, PEBs reserved for bad PEB handling: 80
Booting from part1
Error reading superblock on volume 'ubi:part1' errno=-22!
ubifsmount - mount UBIFS volume
Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
Unable to mount UBIFS PARTITION part1, read UBI PARTITION ...
Read 1024 bytes from volume part1 to 54000000
Booting failed, try boot on part2
Error reading superblock on volume 'ubi:part2' errno=-30!
ubifsmount - mount UBIFS volume
Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
Unable to mount UBIFS PARTITION part2, read UBI PARTITION ...
Read 1024 bytes from volume part2 to 54000000
(BTLDR) #
Environment variables
(BTLDR) # printenv
BOOT=part1
FACTORY_RESET=2
bootcmd=bootipq
bootdelay=3
bootfile=C9800-AP-iosxe-wlc.bin
bootpart=tftp
ethact=eth0
ethaddr=0c:d0:f8:9a:50:cc
fdt_high=0x4A400000
fdtcontroladdr=4a97c740
fileaddr=80000000
filesize=1106c418
gatewayip=192.168.10.1
initrd_high=0x4A300000
ipaddr=192.168.10.155
loadaddr=0x80000000
machid=8010000
mtddevname=fs
mtddevnum=0
nand_erasesize=1000
nand_oobsize=0
nand_writesize=100
netmask=255.255.255.0
partition=nand0,0
qca_tftp=tftpboot 0x54000000 C9800-AP-iosxe-wlc.bin
serverip=192.168.10.192
stderr=serial@78B3000
stdin=serial@78B3000
stdout=serial@78B3000
Environment size: 642/65532 bytes
01-19-2024 03:03 AM
- FYI : https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwi66963
https://www.cisco.com/c/en/us/support/docs/wireless/catalyst-9120axi-access-point/217537-repairing-c9120-c9115-access-points-from.html
M.
01-22-2024 01:21 AM - edited 01-22-2024 01:39 AM
The problem is that TFTP is not working for some reason, it might be hardware related, which could have been why both volumes were not working anymore. To be sure, I'd like to load the image using USB, but the provided instructions are only using TFTP.
Futhermore, the command boardinit is referenced, but this does not exist on BTLDR.
I have 2 other identical devices, maybe I can copy some image from them to this device using USB ?
01-22-2024 01:53 AM - edited 01-22-2024 01:54 AM
If you have followed the recovery instructions provided and they don't work then -> RMA
01-19-2024 05:38 AM
1. Why would you delete the AP partitions in the first place?
2. You cannot just copy a WLC bin file to a partition and hope it will boot - the AP doesn't even run IOS-XE, it runs on AP-COS and you don't just copy an image on like you do for IOS devices - it actually requires an entire bootable OS partition! EWC runs IOS-XE in a VM/container on top of AP-COS.
3. You should be able to do a u-boot recovery using the process @marce1000 linked above. If that doesn't work then RMA. And don't go deleting all the partitions on an AP in future!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide