17.01.4 on Netgear WNR2000v1 doesn't save config

hi,
I had old Netgear WNR2000v1 flashed with OpenWRT Backfire (10.03) years ago. Today, I needed additional router so I dug it out from my drawer and flashed with LEDE Reboot 17.01.4 r3560-79f57e422d / LuCI lede-17.01 branch (git-17.290.79498-d3f0685). Flash process looked fine (I followed instructions step by step from here https://openwrt.org/toh/netgear/wnr2000). Router is booting up, can be configured but then after reboot or power off it looses all settings (including password, hostname, address on interfaces, etc). I am pretty sure it has something to do with upgrade process as before was fine but I don't know what. I am not attaching any config / logs so far as I don't know where to start looking. My logs from serial console upgrade process are gone cause after successful boot I didn't thing I would need them and closed console window.

Any help very much appreciated!

Please connect over ssh and post the output of "df -h".
I think there isn't enough storage to save anything or you have flashed a initram image...

hi,
I flashed it with (history output)

 1160  mv lede-17.01.4-ar71xx-generic-wnr2000-rootfs-squashfs.bin sqfs.bin
 1161  mv lede-17.01.4-ar71xx-generic-uImage-lzma.bin uImage.bin
root@LEDE:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    13.8M    544.0K     13.2M   4% /tmp
tmpfs                    13.8M     72.0K     13.7M   1% /tmp/root
overlayfs:/tmp/root      13.8M     72.0K     13.7M   1% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@LEDE:~#

LUCI reported it as

Memory
Total Available	9328 kB / 28176 kB (33%)
Free	7356 kB / 28176 kB (26%)
Buffered	1972 kB / 28176 kB (6%)

To be more concise on the upgrade process I followed steps from the instructions above but skipping bootloader part of fuhry (repart script) as openwrt was already there. I hope it was obvious

Your overlay filesystem is in ram and non persistent...
Could you also post the complete bootlog?
ssh to router and execute dmesg

Use pastebin or the hide details option...

[    0.000000] Linux version 4.4.92 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3101-bce140e) ) #0 Tue Oct 17 14:59:45 2017
[    0.000000] MyLoader: sysp=aaaa5554, boardp=aaaa5554, parts=aaaa5554
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9130 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] No valid device tree found, continuing without
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 803d04d0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: board=WNR2000 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro rootfstype=squashfs,jffs2 noinitrd mem=32M rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 27864K/32768K available (3076K kernel code, 160K rwdata, 412K rodata, 312K init, 205K bss, 4904K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007884] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.090588] pid_max: default: 32768 minimum: 301
[    0.095362] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.101971] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.112198] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.122008] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.129595] NET: Registered protocol family 16
[    0.135790] MIPS: machine is NETGEAR WNR2000
[    0.596469] Can't analyze schedule() prologue at 800670fc
[    0.613344] clocksource: Switched to clocksource MIPS
[    0.619833] NET: Registered protocol family 2
[    0.625450] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.632422] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.638843] TCP: Hash tables configured (established 1024 bind 1024)
[    0.645341] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.651181] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.657764] NET: Registered protocol family 1
[    0.662141] PCI: CLS 0 bytes, default 32
[    0.667063] Crashlog allocated RAM at address 0x1f00000
[    0.690812] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.696694] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.709527] io scheduler noop registered
[    0.713506] io scheduler deadline registered (default)
[    0.718888] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.729173] console [ttyS0] disabled
[    0.752775] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.761475] console [ttyS0] enabled
[    0.768497] bootconsole [early0] disabled
[    0.782158] m25p80 spi0.0: found mx25l3205d, expected m25p80
[    0.787956] m25p80 spi0.0: mx25l3205d (4096 Kbytes)
[    0.792892] 4 cmdlinepart partitions found on MTD device spi0.0
[    0.798863] Creating 4 MTD partitions on "spi0.0":
[    0.803697] 0x000000000000-0x000000040000 : "u-boot"
[    0.811313] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.818735] 0x000000050000-0x0000003f0000 : "firmware"
[    0.832239] 2 uimage-fw partitions found on MTD device firmware
[    0.838270] 0x000000050000-0x0000002b0000 : "rootfs"
[    0.845147] mtd: device 3 (rootfs) set to be root filesystem
[    0.850885] 1 squashfs-split partitions found on MTD device rootfs
[    0.857181] 0x000000270000-0x0000002b0000 : "rootfs_data"
[    0.864730] 0x0000002b0000-0x0000003e31aa : "kernel"
[    0.871774] 0x0000003f0000-0x000000400000 : "art"
[    0.899257] libphy: ag71xx_mdio: probed
[    1.225527] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[    1.544795] ag71xx ag71xx.1: connected to PHY at ag71xx-mdio.0:04 [uid=004dd042, driver=Generic PHY]
[    1.554928] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RMII
[    1.563641] NET: Registered protocol family 10
[    1.572591] NET: Registered protocol family 17
[    1.577222] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.590039] 8021q: 802.1Q VLAN Support v1.8
[    1.600911] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.609985] Freeing unused kernel memory: 312K
[    2.913935] init: Console is alive
[    2.917620] init: - watchdog -
[    4.003132] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.100541] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.118947] init: - preinit -
[    4.645618] ar71xx: pll_reg 0xb8050014: 0x13000a44
[    4.645655] eth0: link up (100Mbps/Full duplex)
[    4.677040] random: procd: uninitialized urandom read (4 bytes read, 7 bits of entropy available)
[    8.003999] mount_root: no usable overlay filesystem found, using tmpfs overlay
[    8.016641] urandom-seed: Seed file not found (/etc/urandom.seed)
[    8.285018] eth0: link down
[    8.300957] procd: - early -
[    8.304147] procd: - watchdog -
[    8.977867] procd: - watchdog -
[    8.981356] procd: - ubus -
[    9.113432] random: ubusd: uninitialized urandom read (4 bytes read, 14 bits of entropy available)
[    9.210818] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.220428] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.229642] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.239131] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.248298] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.257572] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.266890] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.276404] procd: - init -
[    9.676654] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.688108] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.706702] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[    9.714828] Backport generated by backports.git backports-20160324-13-g24da7d3c
[    9.725903] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.740463] nf_conntrack version 0.5.0 (440 buckets, 1760 max)
[    9.784777] xt_time: kernel timezone is -0000
[    9.850776] PPP generic driver version 2.4.2
[    9.858034] NET: Registered protocol family 24
[    9.946955] ath: EEPROM regdomain: 0x0
[    9.946982] ath: EEPROM indicates default country code should be used
[    9.946995] ath: doing EEPROM country->regdmn map search
[    9.947019] ath: country maps to regdmn code: 0x3a
[    9.947035] ath: Country alpha2 being used: US
[    9.947048] ath: Regpair used: 0x3a
[    9.987328] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.993841] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2122 RF Rev:a2 mem=0xb80c0000, irq=2
[   10.148252] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.434488] random: jshn: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[   19.743591] jffs2: Too few erase blocks (4)
[   23.305973] ar71xx: pll_reg 0xb8050014: 0x13000a44
[   23.306253] eth0: link up (100Mbps/Full duplex)
[   23.315641] device eth0 entered promiscuous mode
[   23.344765] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   23.411818] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   24.304972] br-lan: port 1(eth0) entered forwarding state
[   24.310482] br-lan: port 1(eth0) entered forwarding state
[   24.353958] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   26.303544] br-lan: port 1(eth0) entered forwarding state
[   68.633431] random: nonblocking pool is initialized
root@LEDE:~#
root@LEDE:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 003a0000 00010000 "firmware"
mtd3: 00260000 00010000 "rootfs"
mtd4: 00040000 00010000 "rootfs_data"
mtd5: 001331aa 00010000 "kernel"
mtd6: 00010000 00010000 "art"

is this
[ 19.743591] jffs2: Too few erase blocks (4)
the reason? How to fix it then?

There seems to be a problem with your rootfs_data mtd partition... hence there is one printed some lines above...

Try to flash a sysupgrade image with sysupgrade -n with ssh console:

cd /tmp
wget http://downloads.openwrt.org/releases/17.01.5/targets/ar71xx/generic/lede-17.01.5-ar71xx-generic-wnr2000-squashfs-sysupgrade.bin
sysupgrade -n lede-17.01.5-ar71xx-generic-wnr2000-squashfs-sysupgrade.bin

not supported apparently:

root@LEDE:/tmp# sysupgrade -n lede-17.01.5-ar71xx-generic-wnr2000-squashfs-sysupgrade.bin 
Image metadata not found
Sysupgrade is not yet supported on wnr2000.
Image check 'platform_check_image' failed.

Too large firmware. Not enough free space for jffs2 partition.
No solution except a smaller firmware image.

strange... my understanding was that the one downloaded is prepared for the size of the device (as per its name).

I am not afraid of building my own but as I understand this would require setting up some dedicated environment, etc. or is it maybe available somewhere as a VM or so?

Openwrt is growing in size,, e.g. due to kernel size growth, and small old devices will not take the newest versions.
Read 4/32 warnings ...

https://openwrt.org/supported_devices/432_warning

thanks for the hint. it is strange however as whereas I understand building own image can save space I still don't get why image dedicated for this HW is not fitting it.

Because no one is actively checking whether every image for every device still fits. It used to fit a few years ago and it still fits in so far as that the squashfs partition can be written to flash without getting truncated, but the remaining free flash space after it is not enough to format a persistent overlay.

Assuming that available space per device is known and also the needed space including free erase blocks: What is hindering in doing this check automatically and avoid building non-usable images in the first place?

I think the available space per device is not known in all cases.

  • For the cases we know the available space: could the image build be deactivated automatically? Or even better: move the respective devices to a stripped down tiny subtarget as in ar71xx?
  • If automatisation fails: How can we keep track of devices where the prebuilt images either fail to install due to size or are unusable due to Too few eraseblocks?
    I can keep the affected devices in the ToH at the last known working release, but I need to get the input somehow.
    We should save our users from a foreseable disappointment when first experiencing OpenWrt.

I don't see an easy, short term solution to this.

Thanks all for your suggestions. I managed to build my tiny image (bare minimum) and it works as expected still with ~400k free

yeah i got the same issues on an DIR-615 D2 - https://bugs.openwrt.org/index.php?do=details&task_id=1684 but i need to do an dmesg output but have to wait till i get back home to do it.

May not be caused by large sizes of the images.

I built different sizes of 18.06.1 images and they all had the same issue.
However, an old bigger image works fine, as shown below:

[    7.943973] jffs2: notice: (375) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.961563] mount_root: switching to jffs2 overlay


BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (CURRENT, r2449-7c47f43)
    \________\/    -----------------------------------------------------------

root@lede:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 003a0000 00010000 "firmware"
mtd3: 00260000 00010000 "rootfs"
mtd4: 00050000 00010000 "rootfs_data"
mtd5: 00132c56 00010000 "kernel"
mtd6: 00010000 00010000 "art"
root@lede:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2304      2304         0 100% /rom
tmpfs                    14088       508     13580   4% /tmp
/dev/mtdblock4             320       216       104  68% /overlay
overlayfs:/overlay         320       216       104  68% /
tmpfs                      512         0       512   0% /dev

so which one worked for you? 18.06? or by older you meant 17.04?