ryanrudolfoba / SteamOS-microSD

This repository contains the instructions and scripts on how to install SteamOS to a microSD.
36 stars 8 forks source link

Change the use flow and rewrote half of the readme #1

Closed jim60105 closed 1 year ago

jim60105 commented 1 year ago

I'm having problems running it, mainly because I can't get to the desktop before the update, and it gets stuck in "Starting Steam Deck update download". It would automatically update during a fresh install and could not skip the welcome greetings.

I put the script into the user's .profile so that it will run automatically at startup and check if the service exists. SteamOS will keep /dev/mmcblk0p8 when updating, so theoretically it will still work after the next update(?)

I rewrote install_sdcard.sh and used sed to replace nvme0n1 with mmcblk0. Plus uninstall udisks2 (in the recovery image OS) to avoid the problems caused by auto-mounting during repair_device.sh.

Also when installing the update file, it gets stuck at "Starting Steam Deck update download" I added a solution from here.

And I rewrote half of the readme because I changed the flow of use.

Please let me know if you have any suggestions, thanks!

ryanrudolfoba commented 1 year ago

Forgive me as this is the first time i get a merge request. I'll have to test your proposed changes. I haven't had issues with the current scripts except if SteamOS is installed in the internal SSD then the SteamOS microsd fails to boot. I hope this solves that issue too.

Currently this is the flow of the install_sdcard.sh script which is also based on the official steam deck recovery script but i just made minor adjustments -

  1. disable the sdcard udev rule from the steamos recovery image
  2. unmount /var /home sdcard partitions (in case its already running SteamOS microsd and user wants to reimage the same microsd)
  3. reimage the microsd
  4. Delete the sdcard udev rules on A/B partition so that the initial update will work

Once initial update is done, the sdcard udev rules are back. Need to remove them again via post install script, which also includes disabling swap and setting the noatime flag.

Give me a few days and i'll start testing this.

ryanrudolfoba commented 1 year ago

OK i read your modified install_sdcard.sh. its a NO for me because -

  1. it modifies the repair_device.sh. what if the user needs to legit reimage the internal SSD? Because the file is modified to reimage the microsd, the user cant use it anymore to reimage the internal SSD.

  2. A lot of stuff is changed in the steamos recovery image. I want the changes to be as minimal as possible and easy to reverse. My original script only creates a symlink to disable the sdcard udev rule

  3. I dont understand the logic behind lines 32 onward. I'll have to test that manually. I didnt have to do that on the original script and it works.

jim60105 commented 1 year ago

I originally modified repair_device.sh to make _factory_reimage.sh, repair_home.sh, repair_reimage.sh, repairsystem.sh, and all Desktop icons on the recovery OS work. Traditionally, this kind of recovery image is burned to a CD for use, and the changes are temporarily stored in ram, so the cleanliness of the recovery image is not considered during programming. Switching to the current method of using USB, users can still re-burn the USB at any time, so the "minimum change" is not that important. This is just a trade-off, I changed to write to other files according to your suggestion.

In addition, in order to save us from maintaining the possibility of repair_device.sh being updated in future versions of the recovery image, I choose not to copy and "manually" modify repair_device.sh, and should use a program to do the smallest patch. The sed only change the disk target, I think it will works in the future.

I added more comments after line 30 it allows users don't need to manually execute post_install_sdcard.sh And it solved my problem of not being able to skip the update process inside Welcome Greetings and go into Konsole on first boot.

ryanrudolfoba commented 1 year ago

Thank you for explanation i understand it now. I like your idea of putting the post install on /home. Initially i am putting it directly on A/B partition after the reimage and it gets wiped on initial update, thats why i made it a separate script that needs to be run manually. I think i can use that trick to also fix the issue if SteamOS is on internal SSD.

jim60105 commented 1 year ago

Just a heads up, I was able to successfully update the SteamOS on my sdcard to version 3.4.6 using the upgrade function within the system. This was done with the same installation that I had set up earlier this year, and it worked fine. No extra action is required. 20230326201602_1

Metafalica commented 1 year ago

Is this ready to use after merge? I hoped something of this will be used, but time pass and nothing change.

arifian commented 1 year ago

Hi folks just want to share what my experience so far using these script, hope this helps

I tried to use @ryanrudolfoba script at first, got stuck on the download update screen, Then, I tried @jim60105 's scripts, just by re running the jim's git clone, it got pass the download screen, but it infinite loops on install screen.

I am going to try a clean run with @jim60105 code next.

Note:

ryanrudolfoba commented 1 year ago

im sorry ive been neglecting this. i reformatted my microSD i tried HoloISO the other day but i cant figure it out, so i will go back to SteamOS microSD. i will use this to test and if everything is good i'll merge it. sorry for the delay.

ryanrudolfoba commented 1 year ago

i gave it one more read - there are some typos in post_install_sdcard.sh. it shows chomod instead of chmod. other than that it looks good.

i installed it to my microSD and it gives error on the first reboot - an update error was encountered. it tries to install the update again going to a loop.

image

Metafalica commented 1 year ago

Did you used post_install_sdcard.sh in your installation? I read jim60105 instruction (https://github.com/jim60105/SteamOS-microSD), and nothing said about using that file anymore. There is said "All in one script!". Maybe you used post_install_sdcard.sh and that's why everything screwed?

jim60105 commented 1 year ago

i gave it one more read - there are some typos in post_install_sdcard.sh. it shows chomod instead of chmod. other than that it looks good.

@ryanrudolfoba I fixed the typo

jim60105 commented 1 year ago

Did you used post_install_sdcard.sh in your installation? I read jim60105 instruction (https://github.com/jim60105/SteamOS-microSD), and nothing said about using that file anymore. There is said "All in one script!". Maybe you used post_install_sdcard.sh and that's why everything screwed?

@Metafalica post_install_sdcard.sh is to be copied by install_sdcard.sh, not executed manually. It should be there with git clone step.

Metafalica commented 1 year ago

12. Once the reimage is complete, press CANCEL on the prompt to NOT reboot the Steam Deck.

So, what we do after pressing CANCEL?

jim60105 commented 1 year ago

So, what we do after pressing CANCEL?

Power off, as the next section called "First Boot"