SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

Recovery image: Chroot doesn't work

Open arschfidel0815 opened this issue 1 year ago • 9 comments

Your system information

  • SteamOS version: 3.5.17 (installed on the Deck); 3.5.7 (recovery image on USB stick)
  • Opted into Steam client beta?: No
  • Opted into SteamOS beta?: No
  • Have you checked for updates in Settings > System?: Yes

I booted into the recovery system and opened the ````````Terminal with repair tools shortcut on the desktop. In the Konsole window that's opened by the shortcut I typed sudo ~/tools/repair_device.sh chroot Then I got this error with the chroot failing:

:: Dropping into a chroot on the A partition set.
:: You can make any needed changes here, and exit when done.
+ 'steamos-chroot' '--disk' '/dev/nvme0n1' '--partset' 'A'
/usr/bin/steamos-chroot: line 206: /run/lock//dev/nvme0n1-A.flock: No such file or directory
umount: /tmp/tmp.ODoKCOiW90/etc: not mounted.
umount: /tmp/tmp.ODoKCOiW90/var: not mounted.
umount: /tmp/tmp.ODoKCOiW90/esp: not mounted.
umount: /tmp/tmp.ODoKCOiW90/efi: not mounted.
umount: /tmp/tmp.ODoKCOiW90/tmp: not mounted.
umount: /tmp/tmp.ODoKCOiW90/sys/firmware/efi/efivars: no mount point specified.
umount: /tmp/tmp.ODoKCOiW90/sys: not mounted
umount: /tmp/tmp.ODoKCOiW90/run: not mounted.
umount: /tmp/tmp.ODoKCOiW90/proc: not mounted
umount: /tmp/tmp.ODoKCOiW90/dev: not mounted.

The expected behaviour would be for the chroot to work successfully.

arschfidel0815 avatar Mar 18 '24 17:03 arschfidel0815

Same problem here, SteamOS version 3.4.1, recovery 3.5.7.

INNKCake avatar Mar 19 '24 03:03 INNKCake

exactly same message i get. looks like the os have changed since 3.5.7..

SteamOS version: 3.5.17 (installed on the Deck); 3.5.7 (recovery image on USB stick) i think valve needs to update the recovery mage to support the newer steamos

dezral avatar Mar 25 '24 20:03 dezral

Workaround to mount partition /var:

sudo mount /dev/disk/by-partlabel/var-B /mnt

If you need another - just mount it name. And if you came here to reset Steam Deck password - use this second command to remove shadow file:

sudo unlink /mnt/lib/overlays/etc/upper/shadow

aotd1 avatar Apr 05 '24 10:04 aotd1

Hi, this is a bug in the current version of steamos-chroot and it will be fixed in the new one. You can make it work if you use a relative path for the disk:

$ cd /dev
$ sudo steamos-chroot --disk nvme0n1 --partset A

If you're still having problems with that you may need to use --no-overlay as well.

bertogg avatar Apr 05 '24 13:04 bertogg

Hi, this is a bug in the current version of steamos-chroot and it will be fixed in the new one. You can make it work if you use a relative path for the disk:

$ cd /dev
$ sudo steamos-chroot --disk nvme0n1 --partset A

If you're still having problems with that you may need to use --no-overlay as well.

Following this I seem to have no access to the home folder for the deck user?

SSUPII avatar Jun 08 '24 11:06 SSUPII

Following this I seem to have no access to the home folder for the deck user?

Try with mount /dev/nvme0n1p8 /home inside the steamos-chroot (and then umount /home before you exit the chroot).

bertogg avatar Jun 11 '24 16:06 bertogg

For anybody else reading this, just an FYI that you can also access the volumes directly through the file browser - they appear under the "Devices" column on the left. You still have to launch a terminal to delete the shadow file (if that is what you are doing) so you can sudo it.

Suggestion which probably doesn't belong here: CoreKeyboard should be included in the recovery image, so that a touchscreen keyboard can be used for people with limited access to physical keyboards during recovery. I had to pair my phone to the steam deck as a buetooth keyboard, which... was a lot. You can't launch steam and use the steam keyboard because you need to log in or it just crashes, and without a keyboard you can't join most wi-fi networks that need a password.

DavidRGriswold avatar Jun 29 '24 23:06 DavidRGriswold

For the average person who comes across this issue and needs to reset the sudo password:

$ cd /dev
$ sudo steamos-chroot --disk nvme0n1 --partset A
# passwd deck

realchrisolin avatar Aug 29 '24 23:08 realchrisolin

hey guys. glad i found this and your comments. needed to use this to reset the password of my girlfriend's deck. Will Valve update the check repair sh script or change the directions in the official documentation to include this information? also, by using this method, I assume that partition set A and B will be synced?

I used rm -f on the shadow file and the passwd file after running the steamos-chroot command mentioned above, simply rebooted after that into the main drive, then set the password from KDE user settings.

chrismcfee avatar Sep 03 '24 18:09 chrismcfee