jim60105 / SteamOS-microSD

How to Install SteamOS to a MicroSD (Shell script for SteamDeck)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Install SteamOS to a MicroSD

中文 | English

About

This repository contains the instructions and scripts on how to install SteamOS to a microSD.

This will mostly benefit Steam Deck users who are using Windows primarily on the main internal SSD.

What does this script do?

  • Install SteamOS to a microSD
  • Setup sudo password for the deck account (as "deck").
  • Delete microSD auto mount rules.
  • Unmount the microSD partitions (/run/media/var) that SteamOS tries to mount it and fails during OS update process.
  • Remount partitions as noatime mode to reduce microSD write operations.
  • Disable swap.
  • Run the above commands on every boot.
  • It will work on next SteamOS update.

    20230326: Successfully update SteamOS to version 3.4.6

  • All in one script!

Warning

Warning
The method only works if the internal SSD has no traces of SteamOS installed (dualboot or not).

If SteamOS is already installed on the internal SSD, the microSD tries to mount those partitions too causing it to fail to boot! Currently the post install script cannot fix it, as this happens on the first boot after the initial SteamOS update.

Warning
If you have SteamOS installed on the internal SSD, DO NOT use this script.

Again,
If you have SteamOS installed on the internal SSD, DO NOT use this script.

Disclaimer

  1. Do this at your own risk!
  2. You WILL definitely lose all the data on microSD.
    You MAY lose data inside machine if you do something wrong.
  3. I will not be held responsible for data loss, broken microSDs etc.
  4. This is only for educational and research purposes only.

But Why?!?

Several reasons why I did this

  1. Perform BIOS / firmware updates which are usually only available when on the SteamOS beta / preview branch.
  2. Change to the beta / preview branch and perform testing without affecting the OS installed on the main drive.
  3. I haven't seen anyone install SteamOS on a microSD in a "clean" way with updates working. The closest I can find involves cloning an existing install to a microSD.

Requirements

  1. SteamOS Recovery Image.
  2. USB flash drive for Steam Recovery Image. Recommended size is at least 8GB USB3.
  3. USB C hub / dock, keyboard and mouse. (Skip the USB C hub / dock if you are using a wireless keyboard and mouse).
  4. Spare MicroSD plugged into the MicroSD slot - this is where SteamOS will be installed. Recommended size is at least 32GB A1 / A2 microSD.

Instructions

Note
If instructed to "Power off" the Steam Deck and then turn on, do not simply "Restart" it.
"Restart" will bypass the boot menu and will boot the OS installed on the internal SSD.

Warning
The script will create a directory called .ryanrudolf. Don't delete this folder!
The script will set the sudo password for the deck account as "deck" (without the quotation marks)

  1. Follow this steps to create the official SteamOS Recovery image.

  2. Once the SteamOS Recovery image is created, plug it in to the USB C port of the Steam Deck (or USB C hub / dock if you are using one).

  3. While the Steam Deck is powered off, press the "VOLDOWN + POWER" button until you hear a chime.

  4. The boot menu will appear, select the USB drive that contains the SteamOS Recovery image and press A button (or enter on the keyboard).

  5. Wait until the SteamOS recovery image boots into the desktop.

  6. Insert the microSD where SteamOS will be installed - make sure it is at least a 32GB A1 / A2 card.

  7. Connect the Steam Deck to your wifi connection.

  8. Open konsole terminal and clone this repository into your home directory.

    cd
    git clone https://github.com/ryanrudolfoba/SteamOS-microSD.git

    image

  9. Execute the script!

    ~/SteamOS-microSD/install_sdcard.sh
  10. Press Proceed on the dialog prompt. Wait until the reimage is complete.

    image

  11. Reimage in progress. This will take several minutes depending on the speed of the microSD.

    image

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

    image

First Boot

  1. While the Steam Deck is powered off, plug out the USB C drive that contains the SteamOS Recovery image.

  2. Press the "VOLDOWN + POWER" button until you hear a chime.

  3. The boot menu will appear, select the microSD where SteamOS is installed and press A button (or enter on the keyboard).

  4. Wait until SteamOS loads. This will take about 1-2minutes depending on the speed of the microSD.

  5. Go through the Greetings - language, timezone and WiFi connection.

  6. SteamOS will continue with the installation.

    Note
    The "Remain 1 second." while installing is just a joke.
    I think that's calculated based on SSD, not microSD.
    So please wait until the installation is finished.

  7. It may stock at "Starting Steam Deck update download".
    Wait at least about 3 minutes.
    If it's not progressing, SHUTDOWN the Steam Deck at the Steam menu, and then repeat the step 1-3.

  8. It may stock at "Black screen with a VALVE logo" after shutdown and boot up.
    This is part of the installation process, and it should take times.
    Wait at least about 5 minutes.
    If the fan has stopped functioning and you stock here, try pressing buttons A or B several times and waiting for a few minutes.
    I'm not sure exactly why this issue occurs, but in my experience this works.

  9. After the update progress is complete, you will be asked to login.
    We're done!

Verification

  1. Boot to Desktop Mode.

  2. Open konsole terminal.

  3. Verify that /var is only mounted once.

    df -h | grep var

    image

  4. Verify that swap file TOTAL / USED / FREE shows 0.

    free -h | grep -vi mem

    image

  5. Verify that the microSD / mmcblk0 is mounted with noatime flag.

    mount | grep mmcblk0

    image

  6. If everything looks good then congrats! SteamOS is now installed on your microSD!

image

Updating from Stable > Beta > Preview etc etc

Stable 3.4.4 image

image

Preview / MAIN 3.5 image

image

image

image

Trouble Shooting

The buttons are not working while Greetings

I do not know why.
In my case only the touch screen works.
If you are unlucky, please connect the keyboard and mouse to operate it.

In my case this problem only happens when Greetings.
After that everything works fine.

/dev/mmcblk0p8 is mounted; will not make a filesystem here

Screenshot_20230101_124055

The partitions are mounted before formatting during the installation process.
This may happen when your microSD is formatted before and split into the same partition list.
Use fdisk to delete all the partitions and create a new one. And then format it.
This will prevent it from automatically mounting the partitions.

Just simply follow the next section.👇

I just messed up my microSD. How to reset it?

  1. Umount all the partition mounted.

    Usee lsblk to check if there is any.

    sudo umount /dev/mmcblk0p8
    sudo umount /dev/mmcblk0p7
    sudo umount /dev/mmcblk0p6
    sudo umount /dev/mmcblk0p5
    sudo umount /dev/mmcblk0p4
    sudo umount /dev/mmcblk0p3
    sudo umount /dev/mmcblk0p2
    sudo umount /dev/mmcblk0p1
  2. Delete all the partitions on the microSD and created a new one.

    sudo fdisk /dev/mmcblk0

    Use 'd' to delete partitions and 'n' to create a new one.
    Use 'w' to write the changes and exit. I'm not going to explain in depth how to use fdisk.

  3. Run mkfs.ext4 to format the partition created.

    sudo mkfs.ext4 /dev/mmcblk0p1
  4. You can now go back to instructions and start from step 9.

About

How to Install SteamOS to a MicroSD (Shell script for SteamDeck)


Languages

Language:Shell 100.0%