GLinet MT6000 flashed to OpwnWrt snapshot but seems to be read-only

I flashed a custom image (snapshot) to brand new GL.inet AT6000 using sysupgrade -v -n /tmp/image.img. The IP address changed from 192.168.8.1 to 192.168.1.1 upon rebooting. I can ssh into the device, but none of my changes to files such as /etc/config/network are saved upon rebooting it. It is as-if the system is booted into a read-only mode.

A more simple test was just changing the hostname in LuCI and setting the timezone. Upon rebooting, the hostname reverted to "OpenWrt" and the timezone reverted to UTC.

How can I recover from this so I can setup the device?

EDIT: the output of cat /proc/mtd is null:

root@OpenWrt:~# cat /proc/mtd
dev:    size    erasesize   name

Do you mean MT6000 ?

Yes, typo.

Ah, yes! I ran into the same situation when I tried to take my existing RT3200 config and "convert" it over to MT6000. If you run a mount command, you will probably spot the issue pretty quickly. Here is what it should look like on a working MT6000 image:

root@AP-LivingRoom:~# mount
/dev/root on /rom type squashfs (ro,relatime,errors=continue)
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)
/dev/loop0 on /overlay type f2fs (rw,lazytime,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=reuse,checkpoint_merge,fsync_mode=posix,discard_unit=block,memory=normal)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work,xino=off)
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)

In particular, /dev/loop0 and overlayfs:/overlay are likely showing read only for you.

I'm not sure if there was a better way to correct the config, but I ended up creating a brand new env in my OpenWrt build system for MT6000 and started from scratch.

The good news is that if you left the OEM bootloader in place, you can very easily just use it to flash the new, good MT6000 image once you get it built with the correct filesystem configuration.


In case it helps you and others, here's the config I currently build with for my MT6000s. Feel free to drop some of the extra packages as needed (things like htop, usteer, procps-ng*, etc are things I like to include). FWIW, I prefer OpenSSL and OpenSSH, so make sure you also include dropbear if you don't include a pre-built OpenSSH config file in your build. :wink:

CONFIG_TARGET_mediatek=y
CONFIG_TARGET_mediatek_filogic=y
CONFIG_TARGET_mediatek_filogic_DEVICE_glinet_gl-mt6000=y
CONFIG_DEVEL=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BPF_TOOLCHAIN_HOST=y
CONFIG_BPF_TOOLCHAIN_HOST_PATH="/usr/lib/llvm-18"
# CONFIG_BPF_TOOLCHAIN_NONE is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_REVERSE_SEARCH=y
CONFIG_CCACHE=y
CONFIG_HAS_BPF_TOOLCHAIN=y
CONFIG_HTOP_LMSENSORS=y
CONFIG_OPENSSH_LIBFIDO2=y
CONFIG_OPENSSL_ENGINE=y
CONFIG_OPENSSL_OPTIMIZE_SPEED=y
CONFIG_OPENSSL_WITH_ASM=y
CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y
CONFIG_OPENSSL_WITH_CMS=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y
CONFIG_OPENSSL_WITH_IDEA=y
CONFIG_OPENSSL_WITH_MDC2=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SEED=y
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_OPENSSL_WITH_TLS13=y
CONFIG_OPENSSL_WITH_WHIRLPOOL=y
CONFIG_PACKAGE_bridger=y
CONFIG_PACKAGE_cgi-io=y
CONFIG_PACKAGE_diffutils=y
# CONFIG_PACKAGE_dnsmasq is not set
# CONFIG_PACKAGE_dropbear is not set
CONFIG_PACKAGE_ethtool=y
CONFIG_PACKAGE_firewall=y
# CONFIG_PACKAGE_firewall4 is not set
CONFIG_PACKAGE_hostapd-openssl=y
CONFIG_PACKAGE_hostapd-utils=y
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_iftop=y
CONFIG_PACKAGE_irqbalance=y
CONFIG_PACKAGE_kmod-crypto-sha3=y
CONFIG_PACKAGE_kmod-ipt-conntrack=y
CONFIG_PACKAGE_kmod-ipt-core=y
CONFIG_PACKAGE_kmod-ipt-nat=y
CONFIG_PACKAGE_kmod-nf-ipt=y
# CONFIG_PACKAGE_kmod-ppp is not set
CONFIG_PACKAGE_kmod-sched-act-vlan=y
CONFIG_PACKAGE_kmod-sched-bpf=y
CONFIG_PACKAGE_kmod-sched-core=y
CONFIG_PACKAGE_kmod-sched-flower=y
CONFIG_PACKAGE_kmod-tcp-bbr=y
CONFIG_PACKAGE_libbpf=y
CONFIG_PACKAGE_libcbor=y
CONFIG_PACKAGE_libelf=y
CONFIG_PACKAGE_libevdev=y
CONFIG_PACKAGE_libfido2=y
CONFIG_PACKAGE_libip4tc=y
CONFIG_PACKAGE_libip6tc=y
CONFIG_PACKAGE_libiptext=y
CONFIG_PACKAGE_libiptext6=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-ucode=y
# CONFIG_PACKAGE_libmbedtls is not set
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libopenssl-conf=y
CONFIG_PACKAGE_libopenssl-legacy=y
CONFIG_PACKAGE_libpcap=y
CONFIG_PACKAGE_libpcre2=y
CONFIG_PACKAGE_libsensors=y
CONFIG_PACKAGE_libsysfs=y
CONFIG_PACKAGE_libudev-zero=y
# CONFIG_PACKAGE_libustream-mbedtls is not set
CONFIG_PACKAGE_libustream-openssl=y
CONFIG_PACKAGE_libxtables=y
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-app-usteer=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-light=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-dashboard=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-ssl-openssl=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-openwrt-2020=y
# CONFIG_PACKAGE_odhcpd-ipv6only is not set
CONFIG_PACKAGE_openssh-client=y
CONFIG_PACKAGE_openssh-keygen=y
CONFIG_PACKAGE_openssh-server=y
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_patch=y
# CONFIG_PACKAGE_ppp is not set
CONFIG_PACKAGE_procps-ng=y
CONFIG_PACKAGE_procps-ng-ps=y
CONFIG_PACKAGE_procps-ng-watch=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_rpcd-mod-ucode=y
CONFIG_PACKAGE_sysfsutils=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_ucode-mod-html=y
CONFIG_PACKAGE_ucode-mod-math=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_umdns=y
CONFIG_PACKAGE_usteer=y
CONFIG_PACKAGE_wget-ssl=y
# CONFIG_PACKAGE_wpad-basic-mbedtls is not set
CONFIG_PACKAGE_zlib=y
CONFIG_TARGET_OPTIMIZATION="-Os -pipe -mcpu=cortex-a53 -mtune=cortex-a53"
CONFIG_TARGET_OPTIONS=y
CONFIG_USE_LLVM_HOST=y
CONFIG_PACKAGE_jansson=y
CONFIG_PACKAGE_kmod-nft-fib=y
CONFIG_PACKAGE_libmnl=y
CONFIG_PACKAGE_libnftnl=y
CONFIG_PACKAGE_nftables-json=y

Yes, I took my .config for my Redmi AX6000, ran make nconfig on it and changed the targets in there retaining the package set. Is that REALLY what's driving this?

CONFIG_TARGET_mediatek=y
CONFIG_TARGET_mediatek_filogic=y
CONFIG_TARGET_mediatek_filogic_DEVICE_glinet_gl-mt6000=y
CONFIG_LINUX_6_6=y
CONFIG_PACKAGE_attendedsysupgrade-common=y
CONFIG_PACKAGE_cgi-io=y
# CONFIG_PACKAGE_e2fsprogs is not set
# CONFIG_PACKAGE_f2fsck is not set
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_kmod-crypto-geniv=y
CONFIG_PACKAGE_kmod-crypto-sha3=y
CONFIG_PACKAGE_kmod-ikconfig=y
CONFIG_PACKAGE_kmod-leds-ws2812b=y
# CONFIG_PACKAGE_kmod-nls-base is not set
# CONFIG_PACKAGE_kmod-usb-core is not set
# CONFIG_PACKAGE_kmod-usb3 is not set
CONFIG_PACKAGE_libatomic=y
# CONFIG_PACKAGE_libblkid is not set
CONFIG_PACKAGE_libcap=y
# CONFIG_PACKAGE_libcomerr is not set
# CONFIG_PACKAGE_libe2p is not set
# CONFIG_PACKAGE_libext2fs is not set
# CONFIG_PACKAGE_libf2fs is not set
CONFIG_PACKAGE_libiperf3=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-ucode=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libpcre=y
CONFIG_PACKAGE_libpcre2=y
CONFIG_PACKAGE_libpopt=y
CONFIG_PACKAGE_libsmartcols=y
# CONFIG_PACKAGE_libss is not set
# CONFIG_PACKAGE_libuuid is not set
CONFIG_PACKAGE_libwolfssl=y
CONFIG_PACKAGE_lscpu=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-attendedsysupgrade=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-light=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
# CONFIG_PACKAGE_mkf2fs is not set
CONFIG_PACKAGE_ncdu=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rpcsys=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_rpcd-mod-ucode=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_ucode-mod-html=y
CONFIG_PACKAGE_ucode-mod-math=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_vim-fuller=y
# CONFIG_PACKAGE_wpad-basic-mbedtls is not set
CONFIG_PACKAGE_wpad-basic-wolfssl=y
CONFIG_PACKAGE_zlib=y
CONFIG_PACKAGE_zsh=y
CONFIG_TESTING_KERNEL=y
CONFIG_WOLFSSL_HAS_NO_HW=y
CONFIG_WPA_WOLFSSL=y

I don't see loop at all...

root@OpenWrt:~# mount
/dev/root on /rom type squashfs (ro,relatime,errors=continue)
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 /tmp/root type tmpfs (rw,noatime,mode=755)
overlayfs:/tmp/root on / type overlay (rw,noatime,lowerdir=/,upperdir=/tmp/root/upper,workdir=/tmp/root/work,uuid=on,xino=off)
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)

Well, I did rebuilt the config from scratch and that seemed to fix it.

CONFIG_TARGET_mediatek=y
CONFIG_TARGET_mediatek_filogic=y
CONFIG_TARGET_mediatek_filogic_DEVICE_glinet_gl-mt6000=y
CONFIG_LINUX_6_6=y
CONFIG_PACKAGE_cgi-io=y
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_kmod-crypto-geniv=y
CONFIG_PACKAGE_kmod-crypto-sha3=y
CONFIG_PACKAGE_libcap=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-ucode=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libpcre2=y
CONFIG_PACKAGE_libwolfssl=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-light=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_ncdu=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_rpcd-mod-ucode=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_ucode-mod-html=y
CONFIG_PACKAGE_ucode-mod-math=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_vim-fuller=y
CONFIG_PACKAGE_wpad-basic-mbedtls=m
CONFIG_PACKAGE_wpad-basic-wolfssl=y
CONFIG_PACKAGE_zsh=y
CONFIG_TESTING_KERNEL=y
CONFIG_WOLFSSL_HAS_NO_HW=y
CONFIG_WPA_WOLFSSL=y
1 Like

You should have mentioned that in your first post. Similarly, you should have mentioned that you tried to use the testing kernel 6.6

It is rather risky to start with a new router with a heavily modified config... And copying from another device needs to be really carefully regarding the excluded packages.

Without looking at the failing config too closely, I guess that reason for failure might be one of your intentional package exclusions in .config

3 Likes
  1. I think you only want to define the mcpu value not both mcpu and mtune, see here.

  2. Why are you compiling with -Os with 8G of root fs? Using-O2 might get better performance.

  3. You might want to add:

CONFIG_KERNEL_CFLAGS="-mcpu=cortex-a53"
CONFIG_BUSYBOX_CONFIG_EXTRA_CFLAGS="-mcpu=cortex-a53"
CONFIG_DEFAULT_TARGET_OPTIMIZATION="-O2 -pipe -mcpu=cortex-a53"

Does your htop actually show a temp or CPU freq? Mine did not so I removed that config symbol.

1 Like

Wow! I never realized there was such nuance with regard to ARM. Thanks for making me aware!

Can't honestly say why I was building with -Os in this case. I build with -O2 for my x86 OpenWrt box. Must have been a copy/paste from a bad starting point... sigh Anyway, thanks for bringing it to my attention as I definitely want to use -O2 :slight_smile:

Absolutely! I'm going to fix these up in my build and crank out a new image. Much appreciated!

It does, actually. I don't see CPU freq (which I wish I could), but do see temps:

Mine not displaying them must be due to the 6.6 kernel I am running missing something... The sensor is exposed on the filesystem though:

# uname -a
Linux GL-AP 6.6.22 #0 SMP Sat Mar 16 21:53:35 2024 aarch64 GNU/Linux

# cat /sys/devices/virtual/thermal/thermal_zone0/temp
38600

Interesting :face_with_monocle: I tried the 6.6 kernel for a few hours recently, but reverted to 6.1 as I have been very actively helping rany2 and Felix chase down some of the recent mt76/AQL bugs and didn't want to confuse the testing/results with the kernel 6.6 variable.

1 Like

@_FailSafe - turns out I think htop is missing a dependency. If I manually install libsensors5 I get the temp in htop.

1 Like

Ah! Great find! Kudos for making others aware of the same :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.