mount.steamos
Mount SteamOS game drives
TLDR
Mount all necessary partitions from a device to a target directory
Mount with options to exclude specific partitions (e.g. /home, overlays)
Unmount all partitions mounted under a target directory
Display help
SYNOPSIS
mount.steamos [rw|ro]
PARAMETERS
rw
Remounts the root filesystem in read-write mode. This allows for system-wide modifications.
ro
Remounts the root filesystem back to its default read-only mode, which is recommended for daily use and system stability.
DESCRIPTION
The mount.steamos command is a specialized utility found on Valve's SteamOS, particularly on the Steam Deck. Its primary purpose is to manage the read-only (RO) state of the root filesystem, which is the default configuration on SteamOS 3.0 and newer. This read-only design enhances system stability, simplifies updates, and prevents accidental corruption.
When users need to make system-wide modifications, install non-Flatpak applications, or perform advanced debugging, mount.steamos allows them to temporarily remount the root filesystem in a read-write (RW) mode. This often involves creating an overlay filesystem (like overlayfs) that captures changes without altering the underlying immutable base.
After modifications, it's recommended to revert to read-only mode to maintain system integrity and compatibility with future updates.
CAVEATS
Requires superuser privileges (typically invoked with sudo).
Modifying the root filesystem can potentially lead to system instability or interfere with future SteamOS updates.
Changes made in read-write mode might not persist across system updates or reboots, depending on the underlying mechanism (e.g., overlayfs might be reset).
Primarily intended for advanced users, developers, or troubleshooting scenarios.
This command is specific to SteamOS 3.0 and later, used on devices like the Steam Deck.
PERSISTENCE OF CHANGES
It's crucial to understand that changes made while the root filesystem is in read-write mode using mount.steamos might not be persistent across system updates or even some reboots. SteamOS's ostree-based A/B partition scheme means that system updates often involve switching to a new, clean root filesystem. Any modifications made directly to the active rootfs (even via overlayfs) could be lost during such updates. For persistent changes, users should prefer Flatpaks, package managers like pacman within a chroot, or SteamOS developer tools designed for persistence.
UNDERLYING MECHANISM
While mount.steamos abstracts the complexity, its typical implementation involves leveraging Linux kernel features like overlayfs. This creates a writable layer on top of the read-only base filesystem. When files are modified or new ones are created, they are written to the writable overlay, while the original files on the read-only layer remain untouched. This ensures that the base system can always be restored to a known good state.
HISTORY
mount.steamos was introduced with SteamOS 3.0, a significant architectural shift that adopted an immutable operating system design based on ostree (similar to Fedora Silverblue or ChromeOS). This change, prominent with the release of the Steam Deck, necessitated a dedicated utility to allow users to temporarily bypass the read-only nature of the root filesystem for development and customization purposes, bridging the gap between an immutable system and traditional Linux modification practices.