SteamOS-RW
Use pacman without breaking SteamOS
Usage
- Make sure your sudo password is set (use the
passwdcommand in Konsole if not) - open a terminal and copy/paste the following command:
curl -L https://gitea.sugoidogo.com/sugoidogo/steamos-rw/raw/branch/master/curlme.sh | bash
Once installed, you can use the steamos-rw command to enable, disable, or reset your writeable overlay.
Details
The overlay data is stored in a disk image at /home/.steamos/offload/usr.img alongside the rest of the SteamOS offload folders.
That disk image is mounted to /var/lib/overlays/usr alongside the etc overlay folder (var-lib-overlay-usr.mount).
Overlayfs is used the same way as SteamOS does with the etc overlay to enable writing to the usr folder (usr.mount), which allows you to use pacman.
Additionally, all the pre-installed packages are added to the pacman IgnorePkg list (/etc/pacman.conf) to prevent you from borking your system with a pacman -Syu.
Next, the default mirrorlist (/etc/pacman.d/mirrorlist) has to have SigLevel = Optional TrustAll added to work at all, thanks to valve somehow breaking package/repo signing.
Since SteamOS 3.6, the pacman cache is stored on the home partition, removing the need for the paccache service, and the atomic-update config allows us to exclude steamos-rw files from being removed with updates.
To get systemd services like tailscale working, a system and user service (overlay-units.service) is added to issue start commands to enabled services, since they show up in the system too late for systemd to automatically start them.
Finally, steamos-rw.target and the steamos-rw command allow you to easily control the overlay.
You can also use steamos-rw reset to re-format the overlay disk image if you'd like to reset your installed software.