[Solved] Extroot - Not Necessary on Linksys WRT1900ACS

Router: Linksys WRT1900ACS

I have recently set up extroot to use an 8Gb flash drive and I'm looking for some advice on useful things that can be done with this new found functionality. Obviously, the increase in storage capacity for software packages is a win, but I would like to do a little more tweaking to streamline things (We are dealing with Linux, after all!)

For example, I have already modified the /etc/opkg.conf so that the opkg-lists are now stored on the USB filesystem instead of /var, which helped free up a few hundred kilobytes of ram.

Another example is that I use collectd to track statistics, and by default, collectd and rrdtool store their files in /var/etc, and /var/rrd* respectively, but I would like to move those to the overlay as well, but I am having trouble figuring out where the /var/etc/collectd.conf is generated from... Maybe i'm wrong, or confused, but it is my understanding that everything in /var is wiped on reboot and re-generated from other configs, yet the config file is located at /var/etc/collectd.conf, so I am assuming that this file is created from settings stored somewhere else?

I am also interested in understanding extroot a little deeper for the purposes of backup and firmware upgrades.

I would like to be able to create a sort of tiered system. Basically I would like to have the ROM contain all the same setup and configuration as the extroot partition for certain critical services such as DHCP assignment, Wireless security, etc, so that if the extroot partition is not available, the rom filesystem contains everything necessary to keep things running. I guess I'm asking how to migrate some of my configuration backwards from the extroot onto the ROM.

I have found a bit of documentation regarding firmware upgrades when using extroot, and I understand that special precautions are needed when using extroot, and that when I do upgrade the firmware, I will need to re-create the extroot setup manually, because it will not port seamlessly across different revisions. But there are some scary warnings stating that bricking is possible... Does anyone have any clarification on the upgrade process?

Maybe you should open separate topics for your questions regarding collectd and upgrades with extroot.

  1. Understanding what OVERLAY can give you is at the core of alot of you needs.

  2. Yes, updates.... etc.... tread them like starting fresh although you now have a "skeleton" filesystem.... that you can "re-integrate/attach", rather easy when you look at it like that.

  3. You mention /var alot... do you mean /tmp?

  4. Journalling / swapping is worth attention, as is consideration of ramdisk utilisation for heavy io resoources. ( collectdb's etc. )

  5. Seriously consider an SSD, and don't assume that the storage medium is reliable... ever.... even though you have it.... run backups.... even moreso.....

  6. The key advantage of an extroot, comes when there are hardware contraints or frequent code modding. Otherwise overlay wins almost everytime.

The WRT1900ACS is a top end device and you have 2*(6+34) MB at your disposal, do you really need extroot (to install your desired packages) for such a device? If the answer to this is "no", it suddenly gets a lot simpler to leave rootfs and overlay alone, mounting your additional USB backed devices elsewhere and add symlinks (or bind-mounts) as needed.

Likewise you do have 512 MB RAM, trying to micromanage this and moving files usually kept in /tmp/ (tmpfs) is hardly worth the effort (after all we're talking about <<10 MB even on very busy devices).

The config file should be available at /etc/config/luci_statistics. You can change the options in there to store data elsewhere.

You can start from scratch if you like and create a basic config for your router in flash for basic stuff you need then you can run the procedure for ExtRoot and it will just copy the basic config and you can go bigger from that. If you dont wanna start from scratch just copy your config files from /etc/config and replace them in flash. You may need to mount your flash to access it with ExtRoot setup running. You can find more details in ExtRoot wiki.

extroot can also be considered a "safety net': whatever changes you make to the configuration automatically disappear if you unplug the drive; no more bricked devices because of a bad config.

1 Like

This "safety net" is my main intention for extroot, as this is my production router in my home, and the locals would be very upset if the network was down. My understanding was that this provides a kind of test platform, and I'd like to migrate the successes once configured, onto the flash, so those services will remain if anything goes south with extroot config. I have been reading up on overlayfs, and extroot, and I'm not even sure that this is the best way to handle my needs, but hey, that's learning.

You have two complete OSes installed at any one time with this router, and it will automatically failover to the other one if one fails to boot. If you set up one and test it for a while, then make a backup of the config and flash again with the same OS, you will have two working copies of the same system. I don't know the specifics as I don't have that router, but you can force it to change OS at boot time. I think that would be a more reliable way to secure maximum uptime than using extroot. A mostly standard set up will be much less prone to failure than a home brewed extroot with all kinds of modifications.


What I did in a similar situation was to configure the router for basic functionality without extroot. Then added extroot and configured the optional functionality. In case something goes wrong, I just have to boot without the USB drive, and edit the contents of the drive on my computer.

1 Like

Ok, thank you for your replies! I have done much more research into the router on the hardware level and I have found a very important clarification that redefines the way I am looking at things.

Initially, it was my understanding from linksys documentation that the recovery partition was dedicated solely to the stock linksys firmware, and the second partition was the "open source workspace".

This is in fact NOT true. When flashing, the new firmware gets written to whatever partition is not currently active, meaning that I can overwrite the linksys firmware and have two simultaneous installations of OpenWRT of the same firmware and use one as a test platform while keeping the other as a fallback. I will still use USB for storage, and I can just migrate configs across using that when necessary. I have also found how to change the active boot partition from the cli and luci so that makes it easier to manage two separate installations without physically having to use the hardware recovery method (pita).

Thank you for your help in this matter. I appreciate the direction. it has helped me understand the router, and openwrt a bit better.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.