update for SteamOS 3.6
This commit is contained in:
@@ -11,10 +11,10 @@ Once installed, you can use the `steamos-rw` command to enable, disable, or rese
|
||||
## 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`).
|
||||
Finally, 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.
|
||||
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.
|
||||
After initializing the pacman keyring, `pacman-contrib` is installed to get the `paccache` service, which will help prevent pacman cache from filling up the small `/var` partition.
|
||||
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.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/etc/systemd/system/usr.mount
|
||||
/etc/systemd/system/var-lib-overlays-usr.mount
|
||||
/etc/systemd/system/steamos-rw.target
|
||||
/etc/systemd/system/overlay-units.service
|
||||
/etc/systemd/user/overlay-units.service
|
||||
/etc/atomic-update.conf.d/steamos-rw.conf
|
||||
/etc/pacman.conf
|
||||
/etc/pacman.d
|
||||
+2
-2
@@ -10,6 +10,7 @@ set -xeuo pipefail
|
||||
|
||||
cp *.target *.service *.mount /etc/systemd/system/
|
||||
cp *.service /etc/systemd/user/
|
||||
cp atomic-update.conf /etc/atomic-update.conf.d/steamos-rw.conf
|
||||
systemctl daemon-reload
|
||||
|
||||
truncate /home/.steamos/offload/usr.img -s $(blockdev --getsize64 $(findmnt -n -o SOURCE --target /home))
|
||||
@@ -19,6 +20,7 @@ systemctl start var-lib-overlays-usr.mount
|
||||
mkdir -p /var/lib/overlays/usr/work /var/lib/overlays/usr/upper
|
||||
systemctl enable steamos-rw.target --now
|
||||
ln -s $PWD/steamos-rw.sh /bin/steamos-rw
|
||||
chmod +x /bin/steamos-rw
|
||||
|
||||
cat <<EOF >> /etc/pacman.conf
|
||||
# block updates for steamos pre-installed packages
|
||||
@@ -31,8 +33,6 @@ cat <<EOF >> /etc/pacman.d/mirrorlist
|
||||
SigLevel = Optional TrustAll
|
||||
EOF
|
||||
pacman-key --init
|
||||
pacman -Syu pacman-contrib --noconfirm
|
||||
systemctl enable paccache.timer
|
||||
|
||||
set +x
|
||||
read -rp "Install complete, you may close this window or press enter to exit"
|
||||
@@ -3,6 +3,7 @@ Description = start overlayed systemd units
|
||||
Requires=usr.mount
|
||||
After=usr.mount
|
||||
After=default.target
|
||||
PartOf=steamos-rw.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
Regular → Executable
@@ -13,4 +13,8 @@ cd /etc/systemd/system
|
||||
rm usr.mount steamos-rw.target overlay-units.service var-lib-overlays-usr.mount
|
||||
cd /etc/system/user
|
||||
rm overlay-units.service
|
||||
cd /var/lib/overlays
|
||||
rm -rf usr
|
||||
cd /etc/atomic-update.conf.d/
|
||||
rm steamos-rw.conf
|
||||
reboot
|
||||
@@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Description = SteamOS-RW Offload - /usr
|
||||
PartOf=steamos-rw.target
|
||||
|
||||
[Mount]
|
||||
What=/home/.steamos/offload/usr.img
|
||||
|
||||
Reference in New Issue
Block a user