Alternative to extroot

hello, thanks, i am finding extroot very complicated, not deeply integrated into the luci, not available as an opkg package. seems very fragile based on forum topics and my own nightmare experience.
and these docs are scary https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

so, i am looking for kinda, sorta, lite version of extroot.
basically, a way to install just certain large packages/executables such as tailscale onto usb.
but not moving root to the external usb.
and if the usb drive dies, i would only loose access to just tailscale.

maybe using overlayfs but not as extreme as extroot?
maybe a simple, manual way to do that, using symlinks or such?

thanks much, david

Please examine /etc/opkg.conf
Same way /tmp serves as -d ram you can make /mnt/sda/something/ serve as -d usb
So you just need generic mount and minor adjustments to make daemons start from USB, or add LD_LIB_PATH to load libraris from there. no kmods though.

1 Like

Just to mention the 'obvious' solution, choosing a router with sufficient main storage that doesn't need extroot (or alternative kludges) to begin with?

Once upon a time, when OpenWrt started its existence and up to ~2015 +/-, that was hard or even impossible, these days's there's quite a selection to pick from - and not necessarily beyond reasonable budgets.

1 Like

yeah, i am an anti-kludge guy ;wink

i did take a quick look at https://openwrt.org/toh/views/toh_available_16128 to see which routers have more than 256MiB NAND

i purchased a linksys wrt3200acm many years ago, ran openwrt on it for years, then switch to a opnsense on a used desktop computer.
for reasons, i need to switch away from a desktop computer and use something small and portable.
now i am using that 3200acm again and very happy with it

on the flip side, i tried to purchase the new openwrt one, to support the openwrt project.
it is out-of-stock and has only 256MiB NAND.

so if someone knows of a cheap router, well supported by openwrt that has 512MiB NAND, please let me know
else, i think i will have to kludge this project.

Rather than mentioning "512 MB flash", it is more sensible to state your actual space requirements - as most devices add further limitations due to dual-firmware/ partitioning.

…personally I do think that if you need more than ~50-60 MB (for non-data, which could be mounted normally just about anywhere) on your router, you're doing something wrong - as it's a router, not a general purpose server (keeping the attack surface small).

But yes, for really big storage, x86_64 is the easiest option (mine has 30 GB, of which I use under 40 MB in total)…

thanks much!

ok, i am testing using midnight commander, as it should be a simple programs for testing, without daemons and so on.
at first, did not work, complained about
Error loading shared library libssh2.so.1: No such file or directory (needed by ./mc)

so i found the location of the shared library and tried and failed with
export LD_LIB_PATH=/mnt/sda1/installed/usr/lib
then i tried and worked using
export LD_LIBRARY_PATH=/mnt/sda1/installed/usr/lib

but midnight commander is not happy, complaining "unable to load default skin`

so no sure what the next step is?

i think i just want /mnt/sda1/installed to be searched before /
so do i need the complexity of overlay fs or is there something simpler to do?

root@OpenWrt:/mnt/sda1/installed# tree . -L 1
.
├── etc
└── usr

It is a bit more considerate, install library-only dependencies in normal location, some space used, but monstrous packages are in usb.
Not all packages are well off here, some need some /usr/share stuff.