Can't change root password on OpenWrt because of read-only file system


I recently purchased Mini Router/PC with Raspberry Pi Compute Module 4, Dual Gigabit Ethernet NICs, 4GB RAM/32GB eMMC, Support OpenWRT. I was able to power it up and ssh in as root, however when I try to set a password, I get an error saying…

passwd: /etc/passwd: Read-only file system
passwd: can’t update password file /etc/passwd

My research thus far has not yielded any solutions that work (e.g. remounting, mtd, etc…).

The only other solution that I haven’t tried yet is re-flashing the OpenWRT image on to the RPi’s eMMC. Before I crack the box and do that, I thought I would see if anyone might point out something obvious that I’ve missed.


Just got mine yesterday and have the same issue. I was going to reimage it also but thought I’d do the same thing you did and search first. Maybe I’ll wait a day and see if we get any replies.


Unfortunately the same thing happen with me, it is shipped with a bugged openwrt img.

I downloaded the latest version and flashed it to the emmc and the problem is fixed.

follow this

Same for me on both counts, the file system was read-only, and I flashed their latest build, and it is working as intended. The only issue I am working through is that there is so much bloat on their custom-built. I don’t want or need asterisk, docker, or a NAS because I already have those. I was looking for a lightweight firewall.

I tried the stock CM4 build, but it lacks their custom driver for the second NIC. I am curious if they have a clean stock build.

Thanks for the replies. As noted by others, I was able to reflash the image on to the eMMC and everything works a treat now.