/SteamDeck-Clover-dualboot

Script to install Clover - a graphical boot manager for the Steam Deck.

Primary LanguageShell

Steam Deck - Installing Clover Script for Dual Boot Between SteamOS and Windows (and other OSes too!)

About

A collection of tools that is packaged into an easy to use script that is streamlined and tested to work with the Steam Deck running on SteamOS.

  • The main program that does all the heavy lifting is Clover - a graphical boot manager / boot loader.
  • Clover Toolbox is a shell script that offers a simple GUI to configure some aspects of Clover script.
  • Custom systemd script that performs a sanity check whenever SteamOS starts up making sure that the dual boot is intact and repairs it automatically if needed.

What's New (as of October 25 2024)

  1. Updated Clover EFI from 5159 to 5160.
  2. Implemented Clover whitelist - make sure you are on SteamOS 3.6.x for the whitelist to work correctly!
  3. Script can now be installed in Bazzite!
  4. Updated icons for Bazzite.
  5. Added sanity check - make sure SteamOS / Bazzite is installed before Windows! (sorry WinDeckOS users)

What's New (as of May 19 2024)

  1. Removed the 7z sanity check as this is now installed by default in SteamOS 3.5.x / 3.6.x
  2. Added ESP sanity check - make sure there is enough space in ESP before doing anything
  3. Removed option for Windows To Go sdcard - you shouldn't run Windows from sdcard anyways! This will also fix the issue of intermittently showing Windows To Go sdcard when Windows is updated.
  4. code cleanup

What's New (as of January 21 2024)

  1. Minor update to easily change config between Batocera v38 and the upcoming Batocera v39.

Launch Clover Toolbox and select Batocera to choose between Batocera v38 or Batocera v39 -
image

Select v39 or v38 -
image

Config will be updated based on user selection -
image

image

What's New (as of January 15 2024)

  1. Updated for Clover release 5157.
  2. Added an option in Clover Toolbox to use custom Clover 5157. This hides the OPTIONS button.
  3. Added an option in Clover Toolbox to select the default grey embedded theme.
Old Changelog

December 12 2023
1. Updated for Clover release 5156
2. New Steam Deck OLED BGRT Logo

October 28 2023
1. Updated the script to fix the issue of theme names not getting parsed correctly. Thanks to u/Brian_H8951 for pointing out the issue and the fix!

October 26 2023
1. add sanity check for 7z binary. If the binary doesnt exist then the SteamOS is very old need to update SteamOS first!
2. Clover Toolbox - capture the free space on EFI partition. Useful when doing troubleshooting.
3. Custom BGRT / Logo will be displayed when the Steam Deck is powered on.

p

September 26 2023
1. Does not rely on HackBGRT anymore! I've integrated my [BGRT Logo Changer script.](https://github.com/ryanrudolfoba/SteamDeck-Logo-Changer)
2. Added SteamOS version number, build number and kernel number on the custom systemd script (useful when troubleshooting)
3. Code cleanup on the Clover Toolbox
4. Updated config.plist

September 13 2023
1. added notification dialog box after changing themes
2. resized BMPs and new config for HackBGRT

September 12 2023
1. Perform best effort to automatically remove rEFInd if it is previously installed
2. Clover 5155 - thanks @imfelixlaw for the [PR #23.](#23)
3. Updated config.plist to use Apocalypse theme by default (I chose this theme as this looks good on my Switch Deck!)
4. Updated config.plist to support Pop!_OS
5. Updated config.plist to reflect Nobara and Bazzite
6. New config and new logos for HackBGRT (Windows Internal SSD only)
7. Clover Toolbox - option to set static theme or random theme
8. Clover Toolbox - option for DeckHD 1200p screen mod

July 30 2023
1. Updated Clover from 5151 to 5154

May 24 2023
1. cleanup the Clover Toolbox menu so it is easier to read
2. cleanup the config.plist

May 19 2023
1. bugfix - fixed the issue where it shows duplicate Windows icon when Windows is installed on sdcard / external SSD.
2. Clover Toolbox - a simple GUI to toggle settings.
3. added desktop shortcut to easily access Clover Toolbox.
4. added several Linux distros - CentOS, Debian, Manjaro.

April 23 2023
1. added new themes - Apocalypse, Crystal, Gothic, Rick and Morty.
2. re-write the inject systemd service on the other rootfs.
3. added custom splash screen when booting Windows from the internal SSD.
4. add Clover Boot Manager Service status as non-Steam game to easily check the systemd service from within Game Mode.

March 31 2023
1. have a simple menu during install to select which OS will be the default in the Clover GUI boot menu.
2. implement systemd service / inject systemd service on the other rootfs.

March 11 2023
1. rewrote the script (thanks arkag!) so it pulls the ISO directly from the Clover repositories.
2. updated the config.plist so it supports more OS automatically - Kali, Ubuntu and Fedora.

February 20 2023
1. added more sanity checks and cleanup in the post-install script.
2. cleaned up the config.plist so it is more manageable and easier to read.
3. changed the mouse pointer speed to 20 to close the issue reported here.

January 26 2023
1. added experimental version (this is what i use) - no need for Windows powershell script / scheduled task.
2. color coded the install script - if the output is RED then something went wrong.
3. updated script and scheduled task on the Windows side.
4. updated config.plist to support Windows, Batocera and Ventoy on microSD / external SSD.
5. easily add / remove themes via drag and drop / copy-paste in Dolphin file manager.
6. add multiple themes and Clover will automatically choose a random theme on each reboot.
7. Catalina and Mojave theme bundled by default.
8. community contributed icons / logos for SteamOS and Batocera (thanks to WindowsOnDeck reddit members u/ch3vr0n5 and u/ChewyYui).
9. re-wrote and re-organized the README.

January 11 2023
1. Initial Release based on Clover v5151.
2. Does not rename / move Windows EFI entries.
3. When the dual boot breaks, just boot back manually to SteamOS and it will fix the dual boot entries on its own.
4. Makes as few changes as possible - doesn't rely on pacman repositories, no systemd scripts and no EasyUEFI.
5. All-in-One script - install, disable / re-enable, uninstall.

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! And don't forget to give a shoutout to @10MinuteSteamDeckGamer / ryanrudolf from the Philippines!

If you like my work please show support by subscribing to my YouTube channel @10MinuteSteamDeckGamer.
I'm just passionate about Linux, Windows, how stuff works, and playing retro and modern video games on my Steam Deck!

Monetary donations are also encouraged if you find this project helpful. Your donation inspires me to continue research on the Steam Deck! Clover script, 70Hz mod, SteamOS microSD, Secure Boot, etc.

Scan the QR code or click the image below to visit my donation page.

Disclaimer

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

I've created and has been using this script since December 2022 and a lot of users are reporting success too. You are in good hands - I know what I'm doing but I just need the standard disclaimer to protect myself from any liability.

Click the image below for a video tutorial and to see the functionalities of the script!

Quick Install Steps - if you are in a hurry then this is what you need (but really you should read the rest of the README!)

Perform some Windows config first! Boot to Windows and open elevated command prompt -

  1. bcdedit.exe -set {globalsettings} highestmode on
  2. reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f

Once done, boot to SteamOS to install Clover!

  1. Boot into SteamOS, then go into Desktop Mode and open a konsole terminal.

  2. Clone the github repo.

    cd ~/
    git clone https://github.com/ryanrudolfoba/SteamDeck-Clover-dualboot

    If it errors that folder already exists, delete the old folder first -

    rm -rf ~/SteamDeck-Clover-dualboot

    Then perform the clone again -

    git clone https://github.com/ryanrudolfoba/SteamDeck-Clover-dualboot
  3. Execute the script!

    cd ~/SteamDeck-Clover-dualboot
    chmod +x install-Clover.sh
    ./install-Clover.sh

    image

  4. The script will check if sudo passwword is already set.
    a. 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

    b. 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

    c. Script will show a menu. Select which OS will be the default selected in the Clover GUI boot menu.
    image

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

  5. Reboot the Steam Deck. Clover 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. You can also use the trackpad to control the mouse pointer and use the RIGHT SHOULDER BUTTON for LEFT-CLICK.
    image

Why Use this Clover install script for dual boot?!?

  1. Makes as little changes as possible to the SteamOS / Windows installation.
  2. Makes dual boot with SteamOS / Windows easy with a nice GUI.
  3. No extra config needed for Ventoy, Batocera, Kali, Ubuntu and Fedora. (if there are other OS you want to be added just let me know)
  4. Automatically and easily re-create the dual boot entries if it gets broken by a BIOS / SteamOS / Windows update. No need to type manual commands!
  5. Supports random themes (Mojave and Catalina bundled in the install script), add / remove themes, icons, background using Dolphin File Manager.

Screenshots

Apocalypse - SteamOS, Windows and Batocera (microSD) image

Clover Toolbox image

More Screenshots Here

Custom Windows Splash Screen
image

Gothic - SteamOS, Windows, Batocera (microSD) and Fedora
image

Catalina - SteamOS, Windows, and Batocera (microSD)
image

Crystal - SteamOS, Windows, Batocera (microSD) and Fedora
image

Rick and Morty - SteamOS, Windows, Batocera (microSD) and Fedora
image

Select which OS will be the default in the Clover GUI boot menu
image

Catalina - SteamOS, Windows, Batocera (microSD) and Fedora
image

Mojave - SteamOS, Windows, Ventoy (microSD) and Fedora
image

Mojave - SteamOS, Windows and Batocera (microSD)
image

Mojave - SteamOS, Windows on Internal SSD and Windows on External SSD / microSD
image image

Mojave - SteamOS, Windows, Ubuntu and Kali (pic not mine)
image

Easily add / remove themes using Dolphin File Manager
image

Using the Clover Install Script

Read this first - What does the script do?!? 1. The script copies files to the /esp/efi/clover location and manipulates the EFI boot entries.
2. Extra scripts are saved in ~/1Clover-tools which performs a sanity check on each reboot, and an uninstall script to reverse any changes made.
3. systemd service is created and also injected on the other rootfs.
Read this first - Prerequsities 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.
Read this first - Prerequisites for Windows

VERY IMPORTANT - If you plan to use Windows installed on the sdcard, make sure that it is setup as GPT and Windows-to-Go in Rufus.
image

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

  2. No scripts / scheduled tasks related to rEFInd or EasyUEFI.

  3. APU / GPU drivers has been installed and screen orientation set to Landscape.

  4. This is VERY IMPORTANT! Do not skip this step. If you skip this step, the display will be garbled when Windows boots up!
    Open command prompt with admin privileges and enter the command -
    bcdedit.exe -set {globalsettings} highestmode on

  5. This is IMPORTANT! Do not skip this step. If you skip this step, the time will be messed up!
    Open command prompt with admin privileges and enter the command -
    reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f

Read this first - Uninstall Old Version of Clover Before Using this Script 1. If you are using an older version of my script, it is recommended to uninstall it first before installing the new one!
2. Open a konsole terminal and run the uninstall script -
cd ~/1Clover-tools
./uninstall-Clover.sh

image

Once you have read the above, perform the following steps to install Clover 1. Boot into SteamOS, then go into Desktop Mode and open a konsole terminal.
2. Clone the github repo.
cd ~/
git clone https://github.com/ryanrudolfoba/SteamDeck-Clover-dualboot

If it errors that folder already exists, delete the old folder first -
rm -rf ~/SteamDeck-Clover-dualboot

Then perform the clone again -
git clone https://github.com/ryanrudolfoba/SteamDeck-Clover-dualboot

  1. Execute the script!
    cd ~/SteamDeck-Clover-dualboot
    chmod +x install-Clover.sh
    ./install-Clover.sh

    image

  2. The script will check if sudo passwword is already set.
    a. 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

    b. 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

    c. Script will show a menu. Select which OS will be the default selected in the Clover GUI boot menu.
    image

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

  3. Reboot the Steam Deck. Clover 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. You can also use the trackpad to control the mouse pointer and use the RIGHT SHOULDER BUTTON for LEFT-CLICK.
    image

How to Add / Remove Themes

Read this first - ESP partition size The esp partition is only 64MB in size. This is where SteamOS, Windows and Clover EFI entries are saved.
The free space on the esp partition is around ~25MB. Make sure the themes you download don't exceed this size!
You can have multiple themes installed and Clover will automatically pick a random theme on every reboot!
Read this first - custom icons When adding your own theme, make sure to name your custom SteamOS and Batocera icons as follows -
os_steamos.icns
os_batocera.icns
This are just regular PNG files, but you have to rename them to have the icns file extension.
Sample icons are saved in custom\iconset folder. Thanks to WindowsOnDeck reddit members u/ch3vr0n5 and u/ChewyYui !!!
Steps to Add / Delete Themes 1. Boot into Desktop Mode and then open Dolphin File Manager.
2. Navigate to /esp on the lower left side. It will say "Could not enter folder /esp"

image

  1. Right-click and select "Open as Root."
    image

  2. Enter the sudo password when prompted.

    image

  3. A new folder will appear for the esp partition.
    Take note of the free space located in the lower right side. On this example the free space is around 26MB.
    image

  4. Visit the Clover Themes github to download the themes. Make sure the themes you download doesn't exceed the free space of the esp partition from step5.

  5. Navigate to efi > clover > themes. It will show a list of themes installed. By default it will show 3 - random, Catalina and Mojave.
    image

  6. Don't delete the random folder! It is needed so that when there are multiple themes installed, Clover will randomly pick a theme on every reboot.

  7. Delete the themes you don't want and copy / paste new themes that you have downloaded.

  8. Reboot and enjoy the new theme!

OPTIONAL - Scheduled Task for Windows. Use this only if you have Windows installed on microSD / external SSD and if Windows keeps hijacking the bootloader!

Use this only if you have Windows installed on microSD / external SSD and if Windows keeps hijacking the bootloader!
  1. Download the ZIP by pressing the GREEN CODE BUTTON, then select Download ZIP.

image

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

  2. Right click CloverWindows.bat and select RUNAS Administrator.
    image

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

  4. It will also automatically create the Scheduled Task called CloverTask-donotdelete.
    image

  5. Go to Task Scheduler and the CloverTask will show up in there.

  6. Right-click the CloverTask and select Properties.
    image

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

  8. Right click the task and select RUN.
    image

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

  10. Open status.txt and the Clover GUID should be the same as the bootsequence. Sample below.
    image

  11. 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!

How to Update to a Newer Version?!?

From time to time I update this repo for new version of the script. It may include bug fixes, new features or an updated Clover EFI version.
To update to a new version -

  1. Go to Desktop Mode and launch Clover Toolbox.
  2. Select Uninstall
  3. Clone the repo again to get the latest version and perform the install steps.
Q0. Windows on microSD / external SSD doesn't get picked up automatically! 1. Make sure that it is setup as GPT and Windows-to-Go in Rufus.

image

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 to SteamOS.
  2. Go to Desktop Mode.
  3. Double-click Clover Toolbox desktop icon.
  4. Select the item called Service and press OK.

image

  1. Press the item called Disable and press OK.
    image

image

  1. Reboot and it will automatically boot to Windows.

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

  3. Make sure screen orientation is set to Landscape.

  4. If everything looks good then shutdown the Steam Deck.

  5. Press VOLDOWN + POWER and select SteamOS from the list.

  6. Follow step2 onwards, and on step 5 select the item called Enable.

image

image

  1. Reboot and it will go back to Clover!
Q3. I need to perform a GPU / APU driver upgrade in Windows. What do I do? 1. Boot to SteamOS.
2. Go to Desktop Mode.
3. Double-click Clover Toolbox desktop icon.
4. Select the item called Service and press OK.

image

  1. Press the item called Disable and press OK.
    image

image

  1. Reboot and it will automatically boot to Windows.
  2. Install the GPU / APU driver upgrade and reboot Windows.
  3. Make sure screen orientation is set to Landscape.
  4. If everything looks good then shutdown the Steam Deck.
  5. Press VOLDOWN + POWER and select SteamOS from the list.
  6. Follow step2 onwards, and on step 5 select the item called Enable.

image

image

  1. Reboot and it will go back to Clover!
Q4. I reinstalled Windows and now it boots directly to Windows instead of Clover! 1. Shutdown the Steam Deck. While powered OFF, press VOLDOWN + POWER and select SteamOS from the list.
2. Script will automatically fix the dual boot entries! Reboot and it will go back to Clover!
Q5. Windows automatically installed updates and on reboot it goes automatically to Windows! 1. Shutdown the Steam Deck. While powered OFF, press VOLDOWN + POWER and select SteamOS from the list.
2. Script will automatically fix the dual boot entries! Reboot and it will go back to Clover!
Q6. There was a SteamOS update and it wiped all my boot entries! This happens even if not using dualboot / Clover / rEFInd.
1. Shutdown the Steam Deck. While powered OFF, press VOLUP + POWER.
2. Go to Boot from File > efi > steamos > steamcl.efi
3. Script will automatically fix the dual boot entries! Reboot and it will go back to Clover!
Q7. The time is always getting messed up! 1. Boot to Windows.
2. Open command prompt with admin privileges and enter the command -
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f

3. Reboot the Steam Deck for changes to take effect.
Q8. I see 'Error mounting ISO!' when attempting to run the Clover script! This can happen if you have an old version of SteamOS installed or have installed SteamOS from the recovery image which is missing 7zip.
1. Boot to SteamOS.
2. Perform a System Update by going to Steam > Settings > System > Check for Updates
3. Once update has completed, restart in to SteamOS.
4. Go to Desktop Mode and rerun the Clover script.
Q9. I hate Clover / 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. Go to Desktop Mode.
3. Double-click Clover Toolbox desktop icon.
4. Select the item called Uninstall and press OK.

image

  1. Clover will be uninstalled and on next reboot it will automatically load Windows. Clover has been uninstalled!
Q10. I like your work how do I show a token of appreciation? If you like my work please show support by subscribing to my YouTube channel @10MinuteSteamDeckGamer.
Q11. Do you accept donations? Monetary donations are also encouraged if you find this project helpful. Your donation inspires me to continue research on the Steam Deck! Clover script, 70Hz mod, SteamOS microSD, Secure Boot, etc.

Scan the QR code or click the image below to visit my donation page.

Known Issue

  1. If Steam Deck is docked and connected a TV / display higher than 1080p (4K, 1440p), the GUI screen will be sideways. This is purely cosmetics and once an OS is selected it will boot in the correct orientation.

1080p TV
image

4K TV
image

Acknowledgement / Thanks

Thanks to jlobue10 for his rEFInd script available here. This Clover script was inspired by jlobue10's rEFInd script.

And in no particular order -

  • the Clover team / sergey for creating this awesome software.
  • Christoph Pfisterer for creating rEFIt which Clover is a fork of.
  • ss64.com for my quick online reference guide on command line switches! I also use this at work when scripting using bash / batch / powershell.
  • deckwizard for testing the initial Clover script.
  • arkag for the code enhancement to pull the ISO directly from Clover repo.
  • community contributed icons / logos for SteamOS and Batocera (thanks to WindowsOnDeck reddit members u/ch3vr0n5 and u/ChewyYui).
  • baldsealion for creating the custom splash screen for Windows.
  • Kodi Ross from FB Steam Deck Community for the Rick and Morty theme.
  • insanelymac and its forum members for creating beautiful Clover themes.
  • and the rest of WindowsOnDeck reddit community / discord server!
  • PS I forgot to mention LOUP the author of the OpenAsRoot KDE extension.