Netgear XR500 flash memory size?

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Mon May 15, 2023 16:00    Post subject: Netgear XR500 flash memory size? Reply with quote
I was lucky to find an XR500 router for just €20. It is in good condition and the previous owner had only used Netgear f/w on it. It was updated to the latest Netgear f/w.

Following the instructions for the R7800 and XR500, I had no problem installing DD-WRT f/w.
It is now on the latest build 52569.

When I glanced over the SYSINFO, I noticed the flash memory NVRAM is listed as 128 KiB (see attached screen dump). All sources that I have seen, give a flash memory size of 256 KiB.
This is not a practical problem as the current f/w is only 20 KiB.

I do wonder, however, what this could mean.

EDIT:
It is odd that the f/w is reported as 20 KiB, since my R7800 reports the size as 40 KiB. It is as if only half of the flash memory is reported by the XR500.



Schermafdruk van 2023-05-15 17-46-01.png
 Description:
XR500 sysinfo
 Filesize:  91.92 KB
 Viewed:  1322 Time(s)

Schermafdruk van 2023-05-15 17-46-01.png


Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Mon May 15, 2023 16:35    Post subject: Reply with quote
With such threads you can really only bang your head on the edge of the table.

You obviously don't seem to understand what the "flash memory size" or a "nvram parition" is....

and the firmware is also not 20KB large

The router has a flash memory (256MB = Megabyte!!!)
The NVRAM is a small partition in the flash memory in the size of a few KB = kilobyte.
The size of the NVRAM is limited by the bootloader.
And the firmware is not 20KB big but the used NVRAM memory is shown as 20KB,
few settings stored in NVRAM = few KB
many settings stored in NVRAM = many KB

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Mon May 15, 2023 18:24    Post subject: Reply with quote
So sorry I overlooked the obvious difference between KiB and MiB.
I assumed the amount of total and used flash memory must be what is shown in the info page, but apparently not.
The sticker on the case of the router gives no clue about memory of any sort. There might have been different versions of the XR500. That's what I was thinking of. I have no clue of its provenance other than it is designed in California and made in China. I replaced the original f/w with DD-WRT without studying it. It may have shown more hardware info.

RAM memory is shown clearly on the DD-WRT info page. (total is the same 512 MiB for both R7800 and XR500)

So as I now understand after receiving your comment the 20 KiB of NVRAM in use just accidentally happens to be half of what my R7800 uses. Indeed I have next to no settings other than default values on this new used router which is only a spare one for now. Just in case the flash memory of my oldest R7800 wears out one day because of relentless updating ...

Is there a (CLI) command that will show the total amount of flash memory and how much of it is used?
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Tue May 16, 2023 0:30    Post subject: Reply with quote
If you are talking about NVRAM, nvram show OR getall. Type nvram in CLI and you will get a help usage text wall.
If you do not want to see all your setttings "nvram show >/dev/null" will only show bytes used and bytes left free.
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Thu May 18, 2023 11:26    Post subject: Reply with quote
That's an interesting command. Somehow only part of its output goes into the null file.

As I understand it, a router, like so many devices with a CPU, has volatile random access memory, RAM, and 'permanent' memory, ROM, read-only memory.
Historically ROM has come in many forms, like with a window to erase the contents with UV light.
These days ROM is known as flash memory, although light is not involved in erasing or writing to it.

Further it was said that the bootloader of the R7800 or XR500 router reserves some of the flash memory for keeping settings. In connection with DD-WRT this part is called non-volatile ram, NVRAM, which doesn't of itself reveal what it is used for.
The XR500 is said to have double the flash memory of the R7800.
I don't doubt this, but I couldn't find any mention of it on the case or on the Netgear pages.

That's why I wondered about a command to show how much flash memory the router has in total, and how it is used. Some of it is reserved for settings, the 'NVRAM', but the router's firmware and the bootloader got to reside somewhere non-volatile, too, which would be in flash memory as well.

When would the fact that an XR500 has more flash memory come into play?
All of DD-WRT fits in an R7800's flash memory half the size ...
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Thu May 18, 2023 12:02    Post subject: Reply with quote
The router has no ROM also no NVRAM chip.
The router has 512MB DRAM and 256MB SLC NAND (same shit as in good solid state disks)

https://en.wikipedia.org/wiki/Multi-level_cell#Single-level_cell

The NAND memory is divided into different partitions. (for example bootloader, calibration data, kernel, rootfs, JFFS2 etc.)

In the NVRAM partition ALL settings are stored (nvram show)

You can see the size of the NAND chip in the kernel ring buffer. (dmesg | grep nand)


Code:
[    1.091347] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xa1
[    1.093383] nand: Macronix MX30UF1G18AC
[    1.099971] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.440162] 10 ofpart partitions found on MTD device qcom_nand.0

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6440
Location: UK, London, just across the river..

PostPosted: Thu May 18, 2023 12:37    Post subject: Reply with quote
cat /proc/mtd ----will show you the mtd partitons size and its structure
for example output of my R7000

dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 02000000 00020000 "linux"
mtd3: 01e20000 00020000 "rootfs"
mtd4: 00040000 00020000 "board_data"
mtd5: 05dc0000 00020000 "ddwrt"

various routers will have various mtd partitions..

R7800

mtd0: 00c80000 00020000 "qcadata"
mtd1: 00500000 00020000 "APPSBL"
mtd2: 00080000 00020000 "APPSBLENV"
mtd3: 00140000 00020000 "art"
mtd4: 00140000 00020000 "artbak"
mtd5: 01e00000 00020000 "linux"
mtd6: 01ac0000 00020000 "rootfs"
mtd7: 00200000 00020000 "nvram"
mtd8: 03900000 00020000 "ddwrt"
mtd9: 00640000 00020000 "reserved"

you can calculate the firmware size for each...if so..
and you use this size to erase it, if you brick your router... Razz and replace it with the factory image size Razz

128k of NVRAM is more than enough to store lots of settings and so...imagine 1k is one full page of code...and DDWRT firmware replaces only those bits, that host the firmware size...and uses the others partitions, to read and use the data to build up, boot and run...as some of the vital data like, board number and MAC's and ect. are not stored in the nvram, but only parsed there..

So, as ho1Aetoo explained 512MB or working DRAM (your /tmp folder) and 256 of NAND (the one with all partitions and funny stuff, in order to flash, boot, store and run the firmware..) Smile

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum