Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

This repository contains the instructions and scripts on how to install rEFInd.

Notifications You must be signed in to change notification settings

ryanrudolfoba/SteamDeck-rEFInd-dualboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steam Deck - Installing rEFInd for Dual Boot Between SteamOS and Windows

About

Please don't use this script as it has not been updated for ages.... Please use the Clover script instead - https://github.com/ryanrudolfoba/SteamDeck-Clover-dualboot

This repository contains the instructions and scripts on how to install rEFInd - a graphical boot manager.

This will mostly benefit Steam Deck users who have setup a dual boot and wants to have a graphical way to select which OS to boot from.

NOTE
If you are going to use this script for a video tutorial, PLEASE reference on your video where you got the script! This will make the support process easier!

Screenshots

Windows and SteamOS image

Windows, SteamOS and Batocera (microSD) image

SteamOS, Batocera (microSD) and Windows (external SSD) image

Disclaimer

  1. Do this at your own risk!
  2. This is for educational and research purposes only!

But Why Create Another rEFInd Script?!? What's Different?

NOTE
This was inspired from the rEFInd script available here.

  1. Re-wrote the script and removed unneeded components (3rd party systemd scripts / powershell scripts / EasyUEFI).
  2. This contains the same techniques I learned when writing the Clover install script!
  3. When the dual boot breaks, just boot back manually to SteamOS and it will fix the dual boot entries on its own!
  4. All-in-One script - install, disable / re-enable, uninstall!
  5. Simplified config file so it is easy to read, understand and modify.
  6. Doesn't rely on pacman repositories - uses the official rEFInd ISO image.
  7. Doesn't use hardcoded menu entries - this allows Windows on microSD / external SSD to get detected automatically!
  8. misc - Added a cool Matrix Morpheus wallpaper, custom icon for Windows, SteamOS and Batocera.

!!! WARNING - WARNING - WARNING !!!

WARNING!
Please carefully read the items below!

  1. The script has been thoroughly tested on a fresh SteamOS and Windows install.
  2. If your SteamOS has prior traces of rEFInd or scripts / systemd services related to rEFInd, it is suggested to uninstall / remove those first before proceeding.
  3. If your Windows install has scripts or programs related to rEFInd / EasyUEFI, it is suggested to uninstall / remove those first before proceeding.

This is a complete rewrite and it doesn't rely on systemd services / 3rd party apps. I don't know what the behavior will be if those are present in the system. Remove them first before using this script!

Prerequisites for SteamOS and Windows

Prerequisites for SteamOS

  1. No prior traces of rEFInd or scripts / systemd services related to rEFInd.
  2. sudo password should already be set by the end user. If sudo password is not yet set, the script will ask to set it up.

Prerequisites for Windows

NOTE
This applies to Windows installed on the internal SSD / external SSD / microSD.

  1. No scripts / scheduled tasks related to rEFInd or EasyUEFI.
  2. APU / GPU drivers has been installed and screen orientation set to Landscape.
  3. This is VERY IMPORTANT! Do not skip this step -
    • Open command prompt with admin privileges and enter the command -
      bcdedit.exe -set {globalsettings} highestmode on

Using the Script

NOTE1 - please read carefully below

  1. Make sure you fully read and understand the disclaimer, warnings and prerequisites!
  2. The script will create a directory called ~/1rEFInd-tools with scripts to enable / disable Windows EFI and an uninstall to reverse any changes made. Do not delete this folder!

For the SteamOS side
The script copies files to the /esp/efi/rEFInd location and manipulates the EFI boot orders. No files are renamed / moved.
Extra scripts are saved in ~/1rEFInd-tools which manipulates the EFI boot orders, and an uninstall to reverse any changes made.
There are no extra systemd scripts created, no extra power shell scripts needed and no need for EasyUEFI.

For the Windows side
The script creates a folder called C:\1rEFInd-tools and creates a Scheduled Task.
The Scheduled Task runs the powershell script saved in C:\1rEFInd-tools. The powershell script queries the EFI entries and sets rEFInd to be the next boot entry.

NOTE2
The installation is divided into 2 parts - 1 for SteamOS, and 1 for Windows.
The recommended way is to do the steps on SteamOS first, and then do the steps for Windows.

Installation Steps for SteamOS

  1. Go into Desktop Mode.

  2. Open a konsole terminal.

  3. Clone the github repo.
    cd ~/
    git clone https://github.com/ryanrudolfoba/SteamDeck-rEFInd-dualboot

  4. Execute the script!
    cd ~/SteamDeck-rEFInd-dualboot
    chmod +x install-rEFInd.sh
    ./install-rEFInd.sh image

  5. The script will check if sudo passwword is already set.
    4a. If it is already set, enter the current sudo password and the script will continue.
    If wrong password is provided the script will exit immdediately. Re-run the script and enter the correct sudo password! image

    4b. If the sudo password is blank / not yet set by the end user, the script will prompt to setup the sudo password. Re-run the script to continue. image

    4c. Script will continue to run and perform sanity checks all throughout the install process. image

  6. Reboot the Steam Deck. rEFInd is installed and you should see a GUI to select which OS to boot from! Use the DPAD and press A to confirm your choice. image

Installation Steps for Windows

  1. Download the ZIP by pressing the GREEN CODE BUTTON, then select Download ZIP. image

  2. Go to your Downloads folder and then extract the zip.

  3. Right click rEFIndWindows.bat and select RUNAS Administrator.

image

  1. The script will automatically create the C:\1rEFInd-tools folder and copy the files in there.\

  2. It will also automatically create the Scheduled Task called rEFIndTask-donotdelete image

  3. Go to Task Scheduler and the rEFIndTask will show up in there.

  4. Right-click the rEFIndTask and select Properties. image

  5. Under the General tab, make sure it looks like this. Change it if it doesn't then press OK. image

  6. Right click the task and select RUN.

image

  1. Close Task Scheduler. Go to C:\1rEFInd-tools and look for the file called status.txt.

  2. Open status.txt and the rEFInd GUID should be the same as the bootsequence. Sample below. image

  3. Reboot and you should see a GUI to select which OS to boot from! Use the DPAD and press A to confirm your choice. You can also use the trackpad to control the mouse pointer and use the RIGHT SHOULDER BUTTON for LEFT-CLICK. image

FAQ / Troubleshooting

Read this for your Common Questions and Answers! This will be regularly updated and some of the answers in here are contributions from the WindowsOnDeck reddit community!

Q0. How do I check that the ISO is not tampered?

Use a hash file calculator. Verify that the hash matches -
MD5 - 4e5bc6cf04b9263bd0555960f27c10c4
SHA1 - 2be1a0db421b56e15cf4a14e1c3fbf6a0198f687
SHA256 - 2c33e5316216dfc8f9cc0c0af3aaa8213f4ff0fb24a380673a7ba21a64ab7a33
SHA384 - a9ecd691474cfe5132b60022d002d1ed62a592b76aab9f31ad7ce8eec8d38bdfbe835624bfc61ee4a66c8b1c91297353\

Q1. Windows shows strange vertical lines at the center when booting up!

image

  1. Boot to Windows.
  2. Open command prompt with admin privileges and enter the command -
    bcdedit.exe -set {globalsettings} highestmode on

Q2. Windows boots up in garbled graphics!

image

  1. Boot into SteamOS.

  2. Go to Desktop Mode.

  3. Open a konsole terminal and re-enable the Windows EFI -
    cd ~/1rEFInd-tools
    ./enable-windows-efi.sh
    image

  4. Reboot the Steam Deck and it will boot directly to Windows.

  5. Open command prompt with admin privileges and enter the command -
    bcdedit.exe -set {globalsettings} highestmode on

  6. Make sure screen orientation is set to Landscape.

  7. Reboot and it will go back to rEFInd!

Q3. I need to perform a GPU / APU driver upgrade in Windows. What do I do?

  1. Boot into SteamOS.

  2. Go to Desktop Mode.

  3. Open a konsole terminal and re-enable the Windows EFI -
    cd ~/1rEFInd-tools
    ./enable-windows-efi.sh
    image

  4. Reboot the Steam Deck and it will automatically load Windows.

  5. Install the GPU / APU driver upgrade and reboot Windows.

  6. After the reboot it will go back to rEFInd.

  7. Select Windows and wait until it loads.

  8. Make sure screen orientation is set to Landscape.

  9. If everything looks good, reboot and it will go back to rEFInd.

Q4. I reinstalled Windows and now it boots directly to Windows instead of rEFInd!

  1. Follow the steps for the Windows install.

Q5. Windows automatically installed updates and on reboot it goes automatically to Windows!

  1. Manually boot into SteamOS and it will automatically fix the dual boot entries.
  2. On the next reboot it will go to rEFInd.

Q6. There was a SteamOS update and it wiped all my boot entries!

This happens even if not using dualboot / Clover / rEFInd.

  1. Turn OFF the Steam Deck. While powered OFF, press VOLUP + POWER.
  2. Go to Boot from File > efi > steamos > steamcl.efi
  3. Wait until SteamOS boots up and it will automatically fix the dual boot entries.
  4. On the next reboot it will go to rEFInd.

Q7. I hate rEFInd / I want to just dual boot the manual way / A better script came along and I want to uninstall your work!

  1. Boot into SteamOS.

  2. Open a konsole terminal and run the uninstall script -
    cd ~/1rEFInd-tools
    ./uninstall-rEFInd.sh
    image

  3. Reboot the Steam Deck and it will automatically load Windows. rEFInd has been uninstalled!

Q8. I like your work how do I show a token of appreciation?

You can send me a message on reddit / discord to say thanks!

About

This repository contains the instructions and scripts on how to install rEFInd.

Resources

Stars

Watchers

Forks

Packages

No packages published