Replies: 1 comment
-
|
I've been doing more - I seem to have resolved the issue with the segfaults by not compressing it with upx. Maybe something about upx and the dual-mode binary aren't compatible. And as for the sparse problems - that seemed to be a problem with du. I could create a 1GB binary - 4 times larger than the ER-X's flash - and du would happily tell me it was 1000MB. And when I delete a 30MB tailscale binary, I only regain 20MB odd of space - so some compression or something is happening. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I posted a suggestion for edgerouter support to tailscale, and got some useful suggestions.
One is to give a bump to tailscale/tailscale#735, which is a fairly old request for binaries compiled for the edgerouters.
The other is this doc, about compiling smaller binaries. The first thing is that you can compile a single binary, which you can then link as tailscale and tailscaled, and the binary will change its behaviour depending on what the filename is. The second is giving it some compile options that will omit debugging info and uncommonly used features. The third is using a packer like upx to compress the final binary.
The outcome is that I have replaced 2 30MB binaries with a single 7.4MB one. This takes my available drive space from 51.4M to 85.4M. We could arrange for restoration after an upgrade by keeping one copy of the binary in /config, and hard or symlinking it into /usr/sbin and /usr/bin
I have got problems, however. The tailscale utility sometimes segfaults. And I've noticed that the compiled but uncompressed binary is somewhat sparse - ls gives a file size of 37M, but du says it's using 17M of disk space - but I haven't been able to retain that when I copy it to the ER-X. But I know it is possible to , because the binaries installed from .debs are the same. Now compressing with upx renders this moot, but this could be causing issues like the segfaulting.
Perhaps someone with more experience could run with this.
Beta Was this translation helpful? Give feedback.
All reactions