I've tried to flash a new snapshot on my router and it seemed to run fine, but any attempts to edit configuration files failed, the router not saving any changes on reboot. Upon further inspecton, I've noticed there's no overlayfs. Running df -h shows only three tempfs...es mounted on /, /tmp and /dev. Did the update fail? How do I recover from this?
let's see some details here:
ubus call system board
mount
df -h
Okay, here's the output:
root@OpenWrt:~# ubus call system board
{
"kernel": "6.6.50",
"hostname": "OpenWrt",
"system": "ARMv8 Processor rev 4",
"model": "Xiaomi Mi Router AX3000T (OpenWrt U-Boot layout)",
"board_name": "xiaomi,mi-router-ax3000t-ubootmod",
"rootfs_type": "initramfs",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"revision": "r27350-c4a9265160",
"target": "mediatek/filogic",
"description": "OpenWrt SNAPSHOT r27350-c4a9265160"
}
}
root@OpenWrt:~# mount
tmpfs on / type tmpfs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
pstore on /sys/fs/pstore type pstore (rw,noatime)
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 117.0M 21.5M 95.5M 18% /
tmpfs 117.0M 196.0K 116.8M 0% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
This is why:
You have the initramfs version running -- you need to run sysupgrade with the sysupgrade image (not the initramfs).
Thing is, the image I used is a sysupgrade image! "openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb"
What happens if you flash a release build?
Do I need to choose the sysupgrade image to do that?
Yes. Sysupgrade.
root@OpenWrt:~# sysupgrade -v /tmp/openwrt-23.05.5-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrad
e.itb
Cannot save config while running from ramdisk.
Thu Jan 1 00:10:25 UTC 1970 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: Connection failed
root@OpenWrt:~# Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.
It then boots right back up, running the same snapshot as before. Odd.
You’re using the openwrt uboot images, do you have the openwrt uboot installed?
I certainly did before I've attempted to update the firmware. How do I check if it's still there?
I figure I'm supposed to flash some other image, correct? If my rootfs is initramfs and the model is "Xiaomi Mi Router AX3000T (OpenWrt U-Boot layout)", which image should I go for?
I'm not sure if bumping threads is allowed, but I'm seriously confused as to what should I do. Any help, please?
You should clear the pstore.
rm -f /sys/fs/pstore/*