Admonstrator / glinet-tailscale-updater

This script updates the Tailscale installation on GL.iNet routers.
https://forum.gl-inet.com/t/how-to-update-tailscale-on-arm64/37582
MIT License
88 stars 5 forks source link

Beryl GL-MT1300 Incorrect architecture #6

Closed HarvsG closed 3 months ago

HarvsG commented 4 months ago
root@GL-MT1300:/tmp# sh update-tailscale.sh
[2024-07-01 13:40:51] [→] Checking for script updates
[2024-07-01 13:40:52] [✓] The script is up to date
┌────────────────────────────────────────────────────────────────────────┐
│ GL.iNet router script by Admon 🦭 for the GL.iNet community            │
| Version: 2024.06.20.01                                                 |
├────────────────────────────────────────────────────────────────────────┤
│ 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-07-01 13:40:52] [→] Checking if prerequisites are met
[2024-07-01 13:40:52] [✓] Firmware version: 4
[2024-07-01 13:40:52] [✓] Architecture: mips
[2024-07-01 13:40:52] [x] Not enough space available. Please free up some space and try again.
[2024-07-01 13:40:52] [x] The script needs at least 15 MB of free space. Available space: 14 MB
[2024-07-01 13:40:52] [x] If you want to continue, you can use --ignore-free-space to ignore this check.
[2024-07-01 13:40:52] [!] xz is not installed. We can install it for you later.
[2024-07-01 13:40:52] [x] Prerequisites are not met. Exiting
root@GL-MT1300:/tmp# sh update-tailscale.sh --ignore-free-space
[2024-07-01 13:41:00] [→] Checking for script updates
[2024-07-01 13:41:01] [✓] The script is up to date
┌────────────────────────────────────────────────────────────────────────┐
│ GL.iNet router script by Admon 🦭 for the GL.iNet community            │
| Version: 2024.06.20.01                                                 |
├────────────────────────────────────────────────────────────────────────┤
│ 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-07-01 13:41:01] [→] Checking if prerequisites are met
[2024-07-01 13:41:01] [✓] Firmware version: 4
[2024-07-01 13:41:01] [✓] Architecture: mips
[2024-07-01 13:41:01] [x] Not enough space available. Please free up some space and try again.
[2024-07-01 13:41:01] [x] The script needs at least 15 MB of free space. Available space: 14 MB
[2024-07-01 13:41:01] [x] If you want to continue, you can use --ignore-free-space to ignore this check.
[2024-07-01 13:41:01] [!] --ignore-free-space flag is used. Continuing without enough space
[2024-07-01 13:41:01] [!] Current available space: 14 MB
[2024-07-01 13:41:01] [!] xz is not installed. We can install it for you later.
[2024-07-01 13:41:01] [✓] Prerequisites are met.
┌──────────────────────────────────────────────────┐
| Are you sure you want to continue? (y/N)         |
└──────────────────────────────────────────────────┘
y
┌────────────────────────────────────────────────────────────────────────┐
│ WARNING: --ignore-free-space flag is used. This might potentially harm │
│ your router. Use it at your own risk.                                  │
│ You might need to reset your router to factory settings if something   │
│ goes wrong.                                                            │
└────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────┐
| Are you sure you want to continue? (y/N)         |
└──────────────────────────────────────────────────┘
y
[2024-07-01 13:41:08] [→] Ok, continuing
[2024-07-01 13:41:08] [→] Detecting latest tiny tailscale version
update-tailscale.sh: line 127: tailscale: not found
[2024-07-01 13:41:13] [→] The latest tailscale version is: 1.68.1
[2024-07-01 13:41:13] [→] Downloading latest tailscale version
[2024-07-01 13:41:16] [→] Creating backup of tailscale config
[2024-07-01 13:41:16] [✓] Backup created: /root/tailscale_config_backup/2024-07-01_13-41-16.tar.gz
[2024-07-01 13:41:16] [→] The binaries will not be backed up, you can restore them by using the --restore flag.
[2024-07-01 13:41:16] [→] Stopping tailscale
[2024-07-01 13:41:22] [→] Moving tailscale to /usr/sbin
[2024-07-01 13:42:41] [→] Removing temporary files
[2024-07-01 13:42:41] [→] Modifying gl_tailscale script to work with the new tailscale version
[2024-07-01 13:42:41] [✓] gl_tailscale script modified successfully
[2024-07-01 13:42:41] [→] 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)
N
[2024-07-01 13:44:01] [✓] Script finished successfully. The new tailscale version (software, daemon) is:
/usr/sbin/tailscale: line 1: EL�4P4: not found
/usr/sbin/tailscale: line 2: syntax error: unexpected ")"
/usr/sbin/tailscaled: line 1: EL�4P4: not found
/usr/sbin/tailscaled: line 2: syntax error: unexpected ")"

I believe the issue is that it should use mipsel not mips

HarvsG commented 4 months ago

NB I deleted the binaries before updating to make room

Admonstrator commented 4 months ago

Could you please run uname -a on your device?

HarvsG commented 4 months ago

Linux GL-MT1300 5.10.176 #0 SMP Sun Apr 9 12:27:46 2023 mips GNU/Linux

This is the package source I was using to date: https://downloads.openwrt.org/releases/23.05.0-rc1/packages/mipsel_24kc/packages/

Admonstrator commented 4 months ago

Unfortunately, the mipsel (mipsle) architecture isn't supported yet. I am not sure how to get it working. The mipsle compiled version (see https://github.com/Admonstrator/glinet-tailscale-updater/releases/tag/v1.68.1 ) doesn't work.

Admonstrator commented 4 months ago

The issue was fixed in 660fcc9f52adecb4542967c2a467ac30088541dd Please re-run the script to update your Tailscale on Beryl.