Automount of /run/media/deck/var breaks updates
Obviously this is a massively unsupported setup, but I'm running the official Steam OS on an Atari VCS 800. While this works well it refuses to update. After digging into it, it looks like the update fails during the step where it copies the active /var partition to the inactive one. This step fails because the inactive /var gets mounted automatically due to the udev rule 99-steamos-automount.rules which automatically mounts all devices that are either /dev/mmcblk* or /dev/sd*. Since the hard disk for this device is SATA only, it is assigned a /dev/sd* label and thus the inactive var partition gets mounted automatically.
I propose a fix that includes an additional check to make sure that if the partition name is var we immediately goto the exit condition and not attempt to mount the filesystem. Alternatively/even better, we could instead include a check that ensures automount is only run on usb or mmc devices.
As a workaround, updates must be currently performed only after /run/media/deck/var is unmounted.
Nice catch. Were there any other things you had to fix to get it running?
I tried to install it direct to the eMMC but think I was unable to due to missing drivers in the kernel (or something related to the pinconfig). I eventually gave up and just installed it to the M2 sata instead.
The “restore” script to re-image a deck expects to install on an NVME drive, so I had to change some hard coded paths from /dev/nvme01p* to /dev/sd*, and also I had to not reference the NVME specific scrub functions.
So in summary; the steam deck image works on my VCS 800 just fine, so long as I manually tweak the install script to get it running, and unmount the /run/media/deck/var partition before I run an update after I get it running.
Alternatively/even better, we could instead include a check that ensures automount is only run on usb or mmc devices.
I believe that something like this in /usr/lib/udev/rules.d/99-steamos-automount.rules should solve the problem, can you give it a try @macromorgan ?
KERNEL!="mmcblk*|sd*", GOTO="steamos_automount_end"
KERNEL=="sd*", ENV{ID_BUS}!="usb", GOTO="steamos_automount_end"
ENV{ID_FS_USAGE}!="filesystem", GOTO="steamos_automount_end"
I was considering tweaking the script to no-op on OS partitions as enumerated in the /efi partset.
I suppose that would help if the whole system is booted from a USB drive, right?
Yes, the media automounter would simply never touch OS partitions with that change.
Yeah, that sounds like a good idea
KERNEL=="sd*", ENV{ID_BUS}!="usb", GOTO="steamos_automount_end"
This does solve the issue. Alternatively, we could check that ENV{ID_BUS}="ata" without even checking for sd*? Or we could mess with the media mounter script too. I really just wanted to document this as an issue and propose possible fixes.
The following replacement for /usr/lib/hwsupport/block-device-event.sh should fix things without hardcoding assumptions about the device's storage technology (remove the .txt from the name, github's not letting me attach a .sh named file):
I've tested it locally and it seems to work, if you could confirm it works for you that would be great.
You may need to reboot after installing this to see if it works.
block-device-event.sh
I can confirm this changed script also works for me. I can see in the journalctl log where it tries to mount /dev/sda7 but correctly identifies it as being registered in /efi/SteamOS/partsets/all and then skips mounting it.
Will probably land in SteamOS 3.8.x.
Thanks for the report.
This has been fixed in the 3.8.x images since around August 2025.