hirak99 / steam_deck_encryption

Apache License 2.0
22 stars 1 forks source link

Executing `~/unlocker/runasroot.sh` prevents Steam Deck from finding internal SSD. #6

Open Jazztache opened 6 months ago

Jazztache commented 6 months ago

Yes, the entire internal SSD is just completely ignored when I run the runasroot script. I'm not sure wether it was because I ran it multiple times or not, or wether the instructions beforehand but the container file in the wrong spot (it wasn't in /home/container?), but my internal SSD doesn't show up on lsblk unless I re-image the entire deck.

Luckily, I have backed up my data long before, this Deck is considered a blank-slate tinker machine until I get encryption working.

I also notices after adding logging to the script, that it did the swapon but nothing else, but I will have to verify since I cannot get the script now, as I can only really re-image my deck and try again in this state.

What should I do to debug this issue and provide more information?

Jazztache commented 6 months ago

Update: sometimes it boots, but only after Steam verifies the installation if the device fails to boot once.

hirak99 commented 6 months ago

Hmm...

can only really re-image my deck and try again in this state

Sorry you had to re-image. I think re-imaging should be avoidable. Let me try to understand the situation a little more.

Yes, the entire internal SSD is just completely ignored when I run the runasroot script.

Does it persist on the next boot even before you run the script again? E.g. does Steam not boot? (I'd be very surprised since we do not touch any critical files. But if that's the case we can debug further.)

Otherwise, you should be able to revert without re-imaging fairly easily (i.e. just remove or not invoke the runasroot.sh, remove the container).

I also noticed after adding logging to the script, that it did the swapon but nothing else

Does it show any error? I wonder if encrypting the swap somehow interferes and causes this (to be clear it should not and did not on my trials). An option is to comment out the swapon lines to just check if the issue persists.


Would it be possible to run the commands in the script manually, in desktop mode to see where it breaks? That's how I debug it.

As for the container, for me it is in '/home/container'. It should be put in the same partition as /home.

Here's my lsblk after I unlock -

NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0               7:0    0     8G  0 loop  
└─swap            254:0    0     8G  0 crypt [SWAP]
loop1               7:1    0   750G  0 loop  
└─deck_alt        254:1    0   750G  0 crypt /home/deck
mmcblk0           179:0    0 953.6G  0 disk  
└─mmcblk0p1       179:1    0 953.5G  0 part  
  └─opened_decksd 254:2    0 953.5G  0 crypt /run/media/mmcblk0p1
nvme0n1           259:0    0 931.5G  0 disk  
├─nvme0n1p1       259:1    0    64M  0 part  
├─nvme0n1p2       259:2    0    32M  0 part  
├─nvme0n1p3       259:3    0    32M  0 part  
├─nvme0n1p4       259:4    0     5G  0 part  /
├─nvme0n1p5       259:5    0     5G  0 part  
├─nvme0n1p6       259:6    0   256M  0 part  /var
├─nvme0n1p7       259:7    0   256M  0 part  
└─nvme0n1p8       259:8    0 920.9G  0 part  /run/mount/_home_dirs_orig
                                             /var/tmp
                                             /var/log
                                             /var/lib/systemd/coredump
                                             /var/lib/steamos-log-submitter
                                             /var/lib/flatpak
                                             /var/lib/docker
                                             /var/cache/pacman
                                             /srv
                                             /root
                                             /opt
                                             /nix
                                             /home