jago25_98
Posts: 25
Joined: Wed Aug 22, 2012 6:05 pm

RAM disk for greater reliability

Thu Jul 21, 2016 3:34 pm

How do routers survive unexpected reboots?

RAMdisk, that's what.

Depending on your model and application it can be doable.

A lot of projects would benefit from this. At least we should be able to reduce the chance of fail to boot?

MikeDunn
Posts: 83
Joined: Wed Jul 01, 2015 6:58 pm

Re: RAM disk for greater reliability

Thu Jul 21, 2016 4:30 pm

Er - no :? . A RAMdisk will not survive a power out.

Routers use NVRam.

SonOfAMotherlessGoat
Posts: 690
Joined: Tue Jun 16, 2015 6:01 am

Re: RAM disk for greater reliability

Thu Jul 21, 2016 5:02 pm

RAMDisk, in the sense that OP used are transient (DRAM or Dynamic Ram). They do store the data in RAM but the data needs to be constantly updated (the refresh rate) in order to be functional. You cut the power and the data refresh is no more, along with the data.

NVRam is Non-Volatile Ram, and can store data to survive across reboots.

This explains it better and in more words than I need to type:

https://en.wikipedia.org/wiki/Non-volat ... ess_memory

Edit: The Pi is a $35 SBC, not a $35,000 Cisco rack dweller.
Account Inactive

Heater
Posts: 12601
Joined: Tue Jul 17, 2012 3:02 pm

Re: RAM disk for greater reliability

Thu Jul 21, 2016 5:10 pm

Our OP probably meant those cheap domestic routers, like my 20 dollar WIFI router, not huge expensive CISCO gear.

As far as I know the OpenWRT router software it runs has it's root files system mounted as read only. This prevents any corruption due to unexpected power loss. This can be done on the Pi easily: https://wiki.debian.org/ReadonlyRoot

Not sure what the router does with configuration data perhaps another partition on it's FLASH memory.

jago25_98
Posts: 25
Joined: Wed Aug 22, 2012 6:05 pm

Re: RAM disk for greater reliability

Fri Jul 22, 2016 6:43 am

Thanks Heater. I'll give ReadOnlyRoot a try. However, if there's a better starting point for this (cheap opensource router with USB port?) then please let me know

User avatar
Gavinmc42
Posts: 3138
Joined: Wed Aug 28, 2013 3:31 am

Re: RAM disk for greater reliability

Fri Jul 22, 2016 7:40 am

piCore
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Heater
Posts: 12601
Joined: Tue Jul 17, 2012 3:02 pm

Re: RAM disk for greater reliability

Fri Jul 22, 2016 8:22 am

Starting point for what exactly?

You could use OpenWRT/LEDE
https://openwrt.org/
https://www.lede-project.org/
https://wiki.openwrt.org/toh/raspberry_ ... spberry_pi

I got a tiny TP-LINK MR3020 WIFI router fro a few dollars and put OpenWRT on it https://wiki.openwrt.org/toh/tp-link/tl-mr3020

rln
Posts: 173
Joined: Wed Apr 09, 2014 1:43 pm
Location: Sweden
Contact: Website

Re: RAM disk for greater reliability

Sat Jul 23, 2016 8:37 pm

jago25_98 wrote:I'll give ReadOnlyRoot a try. However, if there's a better starting point for this (cheap opensource router with USB port?) then please let me know
You may be interested in my project Nard SDK which prevents corruption by running entirely from RAM. The SD card is only used during boot.
http://www.arbetsmyra.dyndns.org/nard/
Author of the robust Nard distro http://www.nard.se

Return to “General discussion”