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

Hi,

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.

Thanks,
Brett

1 Like

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.

doug-

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.

1 Like

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.

Brett

Hi Seeed support folks… Surely having to take 15 steps to refresh the OS is not how this is supposed to work… Can you fix the image you pre-install so that /etc isn’t on a read-only file system? (This is still happening, and I just received my new mini-router via DHL today.)

I love Seeed Studio, but I didn’t expect to have to rebuild the router to make it work. You guys usually have a better user experience!

Just got one today, same problem.

Same Issue.

Seems Seeed hasn’t fixed this, and I see no other way to let them know.

I was hoping to get other items from them, but this first purchase has left me looking elsewhere.

I have been unable to mount or re-flash. I jumper the pins and connect with USB-C, but only the /boot drive shows up. In the web gui, I uploaded a recommended image, and it seems to proceed, but still an R/O filesystem. Can someone tell me exactly what they connected? thanks.

This is still happening on May 24, 2022.

The solution (for me at least) is to follow this guide to install to eMMC, however what you want to do instead of grabbing the latest image is grab the 2021-11-19 factory image, and then after it’s installed and has booted up, then grab the latest sysupgrade image to update the box.

Also double check you have the Ethernet cables plugged into the right slots that the default config expects.

One thing not clear in the guide, is that need to connect from desktop computer to the the USB C / power connector. Thanks. Now able to mount drive after running rpiboot utility.

whatever reason is this I cannot flash the eMMC
i do it by manual. It was only once when boot appeared in windows but disappeared before I was able to do anything. I tried on three different PCs and the problem is the same basically it is stuck on Waiting for BCM2835/6/7/2711…
anyone knows what I am doing wrong?
Thanks for any help!

ok. so instead of reflashing eMMC. just ssh root@192.168.2.1 and type
e2fsck -y -v -f /dev/mmcblk0p2
problem solved.

1 Like

I had the same problem… Found the solution here [OpenWrt Wiki] Resetting the root password