Problems installing openwrt to Ubiquiti Edgerouter ER-6P

Having used openwrt for a few years, and quite successfully using the ER-X, I recently acquired an ER-6P. Unfortunately, my efforts at installation have rendered it useless at present. It appears that I have got an installation which has been flashed with the non-LUCI version of openwrt but in a pathological fashion as I cannot make the device enter the correct mode for TFT boot as pressing the reset button for >30s does not set off the progressive display of led's that should appear.
In view of having the non-graphical version in some form, I thought it may still be possible to launch sysupgrade from the command line which I have tried without success. From the attached log extract, hopefully someone might shed further light. It does appear to me that the upgrade starts but fails (? because the filesystem is corrupt). I have no personal experience of opening the device and what to do if this is necessary.
Attached is the logfile from my latest effort. I renamed the sysupgradwe tar fiIe because the complex original names don't work with PuTTY. I
don't know what to do about the error "FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck."
I have also tried to run the upgrade from a net source but the instructions in the openwrt documentation did not enable me to achieve internet access with the 6P.
Any help would be much appreciated,
Andrew

t
 -----------------------------------------------------
 OpenWrt 22.03.5, r20134-5f15225c1e
 -----------------------------------------------------

root@OpenWrt:/# mkdir /tmp/sda
root@OpenWrt:/# mount /dev/sda1 /tmp/sda
root@OpenWrt:/# sysupgrade /tmp/sda/openwrt2.tar
Thu Apr 27 20:31:32 UTC 2023 upgrade: Image metadata not present
Thu Apr 27 20:31:32 UTC 2023 upgrade: Saving config files...
Thu Apr 27 20:31:33 UTC 2023 upgrade: Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
Watchdog does not have CARDRESET support
Thu Apr 27 20:31:33 UTC 2023 upgrade: Sending TERM to remaining processes ...
Thu Apr 27 20:31:34 UTC 2023 upgrade: Sending signal TERM to ntpd (2003)
Thu Apr 27 20:31:34 UTC 2023 upgrade: Sending signal TERM to ntpd (2083)
Thu Apr 27 20:31:38 UTC 2023 upgrade: Sending KILL to remaining processes ...
Thu Apr 27 20:31:38 UTC 2023 upgrade: Sending signal KILL to ntpd (2003)
Thu Apr 27 20:31:38 UTC 2023 upgrade: Sending signal KILL to ntpd (2083)
[  221.779679] stage2 (2381): drop_caches: 3
Thu Apr 27 20:31:44 UTC 2023 upgrade: Switching to ramdisk...
Thu Apr 27 20:31:46 UTC 2023 upgrade: Performing system upgrade...
[  223.649715] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
flashing kernel to /dev/mmcblk0p1
flashing rootfs to /dev/mmcblk0p2
833+2 records in
833+2 records out
[  225.389374] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Thu Apr 27 20:31:47 UTC 2023 upgrade: Upgrade completed
Thu Apr 27 20:31:48 UTC 2023 upgrade: Rebooting system...
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
[  229.060864] reboot: Restarting system
SPI stage 1 bootloader
SPI ID: c2:20:17:c2:20
header found at offset 0x2000
Image 1.2: address: 0xffffffffc0000000, header length: 192, data length: 359416
Validating data...
Starting next bootloader at 0xffffffff81000000
Board type: UBNT_E300

U-Boot 2013.07 (UBNT Build Version: e301_001_3f6cf) (Aug 27 2018 - 07:18:51)

Octeon unique ID: 05c01c024180a59e0511
N0.LMC0 Configuration Completed: 1024 MB
Warning: Board descriptor tuple not found in eeprom, using defaults
Core clock: 1000 MHz, IO clock: 400 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Start hw_watchdog_start!
Stop hw_watchdog_start!
Base DRAM address used by u-boot: 0x4fc00000, size: 0x400000
DRAM: 1 GiB
Clearing DRAM...... done

SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Found valid failsafe SPI bootloader at offset: 0x100000, size: 1428664 bytes


U-Boot 2013.07 (UBNT Build Version: e301_001_3f6cf) (Aug 27 2018 - 07:19:10)

Octeon unique ID: 05c01c024180a59e0511
Using DRAM size from environment: 1024 MBytes
Core clock: 1000 MHz, IO clock: 400 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Base DRAM address used by u-boot: 0x4f000000, size: 0x1000000
DRAM: 1 GiB
Clearing DRAM...... done
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB



UBNT_E300 r1:1, r2:23, serial #: E438835DC467
MPR 13-02408-23
Flash boot bus region not enabled, skipping NOR flash config
DLM0: QSGMII ports selected
DLM1: mini-PCIe slots selected
DLM2: mini-PCIe slots selected
SPI: SPI NOR enabled
MMC:   Octeon MMC/SD0: 0
PCIe: Link timeout on port 0, probably the slot is empty
PCIe: Port 1 not in PCIe mode, skipping
PCIe: Port 2 not in PCIe mode, skipping
PCI console init succeeded, 1 consoles, 1024 bytes each
Net:   octeth0, octeth1 [PRIME], octeth2, octeth3, octeth4, octeth5
Node 0 Interface 0 has 4 ports (QSGMII)
Node 0 Interface 1 has 4 ports (QSGMII)
Node 0 Interface 2 has 4 ports (NPI)
Node 0 Interface 3 has 4 ports (LOOP)
Node 0 Interface 4 has 1 ports (AGL)
Type the command 'usb start' to scan for USB storage devices.

Hit any key to stop autoboot:  0
reading vmlinux.64
10063528 bytes read in 3205 ms (3 MiB/s)
reading vmlinux.64.md5
33 bytes read in 302 ms (0 Bytes/s)
Allocating memory for ELF segment: addr: 0xffffffff81100000 (adjusted to: 0x1100000), size 0x1aef63c
## Loading big-endian Linux kernel with entry point: 0xffffffff8184fbf8 ...
Bootloader: Done loading app on coremask:
 0xf
Starting cores:
 0xf
[    0.000000] Linux version 5.10.176 (builder@buildhost) (mips64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Apr 27 20:28:15 2023
[    0.000000] Skipping L2 locking due to reduced L2 cache size
[    0.000000] CVMSEG size: 0 cache lines (0 bytes)
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 000d9602 (Cavium Octeon III)
[    0.000000] Wasting 278528 bytes for tracking 4352 unused pages
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Using appended Device Tree.
[    0.000000] software IO TLB: mapped [mem 0x0000000002c0f000-0x0000000002c4f000] (0MB)
[    0.000000] Primary instruction cache 78kB, virtually tagged, 39 way, 16 sets, linesize 128 bytes.
[    0.000000] Primary data cache 32kB, 32-way, 8 sets, linesize 128 bytes.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000001100000-0x00000000efffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000001100000-0x0000000002beefff]
[    0.000000]   node   0: [mem 0x0000000002c00000-0x000000000fbfffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x000000004ebfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000001100000-0x000000004ebfffff]
[    0.000000] On node 0, zone DMA32: 4352 pages in unavailable ranges
[    0.000000] On node 0, zone DMA32: 17 pages in unavailable ranges
[    0.000000] On node 0, zone DMA32: 1024 pages in unavailable ranges
[    0.000000] On node 0, zone DMA32: 5120 pages in unavailable ranges
[    0.000000] percpu: Embedded 19 pages/cpu s36896 r8192 d32736 u77824
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 247699
[    0.000000] Kernel command line:  root=/dev/mmcblk0p2 rootdelay=10 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=spi32766.0:3072k(boot0),1024k(dummy),64k(eeprom) root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 960380K/1006524K available (7513K kernel code, 830K rwdata, 1184K rodata, 1340K init, 16701K bss, 46144K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 127
[    0.000000] CIB interrupt controller probed: 800107000000e000 23
[    0.000000] CIB interrupt controller probed: 800107000000e200 12
[    0.000000] CIB interrupt controller probed: 800107000000e400 6
[    0.000000] CIB interrupt controller probed: 800107000000e600 4
[    0.000000] CIB interrupt controller probed: 800107000000e800 11
[    0.000000] CIB interrupt controller probed: 800107000000e900 11
[    0.000000] CIB interrupt controller probed: 800107000000ec00 15
[    0.353646] clocksource: OCTEON_CVMCOUNT: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.364719] Calibrating delay loop (skipped) preset value.. 2000.00 BogoMIPS (lpj=10000000)
[    0.372971] pid_max: default: 32768 minimum: 301
[    0.377714] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.384955] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.394093] rcu: Hierarchical SRCU implementation.
[    0.398850] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.406601] smp: Bringing up secondary CPUs ...
[    0.411282] SMP: Booting CPU01 (CoreId  1)...
[    0.415542] CPU1 revision is: 000d9602 (Cavium Octeon III)
[    0.415979] SMP: Booting CPU02 (CoreId  2)...
[    0.425688] CPU2 revision is: 000d9602 (Cavium Octeon III)
[    0.426122] SMP: Booting CPU03 (CoreId  3)...
[    0.435832] CPU3 revision is: 000d9602 (Cavium Octeon III)
[    0.435940] smp: Brought up 1 node, 4 CPUs
[    0.448417] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.458115] futex hash table entries: 1024 (order: 5, 131072 bytes, linear)
[    0.465855] NET: Registered protocol family 16
[    0.470563] thermal_sys: Registered thermal governor 'step_wise'
[    0.476147] PCIe: Initializing port 0
[    0.488971] PCIe: BIST2 FAILED for port 0 (0x0000000000000003)
[    2.494674] PCIe: Link timeout on port 0, probably the slot is empty
[    2.501022] PCIe: Initializing port 1
[    2.508001] PCIe: BIST FAILED for port 1 (0xffffffffffffffff)
[    4.520821] PCIe: Link timeout on port 1, probably the slot is empty
[    4.539849] SCSI subsystem initialized
[    4.543631] usbcore: registered new interface driver usbfs
[    4.549041] usbcore: registered new interface driver hub
[    4.554293] usbcore: registered new device driver usb
[    4.559357] EDAC MC: Ver: 3.0.0
[    4.563454] PCI host bridge to bus 0000:00
[    4.567395] pci_bus 0000:00: root bus resource [mem 0x1000000000000]
[    4.573887] pci_bus 0000:00: root bus resource [io  0x0000]
[    4.579288] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    4.586066] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    4.594933] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    4.601714] clocksource: Switched to clocksource OCTEON_CVMCOUNT
[    4.608277] NET: Registered protocol family 2
[    4.612743] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    4.621063] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    4.629305] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    4.637060] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    4.644310] TCP: Hash tables configured (established 8192 bind 8192)
[    4.650616] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    4.657183] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    4.664348] NET: Registered protocol family 1
[    4.668555] PCI: CLS 0 bytes, default 128
[    4.673269] platform 1180068000000.uctl: clocks initialized.
[    4.679381] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    4.690265] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.696048] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    4.706747] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    4.714604] octeon_gpio 1070000000800.gpio-controller: OCTEON GPIO driver probed.
[    4.722208] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    4.729903] printk: console [ttyS0] disabled
[    4.734080] 1180000000800.serial: ttyS0 at MMIO 0x1180000000800 (irq = 45, base_baud = 25000000) is a OCTEON
[    4.743853] printk: console [ttyS0] enabled
[    4.743853] printk: console [ttyS0] enabled
[    4.752161] printk: bootconsole [early0] disabled
[    4.752161] printk: bootconsole [early0] disabled
[    4.761866] octeon_rng octeon_rng: Octeon Random Number Generator
[    4.772309] loop: module loaded
[    4.775464] Loading iSCSI transport class v2.0-870.
[    4.782199] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    4.787222] 2 fixed-partitions partitions found on MTD device spi0.0
[    4.793591] Creating 2 MTD partitions on "spi0.0":
[    4.798384] 0x000000000000-0x000000300000 : "boot0"
[    4.803712] 0x000000300000-0x000000400000 : "dummy"
[    4.809580] spi-octeon 1070000001000.spi: OCTEON SPI bus driver
[    4.820514] mdio_octeon 1180000001800.mdio: Probed
[    4.825616] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.832176] ehci-pci: EHCI PCI platform driver
[    4.836669] ehci-platform: EHCI generic platform driver
[    4.842006] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.848212] ohci-platform: OHCI generic platform driver
[    4.853753] usbcore: registered new interface driver usb-storage
[    4.860475] i2c-octeon 1180000001000.i2c: probed
[    4.865213] octeon_wdt: Initial granularity 5 Sec
[    4.870407] EDAC DEVICE0: Giving out device to module octeon-cpu controller cache: DEV octeon_pc_edac (INTERRUPT)
[    4.880843] EDAC DEVICE1: Giving out device to module octeon-l2c controller octeon_l2c_err: DEV octeon_l2c_edac (POLLED)
[    4.891870] octeon_lmc_edac octeon_lmc_edac.0: Disabled (ECC not enabled)
[    4.900769] Interface 0 has 4 ports (SGMII)
[    4.905014] Interface 1 has 4 ports (SGMII)
[    4.910029] Interface 3 has 4 ports (LOOP)
[    4.921204] NET: Registered protocol family 10
[    4.927406] Segment Routing with IPv6
[    4.931143] NET: Registered protocol family 17
[    4.935680] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.948769] 8021q: 802.1Q VLAN Support v1.8
[    4.953605] OF: fdt: not creating '/sys/firmware/fdt': CRC check failed
[    4.960405] Waiting 10 sec before mounting root device...
[   14.327070] mmc0: new DDR MMC card at address 0001
[   14.332428] mmcblk0: mmc0:0001 MMC4GB 3.64 GiB
[   14.337107] mmcblk0boot0: mmc0:0001 MMC4GB partition 1 2.00 MiB
[   14.343198] mmcblk0boot1: mmc0:0001 MMC4GB partition 2 2.00 MiB
[   14.349203] mmcblk0rpmb: mmc0:0001 MMC4GB partition 3 512 KiB, chardev (251:0)
[   14.357243]  mmcblk0: p1 p2
[   15.024590] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[   15.032299] Freeing unused kernel memory: 1340K
[   15.036833] This architecture does not have kernel memory protection.
[   15.043299] Run /sbin/init as init process
[   15.300821] init: Console is alive
[   15.304455] init: - watchdog -
[   15.441732] random: crng init done
[   15.509803] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   15.530923] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   15.536470] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   15.544247] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f06d hci version 0x100 quirks 0x0000000002010010
[   15.553693] xhci-hcd xhci-hcd.0.auto: irq 44, io mem 0x1680000000000
[   15.560186] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   15.565694] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   15.573361] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[   15.580391] hub 1-0:1.0: USB hub found
[   15.584212] hub 1-0:1.0: 1 port detected
[   15.588441] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   15.596976] hub 2-0:1.0: USB hub found
[   15.600772] hub 2-0:1.0: 1 port detected
[   15.607246] usbcore: registered new interface driver uas
[   15.612897] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   15.630097] init: - preinit -
[   15.871722] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[   16.073898] usb-storage 1-1:1.0: USB Mass Storage device detected
[   16.080489] scsi host0: usb-storage 1-1:1.0
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   17.234457] scsi 0:0:0:0: Direct-Access                               1100 PQ: 0 ANSI: 4
[   17.243575] sd 0:0:0:0: [sda] 7975296 512-byte logical blocks: (4.08 GB/3.80 GiB)
[   17.251464] sd 0:0:0:0: [sda] Write Protect is off
[   17.256678] sd 0:0:0:0: [sda] No Caching mode page found
[   17.262007] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   17.270290]  sda: sda1
[   17.274219] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   20.362550] mount_root: overlay filesystem in /dev/loop0 has not been formatted yet
[   22.519075] F2FS-fs (loop0): Found nat_bits in checkpoint
[   22.575053] F2FS-fs (loop0): Mounted with checkpoint version = 470a8faf
[   22.582218] mount_root: overlay filesystem has not been fully initialized yet
[   22.589809] mount_root: switching to f2fs overlay
[   22.601443] overlayfs: "xino" feature enabled using 32 upper inode bits.
[   22.649203] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
- config restore -
[   22.913031] urandom-seed: Seed file not found (/etc/urandom.seed)
[   23.000782] procd: - early -
[   23.003829] procd: - watchdog -
[   23.543415] procd: - watchdog -
[   23.546812] procd: - ubus -
[   23.602870] procd: - init -
Please press Enter to activate this console.
[   23.928695] urngd: v1.0.2 started.
[   23.938104] kmodloader: loading kernel modules from /etc/modules.d/*
[   23.957169] i2c /dev entries driver
[   23.974238] sfp sfp: Host maximum power 1.0W
[   23.978535] sfp sfp: No tx_disable pin: SFP modules will always be emitting.
[   24.008236] PPP generic driver version 2.4.2
[   24.013496] NET: Registered protocol family 24
[   24.022220] kmodloader: done loading kernel modules from /etc/modules.d/*
[   28.294237] br-lan: port 1(lan1) entered blocking state
[   28.299491] br-lan: port 1(lan1) entered disabled state
[   28.305049] device lan1 entered promiscuous mode
[   28.318671] br-lan: port 2(lan2) entered blocking state
[   28.323987] br-lan: port 2(lan2) entered disabled state
[   28.329491] device lan2 entered promiscuous mode
[   28.334339] br-lan: port 2(lan2) entered blocking state
[   28.339596] br-lan: port 2(lan2) entered forwarding state
[   28.345186] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   28.356631] br-lan: port 3(lan3) entered blocking state
[   28.361921] br-lan: port 3(lan3) entered disabled state
[   28.367435] device lan3 entered promiscuous mode
[   28.372268] br-lan: port 3(lan3) entered blocking state
[   28.377529] br-lan: port 3(lan3) entered forwarding state
[   28.387847] br-lan: port 4(lan4) entered blocking state
[   28.393227] br-lan: port 4(lan4) entered disabled state
[   28.398917] device lan4 entered promiscuous mode
[   28.403765] br-lan: port 4(lan4) entered blocking state
[   28.409038] br-lan: port 4(lan4) entered forwarding state
[   28.419571] br-lan: port 5(lan5) entered blocking state
[   28.424860] br-lan: port 5(lan5) entered disabled state
[   28.430389] device lan5 entered promiscuous mode
[   28.435241] br-lan: port 5(lan5) entered blocking state
[   28.440493] br-lan: port 5(lan5) entered forwarding state
[   28.461160] lan0: 1000 Mbps Full duplex, port 1, queue 1
[   28.466975] IPv6: ADDRCONF(NETDEV_CHANGE): lan0: link becomes ready
[   29.332292] br-lan: port 2(lan2) entered disabled state
[   29.338481] br-lan: port 3(lan3) entered disabled state
[   29.345674] br-lan: port 4(lan4) entered disabled state
[   29.351919] br-lan: port 5(lan5) entered disabled state



BusyBox v1.35.0 (2023-04-27 20:28:15 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.5, r20134-5f15225c1e
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#
ype or paste code here

What is the output of

ubus call system board

And what is the original filename of the openwrt2.tar file you've got there?

Also, instead of pictures of your screen (or direct screenshots),please use the "Preformatted text </>" button for logs, scripts, configs and general console output.
grafik
Please edit your post accordingly. Thank you! :slight_smile:

The general workflow to install or debrick with a serial cable is:

  • Set up a TFTP server. Another router running OpenWrt can be used as a TFTP server. Load the initramfs OpenWrt build on the server.
  • Interrupt the boot in the bootloader and use the serial console to tftpboot and bootm the initramfs OpenWrt. At this point OpenWrt is running in RAM only, nothing in flash is changed.
  • Transfer the sysupgrade OpenWrt build to the router then use sysupgrade to install it.

What installation method did you use to begin with?

https://forum.openwrt.org/t/support-for-ubiquiti-edgerouter-4/45617/19?u=flygarn12
Or have you tried this method for Edgerouter4?

Many thanks. My apologies for the way I attached the logfile. I hope I have it correct this time. I have edited ed the original post.

Here is the ubus output:

root@OpenWrt:/# ubus call system board
{
        "kernel": "5.10.176",
        "hostname": "OpenWrt",
        "system": "UBNT_E300 (CN7030p1.2-1000-AAP)",
        "model": "Ubiquiti EdgeRouter 6P",
        "board_name": "ubnt,edgerouter-6p",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.5",
                "revision": "r20134-5f15225c1e",
                "target": "octeon/generic",
                "description": "OpenWrt 22.03.5 r20134-5f15225c1e"
        }
}
root@OpenWrt:/#
 or paste code here

The file used for the failed flash was: openwrt-22.03.5-octeon-generic-ubnt_edgerouter-6p-squashfs-sysupgrade.tar (renamed to openwrt2.tar)

Many thanks, I used the method described in the commit page https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=6ee3680614047f7732731ebbaac946a93ab4f693

The first stage appeared to work properly but when flashing the sysupgrade file, something went wrong and instead of the anticipated Luci appearing, I had a system with the command line interface. Unfortunately, I lost the logfile of this - an important lesson but I had not anticipated how difficult the process would be.
I have also tried the method described in the thread where you discuss ER-4 and problems with USB but unfortunately this did not help and when the sysupgrade file was uploaded with UBNT prior to flashing, there were error messages regarding missing metadata and file system improperly unmounted. Again, I unfortunately do not have the logfiles for this as at this point, the device was still able to run UBNT and start from scratch.

1 Like

Many thanks, I did try using TFTPd 64 running from windows and although I appeared to have the IP addresses set correctly, I was unable to transfer the sysupgrade file. I was not sure whether this was because I was unable to put the router into the state recommended by Ubiquiti after holdling the reset button for >30s (on releasing the button it just carries on to Openwrt) and I quite accept that there may be more mileage in the TFTP method but I'm completely inexperienced in it and thought it well to seek advice rather than keep trying at this point.

I eventually found that I could get the ER-6P into the automatic TFTP recovery mode by pressing the reset button for a prolonged period from an electrical off state. This was at variance with the Ubiquiti instructions which state the the same effect should occur whether or not starting from an electrical off state.
Unfortunately, despite getting the TFTP transfer to start, it repeatedly aborted without completion after downloading >700MB with no explanatory console message. After this failed recovery, the device still boots into the corrupt version of openwrt so it seems well bricked to me. I have also attempted manual TFTP recovery with Ubiquiti images which fail to load more than a few MB before aborting.
I have not yet tried to boot the initramfs after TFTP loading as I am unsure of the commands to use.
I presume that I would have to use the Ubiquiti U-boot to start the process as TFTP is not installed in the openwrt version on this device. If this is correct, what would be the command to boot the initramfs please?
Another point that I am concerned about is that I keep seeing this error message in the boot logs:

(mmcblk0p1): Volume was not properly unmounted. Some data
 may be corrupt. Please run fsck.

Could you advise me whether I am able to run fsck or any other alternative to adress this issue as I am wondering whether this is interfering with loading the recovery files.

Below is output from the latest boot sequence which might be relevant.

t
U-Boot 2013.07 (UBNT Build Version: e301_001_3f6cf) (Aug 27 2018 - 07:18:51)

Octeon unique ID: 05c01c024180a59e0511
N0.LMC0 Configuration Completed: 1024 MB
Warning: Board descriptor tuple not found in eeprom, using defaults
Core clock: 1000 MHz, IO clock: 400 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Start hw_watchdog_start!
Stop hw_watchdog_start!
Base DRAM address used by u-boot: 0x4fc00000, size: 0x400000
DRAM: 1 GiB
Clearing DRAM...... done

SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Found valid failsafe SPI bootloader at offset: 0x100000, size: 1428664 bytes


U-Boot 2013.07 (UBNT Build Version: e301_001_3f6cf) (Aug 27 2018 - 07:19:10)

Octeon unique ID: 05c01c024180a59e0511
Using DRAM size from environment: 1024 MBytes
Core clock: 1000 MHz, IO clock: 400 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Base DRAM address used by u-boot: 0x4f000000, size: 0x1000000
DRAM: 1 GiB
Clearing DRAM...... done
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB



UBNT_E300 r1:1, r2:23, serial #: E438835DC467
MPR 13-02408-23
Flash boot bus region not enabled, skipping NOR flash config
DLM0: QSGMII ports selected
DLM1: mini-PCIe slots selected
DLM2: mini-PCIe slots selected
SPI: SPI NOR enabled
MMC:   Octeon MMC/SD0: 0
PCIe: Link timeout on port 0, probably the slot is empty
PCIe: Port 1 not in PCIe mode, skipping
PCIe: Port 2 not in PCIe mode, skipping
PCI console init succeeded, 1 consoles, 1024 bytes each
Net:   octeth0, octeth1 [PRIME], octeth2, octeth3, octeth4, octeth5
Node 0 Interface 0 has 4 ports (QSGMII)
Node 0 Interface 1 has 4 ports (QSGMII)
Node 0 Interface 2 has 4 ports (NPI)
Node 0 Interface 3 has 4 ports (LOOP)
Node 0 Interface 4 has 1 ports (AGL)
Type the command 'usb start' to scan for USB storage devices.

Hit any key to stop autoboot:  0
reading vmlinux.64
10063528 bytes read in 3272 ms (2.9 MiB/s)
reading vmlinux.64.md5
33 bytes read in 303 ms (0 Bytes/s)
Allocating memory for ELF segment: addr: 0xffffffff81100000 (adjusted to: 0x1100000), size 0x1aef63c
## Loading big-endian Linux kernel with entry point: 0xffffffff8184fbf8 ...
Bootloader: Done loading app on coremask:
 0xf
Starting cores:
 0xf
[    0.000000] Linux version 5.10.176 (builder@buildhost) (mips64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Apr 27 20:28:15 2023
[    0.000000] Skipping L2 locking due to reduced L2 cache size
[    0.000000] CVMSEG size: 0 cache lines (0 bytes)
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 000d9602 (Cavium Octeon III)
[    0.000000] Wasting 278528 bytes for tracking 4352 unused pages
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Using appended Device Tree.
[    0.000000] software IO TLB: mapped [mem 0x0000000002c0f000-0x0000000002c4f000] (0MB)
[    0.000000] Primary instruction cache 78kB, virtually tagged, 39 way, 16 sets, linesize 128 bytes.
[    0.000000] Primary data cache 32kB, 32-way, 8 sets, linesize 128 bytes.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000001100000-0x00000000efffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000001100000-0x0000000002beefff]
[    0.000000]   node   0: [mem 0x0000000002c00000-0x000000000fbfffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x000000004ebfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000001100000-0x000000004ebfffff]
[    0.000000] On node 0, zone DMA32: 4352 pages in unavailable ranges
[    0.000000] On node 0, zone DMA32: 17 pages in unavailable ranges
[    0.000000] On node 0, zone DMA32: 1024 pages in unavailable ranges
[    0.000000] On node 0, zone DMA32: 5120 pages in unavailable ranges
[    0.000000] percpu: Embedded 19 pages/cpu s36896 r8192 d32736 u77824
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 247699
[    0.000000] Kernel command line:  root=/dev/mmcblk0p2 rootdelay=10 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=spi32766.0:3072k(boot0),1024k(dummy),64k(eeprom) root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 960380K/1006524K available (7513K kernel code, 830K rwdata, 1184K rodata, 1340K init, 16701K bss, 46144K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 127
[    0.000000] CIB interrupt controller probed: 800107000000e000 23
[    0.000000] CIB interrupt controller probed: 800107000000e200 12
[    0.000000] CIB interrupt controller probed: 800107000000e400 6
[    0.000000] CIB interrupt controller probed: 800107000000e600 4
[    0.000000] CIB interrupt controller probed: 800107000000e800 11
[    0.000000] CIB interrupt controller probed: 800107000000e900 11
[    0.000000] CIB interrupt controller probed: 800107000000ec00 15
[    0.353644] clocksource: OCTEON_CVMCOUNT: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.364717] Calibrating delay loop (skipped) preset value.. 2000.00 BogoMIPS (lpj=10000000)
[    0.372969] pid_max: default: 32768 minimum: 301
[    0.377713] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.384953] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.394089] rcu: Hierarchical SRCU implementation.
[    0.398847] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.406597] smp: Bringing up secondary CPUs ...
[    0.411277] SMP: Booting CPU01 (CoreId  1)...
[    0.415539] CPU1 revision is: 000d9602 (Cavium Octeon III)
[    0.415974] SMP: Booting CPU02 (CoreId  2)...
[    0.425683] CPU2 revision is: 000d9602 (Cavium Octeon III)
[    0.426120] SMP: Booting CPU03 (CoreId  3)...
[    0.435829] CPU3 revision is: 000d9602 (Cavium Octeon III)
[    0.435937] smp: Brought up 1 node, 4 CPUs
[    0.448414] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.458112] futex hash table entries: 1024 (order: 5, 131072 bytes, linear)
[    0.465854] NET: Registered protocol family 16
[    0.470562] thermal_sys: Registered thermal governor 'step_wise'
[    0.476522] PCIe: Initializing port 0
[    0.489346] PCIe: BIST2 FAILED for port 0 (0x0000000000000003)
[    2.495049] PCIe: Link timeout on port 0, probably the slot is empty
[    2.501396] PCIe: Initializing port 1
[    2.508376] PCIe: BIST FAILED for port 1 (0xffffffffffffffff)
[    4.521195] PCIe: Link timeout on port 1, probably the slot is empty
[    4.537875] SCSI subsystem initialized
[    4.541651] usbcore: registered new interface driver usbfs
[    4.547014] usbcore: registered new interface driver hub
[    4.552365] usbcore: registered new device driver usb
[    4.557341] EDAC MC: Ver: 3.0.0
[    4.561459] PCI host bridge to bus 0000:00
[    4.565440] pci_bus 0000:00: root bus resource [mem 0x1000000000000]
[    4.571728] pci_bus 0000:00: root bus resource [io  0x0000]
[    4.577425] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    4.584054] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    4.592938] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    4.599704] clocksource: Switched to clocksource OCTEON_CVMCOUNT
[    4.606307] NET: Registered protocol family 2
[    4.610702] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    4.619005] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    4.627248] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    4.635002] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    4.642252] TCP: Hash tables configured (established 8192 bind 8192)
[    4.648563] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    4.655113] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    4.662309] NET: Registered protocol family 1
[    4.666513] PCI: CLS 0 bytes, default 128
[    4.671223] platform 1180068000000.uctl: clocks initialized.
[    4.677329] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    4.688181] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.693972] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    4.704664] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    4.712532] octeon_gpio 1070000000800.gpio-controller: OCTEON GPIO driver probed.
[    4.720159] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    4.727852] printk: console [ttyS0] disabled
[    4.732030] 1180000000800.serial: ttyS0 at MMIO 0x1180000000800 (irq = 45, base_baud = 25000000) is a OCTEON
[    4.741803] printk: console [ttyS0] enabled
[    4.741803] printk: console [ttyS0] enabled
[    4.750111] printk: bootconsole [early0] disabled
[    4.750111] printk: bootconsole [early0] disabled
[    4.759814] octeon_rng octeon_rng: Octeon Random Number Generator
[    4.770218] loop: module loaded
[    4.773372] Loading iSCSI transport class v2.0-870.
[    4.780184] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    4.785206] 2 fixed-partitions partitions found on MTD device spi0.0
[    4.791582] Creating 2 MTD partitions on "spi0.0":
[    4.796377] 0x000000000000-0x000000300000 : "boot0"
[    4.801690] 0x000000300000-0x000000400000 : "dummy"
[    4.807591] spi-octeon 1070000001000.spi: OCTEON SPI bus driver
[    4.818474] mdio_octeon 1180000001800.mdio: Probed
[    4.823558] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.830131] ehci-pci: EHCI PCI platform driver
[    4.834632] ehci-platform: EHCI generic platform driver
[    4.839956] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.846159] ohci-platform: OHCI generic platform driver
[    4.851700] usbcore: registered new interface driver usb-storage
[    4.858423] i2c-octeon 1180000001000.i2c: probed
[    4.863164] octeon_wdt: Initial granularity 5 Sec
[    4.868436] EDAC DEVICE0: Giving out device to module octeon-cpu controller cache: DEV octeon_pc_edac (INTERRUPT)
[    4.878874] EDAC DEVICE1: Giving out device to module octeon-l2c controller octeon_l2c_err: DEV octeon_l2c_edac (POLLED)
[    4.889880] octeon_lmc_edac octeon_lmc_edac.0: Disabled (ECC not enabled)
[    4.898783] Interface 0 has 4 ports (SGMII)
[    4.903052] Interface 1 has 4 ports (SGMII)
[    4.908067] Interface 3 has 4 ports (LOOP)
[    4.919281] NET: Registered protocol family 10
[    4.925566] Segment Routing with IPv6
[    4.929306] NET: Registered protocol family 17
[    4.933838] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.946999] 8021q: 802.1Q VLAN Support v1.8
[    4.951862] OF: fdt: not creating '/sys/firmware/fdt': CRC check failed
[    4.958658] Waiting 10 sec before mounting root device...
[   14.325059] mmc0: new DDR MMC card at address 0001
[   14.330334] mmcblk0: mmc0:0001 MMC4GB 3.64 GiB
[   14.335018] mmcblk0boot0: mmc0:0001 MMC4GB partition 1 2.00 MiB
[   14.341101] mmcblk0boot1: mmc0:0001 MMC4GB partition 2 2.00 MiB
[   14.347106] mmcblk0rpmb: mmc0:0001 MMC4GB partition 3 512 KiB, chardev (251:0)
[   14.355146]  mmcblk0: p1 p2
[   15.022598] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[   15.030285] Freeing unused kernel memory: 1340K
[   15.034819] This architecture does not have kernel memory protection.
[   15.041302] Run /sbin/init as init process
[   15.298201] init: Console is alive
[   15.301837] init: - watchdog -
[   15.469725] random: crng init done
[   15.510960] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   15.532379] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   15.537903] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   15.545686] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f06d hci version 0x100 quirks 0x0000000002010010
[   15.555122] xhci-hcd xhci-hcd.0.auto: irq 44, io mem 0x1680000000000
[   15.561629] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   15.567127] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   15.574804] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[   15.581842] hub 1-0:1.0: USB hub found
[   15.585645] hub 1-0:1.0: 1 port detected
[   15.589910] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   15.598402] hub 2-0:1.0: USB hub found
[   15.602223] hub 2-0:1.0: 1 port detected
[   15.608669] usbcore: registered new interface driver uas
[   15.614364] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   15.627494] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   20.531638] F2FS-fs (loop0): Mounted with checkpoint version = 470a8fd2
[   20.539408] mount_root: switching to f2fs overlay
[   20.545284] overlayfs: "xino" feature enabled using 32 upper inode bits.
[   20.573986] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   20.588855] urandom-seed: Seeding with /etc/urandom.seed
[   20.683844] procd: - early -
[   20.686838] procd: - watchdog -
[   21.254472] procd: - watchdog -
[   21.268240] procd: - ubus -
[   21.346667] procd: - init -
Please press Enter to activate this console.
[   21.680050] urngd: v1.0.2 started.
[   21.692692] kmodloader: loading kernel modules from /etc/modules.d/*
[   21.711947] i2c /dev entries driver
[   21.726617] sfp sfp: Host maximum power 1.0W
[   21.730936] sfp sfp: No tx_disable pin: SFP modules will always be emitting.
[   21.758704] PPP generic driver version 2.4.2
[   21.763933] NET: Registered protocol family 24
[   21.772020] kmodloader: done loading kernel modules from /etc/modules.d/*
[   25.491400] br-lan: port 1(lan1) entered blocking state
[   25.496650] br-lan: port 1(lan1) entered disabled state
[   25.502203] device lan1 entered promiscuous mode
[   25.516499] br-lan: port 2(lan2) entered blocking state
[   25.521822] br-lan: port 2(lan2) entered disabled state
[   25.527332] device lan2 entered promiscuous mode
[   25.532178] br-lan: port 2(lan2) entered blocking state
[   25.537429] br-lan: port 2(lan2) entered forwarding state
[   25.543015] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   25.554649] br-lan: port 3(lan3) entered blocking state
[   25.559947] br-lan: port 3(lan3) entered disabled state
[   25.565459] device lan3 entered promiscuous mode
[   25.570301] br-lan: port 3(lan3) entered blocking state
[   25.575562] br-lan: port 3(lan3) entered forwarding state
[   25.585876] br-lan: port 4(lan4) entered blocking state
[   25.591158] br-lan: port 4(lan4) entered disabled state
[   25.596685] device lan4 entered promiscuous mode
[   25.601524] br-lan: port 4(lan4) entered blocking state
[   25.606779] br-lan: port 4(lan4) entered forwarding state
[   25.616716] br-lan: port 5(lan5) entered blocking state
[   25.622006] br-lan: port 5(lan5) entered disabled state
[   25.627519] device lan5 entered promiscuous mode
[   25.632425] br-lan: port 5(lan5) entered blocking state
[   25.637675] br-lan: port 5(lan5) entered forwarding state
[   25.659079] lan0: 1000 Mbps Full duplex, port 1, queue 1
[   25.664932] IPv6: ADDRCONF(NETDEV_CHANGE): lan0: link becomes ready
[   26.540601] br-lan: port 2(lan2) entered disabled state
[   26.547322] br-lan: port 3(lan3) entered disabled state
[   26.553546] br-lan: port 4(lan4) entered disabled state
[   26.559285] br-lan: port 5(lan5) entered disabled state



BusyBox v1.35.0 (2023-04-27 20:28:15 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.5, r20134-5f15225c1e
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data
 may be corrupt. Please run fsck.
/bin/ash: syntax error: unexpected word (expecting ")")
root@OpenWrt:/#ype or paste code here

I was able to try this TFTP method with the initramfs. The file was transferred successfully but bootm produced the following:

Bytes transferred = 21511848 (1483ea8 hex)
Octeon ubnt_e300(ram)# bootm
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Octeon ubnt_e300(ram)#

I'd be very grateful for further help at this point.

Many thanks

I have found that I can still load the initramfs system from USB but cannot mount the sysupgrade file on the usb stick which I think is consistent with other people's reports. So I went on to transfer the sysupgrade file to /tmp by scp. The upgrade then starts but is ineffective leaving the corrupted system as existing without graphical interface. I think the problem must be filesystem corruption - see below with messages about running fsck. Is there anything I can do about this?

Many thanks,
Andrew

typroot@OpenWrt:/# sysupgrade -v /tmp/openwrtsquashfs-sysupgrade.tar
Thu Apr 27 21:21:36 UTC 2023 upgrade: Image metadata not present
Cannot save config while running from ramdisk.
Thu Apr 27 21:21:37 UTC 2023 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: Connection failed
Watchdog handover: fd=3
- watchdog -
Watchdog does not have CARDRESET support
Thu Apr 27 21:21:38 UTC 2023 upgrade: Sending TERM to remaining processes ...
Thu Apr 27 21:21:42 UTC 2023 upgrade: Sending KILL to remaining processes ...
[ 3224.788913] stage2 (2641): drop_caches: 3
Thu Apr 27 21:21:48 UTC 2023 upgrade: Switching to ramdisk...
Thu Apr 27 21:21:49 UTC 2023 upgrade: Performing system upgrade...
[ 3225.963004] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
flashing kernel to /dev/mmcblk0p1
flashing rootfs to /dev/mmcblk0p2
834+0 records in
834+0 records out
[ 3227.157273] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
cp: can't stat '/tmp/sysupgrade.tgz': No such file or directory
Thu Apr 27 21:21:50 UTC 2023 upgrade: Upgrade completed
Thu Apr 27 21:21:51 UTC 2023 upgrade: Rebooting system...
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busye or paste code here

I don’t get this, no image is 700MB. How big is your actual image file?

Many Thanks. I was surprised - the image file is 114881KB. I attach the relevant logfile extract so you can see I'm not confabulating.

Andrew

Reset pressed ...0...1...2...3...4...Reset to defauts mode selected.
...5...6...7...8...9...10...TFTP recovery mode selected.

Starting recovery...
Trying USB storage first
(Re)start USB...
USB0:   Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1:   Starting the controller
USB XHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

 No USB Storage found. Upgrade FW failed!
Using octeth1 device
Listening for TFTP transfer on 192.168.1.20
Load address: 0x20000000
Loading: octeth1: Up 1000 Mbps Full duplex (port  1) (QSGMII)
Received 33527296 bytes
         32 MB received
Received 33263616 bytes
         64 MB received
Received 33502720 bytes
         96 MB received
Received 33492992 bytes
         128 MB received
Received 33288192 bytes
         160 MB received
Received 33288704 bytes
         192 MB received
Received 33340416 bytes
         224 MB received
Received 33479680 bytes
         256 MB received
Received 33374208 bytes
         288 MB received
Received 33445888 bytes
         320 MB received
Received 33531392 bytes
         352 MB received
Received 33515008 bytes
         384 MB received
Received 33262592 bytes
         416 MB received
Received 33255424 bytes
         448 MB received
Received 33396224 bytes
         480 MB received
Received 33299456 bytes
         512 MB received
Received 33358336 bytes
         544 MB received
Received 33359360 bytes
         576 MB received
Received 33447424 bytes
         608 MB received
Received 33466368 bytes
         640 MB received
Received 33460224 bytes
         672 MB received
Received 33359872 bytes
         704 MB received
Received 33320960 bytes
         736 MB received
SPI stage 1 bootloaders
SPI ID: c2:20:17:c2:20
header found at offset 0x2000
Image 1.2: address: 0xffffffffc0000000, header length: 192, data length: 359416
Validating data...
Starting next bootloader at 0xffffffff81000000
Board type: UBNT_E300

U-Boot 2013.07 (UBNT Build Version: e301_001_3f6cf) (Aug 27 2018 - 07:18:51)

Something is seriously wrong with your image since the snapshot without luci is only about 14MB.

Have you built it yourself or from where have you got the image.

No that was the unsuccessful autorecovery with the Ubiquiti recovery image.
My earlier post mentioned the result of TFTP upload with the openwrt initramfs which transferred successfully but bootm produced:

Bytes transferred = 21511848 (1483ea8 hex)
Octeon ubnt_e300(ram)# bootm
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Octeon ubnt_e300(ram)#

As I can still get a successful boot of the initramfs from USB, I'm not sure whether we need to pursue TFTP for this purpose but when the upgrade file is loaded to /tmp with SCP, the sysupgrade result is the corrupt installation which brings up a non-graphical version of openwrt and I'm wondering whether filesystem corruption is concerned as the Ubiquiti images also fail.
BW
Andrew

From the boot logs, comparing mine first with the report on the openwrt device page https://openwrt.org/toh/ubiquiti/edgerouter_6p, the difference is shown below:

Mine:[   22.731879] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Device Page:[   20.623848] F2FS-fs (loop0): Mounted with checkpoint version = 470a8fb5 

The error occurs at the point where 'mount_root: switching to f2fs overlay' is reported. Unfortunately I cannot tell what would be the correct fsck command to use or the correct device assignment to submit as I can't find the structure and content of the filesystems in information I've been able to study so far. Perhaps it's FAT-fs on overlayfs:/overlay?
On the positive side, I have established that the device is functioning as a router and by suitable network settings and attachment to the my other router, it is possible to install additional packages.

Not previously having needed to look far under the hood of openwrt, I have found this problem quite difficult as a non linux expert. Since my last post, I have performed some further investigation with the findings that:

  1. A further attempt to restore the Ubiquiti firmware by the automatic TFTP process appeared to proceed satisfactorily with the file upload only for installation to fail with the report of an md5 checksum error (repeated with a separately downloaded copy of the file).
Using octeth1 device
Listening for TFTP transfer on 192.168.1.20
Load address: 0x20000000
Loading: octeth1: Up 1000 Mbps Full duplex (port  1) (QSGMII)
Received 33062400 bytes
         32 MB received
Received 32687104 bytes
         64 MB received
Received 33173504 bytes
         96 MB received
Received 16974020 bytes
Image           UBNT.EDGEOS
Version:        1.0
Lenght:         117637316
CRC:            3fc3ae7d
Supported devices:
                [0000e300]
                [0000e301]
                [0000e302]
                [0000e303]
reading vmlinux.64.md5
33 bytes read in 303 ms (0 Bytes/s)
md5 checksum error. ▒SPI stage 1 bootloader
SPI ID: c2:20:17:c2:20
header found at offset 0x2000
Image 1.2: address: 0xffffffffc0000000, header length: 192, data length: 359416
Validating data...
Starting next bootloader at 0xffffffff81000000
Board type: UBNT_E300

U-Boot 2013.07 (UBNT Build Version: e301_001_3f6cf) (Aug 27 2018 - 07:18:51)
  1. The output of the df command with the corrupt Openwrt 22.03.5 running on the ER-6P produces an output which is almost the same as this command on a normally running ER4 apart minor differences in the size of tmpfs in use. The only difference in the bootlogs is the absence of the error message cited in previous post about FAT-fs file not being properly unmounted in the normally running system.

  2. Although I cannot get Luci to work, opkg states that it is installed with the up to date version.

  3. The initramfs version of Openwrt 22.03.5 can still be run from USB on the corrupted device with the df output confirming that only the tmpfs is in use with this.

  4. Despite further searches and reading, I remain in ignorance of what I can do to look into or correct the issue causing the single error message in the bootlog.

I would be very grateful for further help regarding this.

Well, that was interesting. What turned out to be the solution was fairly simple but took me a lot of searching to achieve. The problem was corruption of the first MMC partition. This was corrected by loading the initramfs version of openwrt, installing fdisk, dosfstools and repairing the partition. Thereafter 22.03.5 readily displays Luci and the bootlog error has disappeared. I haven't tried again to reinstall UBNT as I have no desire to use it and hopefully the error I experienced will not reappear.
Many thanks for the input received from the community.

Andrew

1 Like