mirror of
https://github.com/tailscale-dev/deck-tailscale.git
synced 2025-10-22 07:28:14 +00:00
Reorganize readme and tweak extension-release
+ add note about portential new update method + add note about system updates breaking things * move note about changing root FS - remove unused SYSEXT_LEVEL param from extension-release file
This commit is contained in:
75
readme.md
75
readme.md
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
This process is derived from the [official guide][official-guide], but has been
|
This process is derived from the [official guide][official-guide], but has been
|
||||||
tweaked to make the process smoother and produce an installation that comes up
|
tweaked to make the process smoother and produce an installation that comes up
|
||||||
automatically on boot (no need to enter desktop mode) and survives system
|
automatically on boot (no need to enter desktop mode).
|
||||||
updates.
|
|
||||||
|
|
||||||
## Installing Tailscale
|
## Installing Tailscale
|
||||||
|
|
||||||
@@ -14,34 +13,17 @@ updates.
|
|||||||
a login QR code. Scan the code with your phone and authenticate with
|
a login QR code. Scan the code with your phone and authenticate with
|
||||||
Tailscale to bring your Deck onto your network.
|
Tailscale to bring your Deck onto your network.
|
||||||
|
|
||||||
### Changing the root filesystem after installing Tailscale
|
|
||||||
This method for installing Tailscale uses [`systemd` system extensions](https://man.archlinux.org/man/systemd-sysext.8.en)
|
|
||||||
to install files in the otherwise read-only Steam Deck filesystem. A
|
|
||||||
side-effect is that the `/usr` and `/opt` directories
|
|
||||||
(and directories like `/bin`, `/lib`, `/lib64`, `/mnt`, and `/sbin`,
|
|
||||||
that typically link to `/usr` due to [`/usr` merge](https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/)
|
|
||||||
which SteamOS implements) are read-only while system extensions are active,
|
|
||||||
*even after running `steamos-readonly disable`*.
|
|
||||||
|
|
||||||
If you need to modify files in these directories after installing Tailscale,
|
|
||||||
run the following commands:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ systemd-sysext unmerge
|
|
||||||
$ steamos-readonly disable
|
|
||||||
[ make your changes to the rootfs now ]
|
|
||||||
$ steamos-readonly enable
|
|
||||||
$ systemd-sysext merge
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Updating Tailscale
|
## Updating Tailscale
|
||||||
|
|
||||||
⚠️ This process will most likely fail if you are accessing the terminal over
|
Tailscale should be able to update itself now! Try running
|
||||||
Tailscale SSH, as it seems to be locked in a chroot jail. You should start and
|
`sudo tailscale update`, and if that works, `sudo tailscale set --auto-update`.
|
||||||
connect through the standard SSH server instead, but remember to stop it when
|
If it doesn't, keep reading.
|
||||||
you're done.
|
|
||||||
[Suggestions for how to fix this are welcomed.](https://github.com/legowerewolf/deck-tailscale/issues/2)
|
> ⚠️ This process will most likely fail if you are accessing the terminal over
|
||||||
|
> Tailscale SSH, as it seems to be locked in a chroot jail. You should start and
|
||||||
|
> connect through the standard SSH server instead, but remember to stop it when
|
||||||
|
> you're done.
|
||||||
|
> [Suggestions for how to fix this are welcomed.](https://github.com/legowerewolf/deck-tailscale/issues/2)
|
||||||
|
|
||||||
1. Git fetch and pull to make sure you're up to date.
|
1. Git fetch and pull to make sure you're up to date.
|
||||||
2. Run `sudo bash tailscale.sh` again.
|
2. Run `sudo bash tailscale.sh` again.
|
||||||
@@ -53,6 +35,43 @@ recommended to tweak those files directly. The configuration files at
|
|||||||
free to edit those. If something goes wrong, copy those files somewhere else and
|
free to edit those. If something goes wrong, copy those files somewhere else and
|
||||||
re-run the install script to get back to a working state.
|
re-run the install script to get back to a working state.
|
||||||
|
|
||||||
|
## Changing the root filesystem after installing Tailscale
|
||||||
|
|
||||||
|
This method for installing Tailscale uses
|
||||||
|
[`systemd` system extensions](https://man.archlinux.org/man/systemd-sysext.8.en)
|
||||||
|
to install files in the otherwise read-only Steam Deck filesystem. A side-effect
|
||||||
|
is that the `/usr` and `/opt` directories (and directories like `/bin`, `/lib`,
|
||||||
|
`/lib64`, `/mnt`, and `/sbin`, that typically link to `/usr` due to
|
||||||
|
[`/usr` merge](https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/)
|
||||||
|
which SteamOS implements) are read-only while system extensions are active,
|
||||||
|
_even after running `steamos-readonly disable`_.
|
||||||
|
|
||||||
|
If you need to modify files in these directories after installing Tailscale, run
|
||||||
|
the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ systemd-sysext unmerge
|
||||||
|
$ steamos-readonly disable
|
||||||
|
[ make your changes to the rootfs now ]
|
||||||
|
$ steamos-readonly enable
|
||||||
|
$ systemd-sysext merge
|
||||||
|
```
|
||||||
|
|
||||||
|
## On system update
|
||||||
|
|
||||||
|
Unfortunately, because SteamOS doesn't include a `SYSEXT_LEVEL`, this
|
||||||
|
installation method breaks when the system version changes. Repair is simple:
|
||||||
|
Re-run the second step of the installation, and everything should come back up
|
||||||
|
as you had it.
|
||||||
|
|
||||||
|
### Why this happens
|
||||||
|
|
||||||
|
Extension images have to declare their compatibility using the OS ID and either
|
||||||
|
the SYSEXT_LEVEL or VERSION_ID, which have to match what the system declares.
|
||||||
|
|
||||||
|
SteamOS doesn't declare a SYSEXT_LEVEL, and the VERSION_ID increments with every
|
||||||
|
system update, so there's no stable values to declare compatibility against.
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
It uses the same system extension method as the official guide, but we put the
|
It uses the same system extension method as the official guide, but we put the
|
||||||
|
@@ -46,7 +46,7 @@ cp -rf $tar_dir/tailscale tailscale/usr/bin/tailscale
|
|||||||
cp -rf $tar_dir/tailscaled tailscale/usr/sbin/tailscaled
|
cp -rf $tar_dir/tailscaled tailscale/usr/sbin/tailscaled
|
||||||
|
|
||||||
# write a systemd extension-release file
|
# write a systemd extension-release file
|
||||||
echo -e "SYSEXT_LEVEL=1.0\nID=steamos\nVERSION_ID=${VERSION_ID}" >> tailscale/usr/lib/extension-release.d/extension-release.tailscale
|
echo -e "ID=steamos\nVERSION_ID=${VERSION_ID}" >> tailscale/usr/lib/extension-release.d/extension-release.tailscale
|
||||||
|
|
||||||
# create the system extension folder if it doesn't already exist, remove the old version of our tailscale extension, and install our new one
|
# create the system extension folder if it doesn't already exist, remove the old version of our tailscale extension, and install our new one
|
||||||
mkdir -p /var/lib/extensions
|
mkdir -p /var/lib/extensions
|
||||||
|
Reference in New Issue
Block a user