Can't update my password in failsafe mode since the router is in Read-only mode

Posted by GuGuss 
Can't update my password in failsafe mode since the router is in Read-only mode
June 19, 2013 10:55PM
Hi,

I'm connected to the router in failsafe mode using telnet.

When trying to update my password with passwd, I got the following error:
passwd: /etc/passwd: Read-only file system
passwd: can't update password file /etc/passwd

And when trying to run mount_run, I got the following error:
/sbin/mount_root: line 1: pi_include: not found
/sbin/mount_root: line 1: pi_include: not found
/sbin/mount_root: line 1: set_jffs_mp: not found
/sbin/mount_root: line 1: determine_root_device: not found
switching to jffs2

Not sure what's happening here ! I might have stayed too long pushing the WPS button and hard-resetted the router...
Re: Can't update my password in failsafe mode since the router is in Read-only mode
June 19, 2013 11:08PM
Actually, this post helped me to fix it and enable SSH access.
Re: Can't update my password in failsafe mode since the router is in Read-only mode
June 20, 2013 12:27PM
Hi GuGuss,
you should try to reflash your router. I assume, that you are using an MR3020 , but this method works for all routers- only exchange the image link. I assume you have Linux-Computer with a working python installation.

1. Connect your laptop to the internet.
2. open a Terminal and run

Language: PHP
cd /tmp wget http://stable.openwrt.piratebox.de/ar71xx_AA/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin

3. After you had downloaded the image, run the following command to launch a small basic webserver:

*Python 2.7*
   python -m SimpleHTTPServer 8000

When this fails- you maybe have Python 3.x
   python3 -m http.server

4. Then connect to your MR3020 and boot it into failsafe mode
5. Set your computer to static IP 192.168.1.2
6. Open
   telnet  192.168.1.1
7. run the following command to download the image onto your MR3020
   cd /tmp
   wget [192.168.1.2]
8. if this worked, flash the image (the exact MTD-command may differ on other hardware)
   mtd write openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin firmware
8. After that initiate a hard reboot:
 reboot -f

Then you have a fresh install. Sometimes something went wrong on the router. Sometimes, I call it "bit is switched wrong", the flash does not work on the first time.. especially if you have a corrupt system. You can recognize that, when your OpenWRT doesn't store your changes- then simply reflash like above.

Hope this helps.

Best wishes
Matthias
Re: Can't update my password in failsafe mode since the router is in Read-only mode
June 22, 2013 03:49PM
Transfered it to my wiki: [piratebox.aod-rpg.de]
Re: Can't update my password in failsafe mode since the router is in Read-only mode
July 16, 2013 01:53PM
Works as a charm ! Thanks ^^
Thank you very much, I have a TP link 841N and had only telnet access to busybox, I managed to fix it because I had put a wrong firmware by adapting this, thanks alot! btw I had to do this process 2 times for it to work.

1. Connect your laptop to the internet.
2. open a Terminal and run

Language: cd /tmp
wget [downloads.openwrt.org] or just put link into browser it will start the download

3. After you had downloaded the image, run the following command to launch a small basic webserver:
First open CMD then cd:\Python34 (where i installed python)
Then type python3 -m http.server 8000 and press enter (this will make your computer(192.168.1.2) into a http server
Copy the openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-factory.bin in C:\Python34\ , I would recommend renaming openwrt-ar... to open.bin
4. Then connect to your tplink 841n/841ND and boot it into failsafe mode
5. Set your computer to static IP 192.168.1.2
6. Open
telnet 192.168.1.1
7. run the following command to download the image onto your 841n
cd /tmp
wget [192.168.1.2] or wget [192.168.1.2]
8. if this worked, flash the image (the exact MTD-command may differ on other hardware)
mtd write open.bin firmware
8. After that initiate a hard reboot:
reboot -f

As I said I had to do this 2 times for my router
You save my day. Thank you.
I want to make a wi-fi radio. I needed to reinstall the image after I change the ISP and something was wrong. Based upon your tutorial I write the image which was downloaded directly from my www folder on PC ( wget [192.168.1.2] ). The file image.bin was my image file renamed for simplicity of the syntax. Therefore, if you have on PC the LAMP server installed you don't need to create a http server with phytoon, because you have already one server running. I have the 3020 router. Thank you again for your tutorial.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
 **    **  ********  **     **  ********   ********  
  **  **   **        ***   ***  **     **  **     ** 
   ****    **        **** ****  **     **  **     ** 
    **     ******    ** *** **  **     **  ********  
    **     **        **     **  **     **  **     ** 
    **     **        **     **  **     **  **     ** 
    **     ********  **     **  ********   ********  
Message: