Topic: config changes aren't permanent

My apologies if this is covered somewhere.  I've looked in the
user guide and dug around the wiki a fair bit and can't find this.

I've telnetted in to my newly flashed WRT54G, and changed
the password.  I log out and ssh in no probs.  But everytime I unplug
the power and then plug it back in again, I can't ssh in.  I have to
telnet in to the passwordless root account and change the password
again. 

How do I make this permanent ?

thanks.

Re: config changes aren't permanent

You did use kamikaze 8.09? Did you change the password with "passwd"? What is the output of "mount"? Are you using a jffs2 partition?

Re: config changes aren't permanent

zorxd wrote:

You did use kamikaze 8.09? Did you change the password with "passwd"? What is the output of "mount"? Are you using a jffs2 partition?

Yes, version 8.09


--------------
# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=6848k)
tmpfs on /dev type tmpfs (rw,size=512k)
devpts on /dev/pts type devpts (rw,mode=600)
mini_fo:/tmp/root on / type mini_fo (rw)
---------------

So, no, I am not running a jffs2 part, which I wondered
about when I'd run mount before.  Given that there is
both a rootfs and mini_fo:/tmp/root mounted on /
I am a little confused by the filesystem setup on openwrt.

Nothing I've read so far lead me to think I needed to
explicitly mount an jffs2 part. I just assumed that it was
part of the flashed system and that it was hidden somewhere
behind this magic double mounted /.   I've never seen mini_fo
mentioned in any docs that I can remember.

I've read  openwrt_8.09.pdf and cruised around the docs on
the wiki, but obviously I've missed something.  Can you point
me to what I need to read?

Thanks.

Re: config changes aren't permanent

zorxd wrote:

You did use kamikaze 8.09? Did you change the password with "passwd"? What is the output of "mount"? Are you using a jffs2 partition?

Hm.  Just realized I didn't answer your second question.
Yes, I use passwd to change the root passwd.

FWIW, I'm using release 14511 of 8.09.

Been googling and roaming through the openwrt wiki
and so far I've found nothing that addresses this.  The
closest I've come says I need to delete the symlink
of whatever file I want to edit, then recreate the file.
That was talking about rc4 & 5 of wht russian, though.

Plus "ls" doesn't show /etc/passwd  as being a symlink.

Thanks.

Re: config changes aren't permanent

Openwrt uses two filesystems normally : a read only squashfs and a jffs. When you modify a file in the squashfs, as it can't be written, the change is written in the jffs partition. Your problem seems that instead of a jffs partition you have a tmpfs (RAM drive). So when you reboot, your tmpfs is lost.
What is the size of the firmware you flashed and what is the size of your flash memory?

Re: config changes aren't permanent

zorxd wrote:

[snip]
What is the size of the firmware you flashed and what is the size of your flash memory?

$ ls -l openwrt-wrt54g-squashfs.bin
-rw------- 1 kami kami 2494496 2009-04-28 03:37 openwrt-wrt54g-squashfs.bin

According to table of supported h/w the Linksys WRT54G has 4MB flash.
I don't know how to verify this except maybe the free command:

# free
              total         used         free       shared      buffers
Mem:        13692        10152         3540            0         1112
Swap:            0            0            0
Total:        13692        10152         3540

Re: config changes aren't permanent

also try "df -h"

Re: config changes aren't permanent

zorxd wrote:

also try "df -h"

# df -h
Filesystem                Size      Used   Available   Use%   Mounted on
rootfs                      1.6M      1.6M         0        100%    /
/dev/root                 1.6M      1.6M         0        100%    /rom
tmpfs                       6.7M   116.0k      6.6M         2%    /tmp
tmpfs                    512.0k         0     512.0k         0%    /dev
mini_fo:/tmp/root     1.6M      1.6M         0        100%    /

Realize I never mentioned my wrt54g is v1.1

Just for completeness, output from the problem:

-------------
~$ telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
=== IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
------------------------------------------


BusyBox v1.11.2 (2009-01-06 15:14:38 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (8.09, r14511) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------

root@OpenWrt:/# ls -lF /etc/passwd
-rw-r--r--    1 root     root          119 Oct  6 14:15 /etc/passwd

root@OpenWrt:/# passwd
Changing password for root
New password:
Retype password:
Password for root changed by root

root@OpenWrt:/# ls -lF /etc/passwd
-rw-r--r--    1 root     root          152 Feb  6 04:28 /etc/passwd

root@OpenWrt:/# exit
Connection closed by foreign host.
~$ ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is 97:bc:59:9c:37:d7:92:61:c4:29:26:92:e5:fe:5f:78.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
root@192.168.1.1's password:


BusyBox v1.11.2 (2009-01-06 15:14:38 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (8.09, r14511) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------
root@OpenWrt:~# exit
$

[unplug, replug power]

~$ ssh root@192.168.1.1
ssh: connect to host 192.168.1.1 port 22: Connection refused

$ telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
=== IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
------------------------------------------


BusyBox v1.11.2 (2009-01-06 15:14:38 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (8.09, r14511) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------

root@OpenWrt:/# ls -lF /etc/passwd
-rw-r--r--    1 root     root          119 Oct  6 14:15 /etc/passwd
root@OpenWrt:/#

----------------

Thanks.

Re: config changes aren't permanent

I've just had exactly the same problem, and have just 'solved' it by reflashing with the 2.4 kernel version of 8.09.

I thought the only difference between the 2.4 and 2.6 versions were down to wireless support, although the 2.6 is slightly larger....

Could it be down to the revision of WRT54G? mines a 1.1

Maybe someone can enlighten us?

Re: config changes aren't permanent

mark.clegg wrote:

I've just had exactly the same problem, and have just 'solved' it by reflashing with the 2.4 kernel version of 8.09.

I thought the only difference between the 2.4 and 2.6 versions were down to wireless support, although the 2.6 is slightly larger....

where did you find 8.09 with a 2.4 kernel (how do you know what kernel version a .bin contains)

Re: config changes aren't permanent

http://downloads.openwrt.org/kamikaze/8.09/brcm-2.4/

Running Kamikaze r15927 on a Netgear DG834v1

Re: config changes aren't permanent

I thought that was for a different Broadcom chip when I saw it, not a
kernel version.   Thanks for the link.

13 (edited by kamispaz 2009-05-07 08:38:51)

Re: config changes aren't permanent

mark.clegg wrote:

I've just had exactly the same problem, and have just 'solved' it by reflashing with the 2.4 kernel version of 8.09.

Yea, that solved the problem for me, too.

Thanks a bundle.  Now I can get to work on this thing.

I've filed bug report on this:

https://dev.openwrt.org/ticket/5071