Script: Update Tailscale on (nearly) all devices

Please run the script without the --ignore-free-space it's not needed anymore.

1 Like

I did do that first, and had the same outcome

Please do it again and give me the whole output, including the tailscale version command at the end.

Can confirm this with Flint 2. The tailscale version was also blank when the script was finished updating.

version was blank at the end on my side too

I can confirm the issue, will trying to fix.

1 Like

Using ./update-tailscale.sh --no-tiny seems to get stuck at downloading also.

Stuck on -Stopping Tailscale

The bug was built-in because of the switch from wget to curl
It is fixed now, please rerun the script - it will fetch the newest version automatically.

2 Likes

can confirm this is fixed on my side, thank you very much for the script and the rapid support!

1 Like

This bug is fixed now as well. My script will always use the latest available version, regardless of whether or not it is tagged as latest inside the official repository.

@ all: Please rerun the script to update to v1.68.1 of tailscale.

5 Likes

Wow. Thank you! Worked flawless on my Brume 2 (MT2500).

The script also kept my exit node configuration. Wonderful.

This is what I call a community!!! I do not have scripting skills. Good job!

4 Likes

The bug within the cross compile was fixed, Beryl (AX) is now supported.
Beryl should work as well.

@ all: Please rerun the script to update to v1.68.2 of tailscale.

1 Like

Thank your for your hard work @admon ! The script is very well written.

For your information, the script works great on a GL-MT3000 with firmware v4.6.0-op24 (latest available, working on OpenWrt 24.0 r26550+32-eea666d583). I just installed tailscale v1.70.

Best regards,

lrnt

1 Like

Any reason to use this script when you can now just run "tailscale update" in the command line of OpenWRT on the router? I guess this only applies to older firmwares that don't have that capability now.

tailscale update won't use the small version.

2 Likes

I’ve updated to the latest tailscale using this script, however… I’ve noticed that when I choose a custom exit node… all my traffic is not passed through that exit node at all and downstream devices still appear as though they’re coming from the WAN interface of the berylax (eg. If you check the IP address downstream devices are coming from it is most definitely the berylax WAN and NOT the IP of the custom exit node!).

Also, the following is printed in the berylax system log…
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='
Sat Aug 10 06:42:49 2024 user.warn : skip line without '=' Default
Sat Aug 10 06:42:49 2024 user.warn : skip line without '='

Something isn’t working properly. When you choose a custom exit node in tailscale on the berylax… the expected behavior is for everything downstream of the berylax (including the berylax) to appear to be coming from (hitting the internet as) the IP of the custom exit node!

The only workaround for this would be to just completely turn off tailscale on the berylax and connect each individual client connected to the berylax directly with their own tailscale client to the proper exit node! Obviously this is not ideal as not every client that may be connected is going to have or even be able to install tailscale.

The above basically renders tailscale on the berylax useless. Is anyone else seeing this behavior after using this script to update to the latest tailscale?!

Please share the models and firmware versions of your devices.
I guess the issue might exist within the tailscale tiny binary - try to upgrade without tiny.

  • Model

GL.iNet GL-MT3000

  • Architecture

ARMv8 Processor rev 4

  • OpenWrt Version

OpenWrt 21.02-SNAPSHOT r15812+899-46b6ee7ffc

  • Kernel Version

5.4.211

Firmware: 4.6.2

And you are correct about the tiny assumption, that is what I chose. I’ll have to attempt an update to non tiny binaries.

[2024-08-10 07:00:32] [β†’] Detecting latest tiny tailscale version
[2024-08-10 07:00:34] [βœ“] You already have the latest version.
[2024-08-10 07:00:34] [β†’] If you encounter issues while using the tiny version, please use the normal version.
[2024-08-10 07:00:34] [β†’] You can do this by using the --no-tiny flag.
[2024-08-10 07:00:34] [β†’] Make sure to have enough space available. The normal version needs at least 50 MB.
[2024-08-10 07:00:34] [β†’] This issue is because not every release will be published in the official repository.
root@berylax:~# sh update-tailscale.sh --no-tiny
[2024-08-10 07:00:59] [β†’] Checking for script updates
[2024-08-10 07:00:59] [βœ“] The script is up to date
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ GL.iNet router script by Admon :seal: for the GL.iNet community β”‚
| Version: 2024.07.09.03 |
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ WARNING: THIS SCRIPT MIGHT POTENTIALLY HARM YOUR ROUTER! β”‚
β”‚ It's only recommended to use this script if you know what you're doing.β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ This script will update Tailscale on your router. β”‚
β”‚ β”‚
β”‚ Prerequisites: β”‚
β”‚ 1. At least 15 MB of free space. β”‚
β”‚ 2. Firmware version 4 or higher. β”‚
β”‚ 3. Architecture arm64, armv7 or mips. β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
[2024-08-10 07:00:59] [β†’] Checking if prerequisites are met
[2024-08-10 07:00:59] [βœ“] Firmware version: 4
[2024-08-10 07:00:59] [βœ“] Architecture: arm64
[2024-08-10 07:00:59] [βœ“] Available space: 161 MB
[2024-08-10 07:00:59] [βœ“] xz is installed.
[2024-08-10 07:00:59] [βœ“] Prerequisites are met.
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
| Are you sure you want to continue? (y/N) |
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
y
[2024-08-10 07:01:01] [β†’] Detecting latest tailscale version
[2024-08-10 07:01:03] [β†’] The latest tailscale version is: tailscale_1.70.0_arm64.tgz
[2024-08-10 07:01:03] [β†’] Downloading latest tailscale version
[2024-08-10 07:01:04] [β†’] Finding tailscale binaries in archive
[2024-08-10 07:01:06] [βœ“] Found tailscale binaries in: tailscale_1.70.0_arm64

Do you want to compress the binaries with UPX to save space? (y/N) y
[2024-08-10 07:01:15] [β†’] Ensuring xz is present and installing if necessary
[2024-08-10 07:01:27] [βœ“] xz is installed.
[2024-08-10 07:01:27] [β†’] Getting UPX
[2024-08-10 07:01:30] [β†’] Compressing tailscale with UPX
[2024-08-10 07:01:30] [β†’] This might take 2-3 minutes, depending on your router.
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.4 Markus Oberhumer, Laszlo Molnar & John Reiser May 9th 2024

    File size         Ratio      Format      Name

16712511 -> 7608468 45.53% linux/arm64 tailscale

Packed 1 file.
44.43
[2024-08-10 07:02:17] [β†’] Compressing tailscaled with UPX
[2024-08-10 07:02:17] [β†’] This might take 2-3 minutes, depending on your router.
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.4 Markus Oberhumer, Laszlo Molnar & John Reiser May 9th 2024

    File size         Ratio      Format      Name

32867354 -> 14029452 42.69% linux/arm64 tailscaled

Packed 1 file.
92.18
[2024-08-10 07:03:49] [β†’] Creating backup of tailscale config
[2024-08-10 07:03:49] [βœ“] Backup created: /root/tailscale_config_backup/2024-08-10_07-03-49.tar.gz
[2024-08-10 07:03:49] [β†’] The binaries will not be backed up, you can restore them by using the --restore flag.
[2024-08-10 07:03:49] [β†’] Stopping tailscale
[2024-08-10 07:03:56] [β†’] Moving tailscale to /usr/sbin
[2024-08-10 07:03:56] [β†’] Removing temporary files
[2024-08-10 07:03:56] [β†’] Modifying gl_tailscale script to work with the new tailscale version
[2024-08-10 07:03:56] [βœ“] gl_tailscale script modified successfully
[2024-08-10 07:03:56] [β†’] Restarting tailscale
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
| The update was successful. Do you want to make the installation permanent? |
| This will make your tailscale installation persistent over firmware upgrades. |
| Please note that this is not officially supported by GL.iNet. |
| It could lead to issues, even if not likely. Just keep that in mind. |
| In worst case, you might need to remove the config from /etc/sysupgrade.conf |
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Do you want to make the installation permanent? (y/N)

[2024-08-10 07:04:03] [βœ“] Script finished successfully. The new tailscale version (software, daemon) is:
1.70.0
tailscale commit: 0e0a212418fbf8243cb3f06634367b61e81ea9db
other commit: 26f80df929d9ae698931e4dd1fbdf05f2138ff6f
go version: go1.22.5
1.70.0
tailscale commit: 0e0a212418fbf8243cb3f06634367b61e81ea9db
other commit: 26f80df929d9ae698931e4dd1fbdf05f2138ff6f
go version: go1.22.5
root@berylax:~#

Same issue in logs. Should I try without compressing the binaries? That shouldn't matter, no?

You sure the issue isn't at this step..
[2024-08-10 07:03:56] [β†’] Modifying gl_tailscale script to work with the new tailscale version
[2024-08-10 07:03:56] [βœ“] gl_tailscale script modified successfully

I'm currently traveling for work and I need to get ready for work so I don't have the time right now to look through the changes being made to the gl_tailscale script, but I suspect the issue may lie there.