Daasin / SteamDeck-Clover-dualboot

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

All-in-One script and instructions for installing Clover - 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!

Disclaimer

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

What's New (as of May 24 2023)

  1. cleanup the Clover Toolbox menu so it is easier to read
  2. cleanup the config.plist
Old Changelog

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.

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

Sample Video - How to Install Clover

install-Clover.mp4

Sample Video - Catalina Theme and Booting to Windows with Custom Splash Screen, BootVideoRandomizer and Playnite!

video.mp4

Video Tutorial - this are good supplement for the instructions in this github!

Click here if you prefer a video tutorial! OVERKILL GAMING video tutorial - here.
OVERKILL GAMING video tutorial (updated) - here.
baldsealion video tutorial here.

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!

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 into SteamOS.

  2. Go to Desktop Mode.

  3. Open a konsole terminal and re-enable the Windows EFI -
    cd ~/1Clover-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. Shutdown the Steam Deck. Press VOLDOWN + POWER and select SteamOS from the list.

  8. 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 into 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 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!
Q9. I like your work how do I show a token of appreciation? You can send me a message on reddit / discord to say thanks!
Q10. Do you accept donations? If you want to donate, you can drop by at my fundraising page to help fight kids cancer! I ride my bike in summertime to help raise awareness and help fight kids cancer! All proceeds go to Canada Sick Kids Foundation.

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.
  • Metabolix for his HackBGRT that loads a custom splash screen (BGRT) for Windows. I modified it a bit so it plays nicely with this Clover script.
  • and the rest of WindowsOnDeck reddit community / discord server!

About

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


Languages

Language:Shell 88.5%Language:Batchfile 6.2%Language:PowerShell 5.3%