Hi I installed Openwrt 19.07.8 on a used lanner 7525A devices which has serial console, 2xusb and 6xGbe interfaces. I used the combined ext4 image and wanted to upgrade from the Luci web interface to version 21.02. I did not use the sysupgrade image but used the combined ext4 image. During the upgrade, there was a pop-up if I want to keep settings and I chose yes. Now after the upgrade completed I lost complete access to the device and when I connect a PC to the interfaces I don't get DHCP and even static IP does not result in any communications. to make matters worse, the serial interface output seems to be complete garbage (just three white lines repeated). The device has 4GB compact flash. Is there any hope to recover this thing?
Thanks in advance
You basically have two different approaches:
- attach a serial console or keyboard/ monitor (if possible) and fix the system/ configuration
while you might end up having to reflash anyways, this should at least help you finding out what went amiss
- reflash the compact flash externally (or from a booted USB live medium)
this is the nuclear option, which won't help you finding out what the original issue has been, but should get you going in the least amount of time
For the future, I would suggest testing sysupgrades a couple of times, before putting the device back into production (e.g., you might be lacking important non-default kernel modules for some component, e.g. the network card - so make sure you have everything necessary in your sysupgrade image (e.g. via imagebuilder)).
Thanks for the pointers. Here is what I have tried:
I attached a serial console cable and used the previous baud rate (115200) and other putty settings. The oputput when I press any key is three white lines which are unreadable.
used bootable debian live USB drive and press tab on the boot menu selection to put "console=ttys0, 115200n8" and press enter. Then after there will be no response what so ever.
My next plan is to remove the compact flash and connect to a PC using compact flash reader. How do I flash the CF externally and install on it?
BIOS (legacy CSM):
zcat openwrt-x86-64-generic-squashfs-combined.img.gz >/dev/sdX
zcat openwrt-x86-64-generic-squashfs-combined-efi.img.gz >/dev/sdX
sdX (make really sure to target the correct device, your compact flash, and don't overwrite anything crucial on your host system) with the raw block your compact flash shows up with. Yes, you could also first
gunzip the image and then use ordinary
cat instead of
zcat (which might not be available everywhere).
For Windows, take a look at the documentation for RPi or linux live (USB) users, I'm not using WIndows myself.
Thanks a lot.
Is the BIOS choice for the Openwrt device or the linux/windows machine I use to flash the CF card?
It's for your target device (lanner) you're intending to run OpenWrt on, which either boots in legacy BIOS (CSM) mode or UEFI. The computer you're using to flash the compact flash card doesn't matter for this, it's just the tool to write the cf card.
After I flash the CF card using a linux computer as per your suggestion, I put the CF card back in to the lanner device and connect serial console to observe the boot message. It gets stuck at " GRUB Loading...."
I used the squashfs image when I faced the grub loading issue and after that I flashed using the combined-ext4 image. Now It continued normal boot.
Thank you so much for the invaluable help
I have had this experience with RaspberryPi images also, only the “ext4” image works but the build process build the other images also.
But I don’t know why the other images are built since only the ext4 images actually work?
hmm, interesting, I've been successfully using x86_64/ efi/ squashfs (master snapshot-) images for the last couple of months, sysupgrading hasn't been an issue for me (ivy-bridge c1037u, 500g/4g).
I tried with 21.02-snapshot but it is a couple of weeks ago.