Thoughts on tech, software, gaming, sci-fi, and anything in-between.

Installing Windows 11 on a MicroSD Card on the Steam Deck OLED

I prefer to leave SteamOS untouched on my Steam Deck. No dual booting. Instead I keep SD cards with different OS's around for occasional use.

I tried unsuccessfully to install Windows to a SD card from an USB pen-drive, but failed each time. The installation simple fails with the error “The installation has failed”. Thanks Microsoft. Presumably it happens right before it tries to restart for the first time, maybe a bit before.

My theory is that it really doesn't like the SD card reader hardware. I tried with version 23H2 instead of 24H2, and it couldn't even see the card in the first place. Neither could the latest Windows 10 ISO I could find. For reference, I had no trouble installing Fedora or Ubuntu using this strategy. This is purely an issue with Windows.

I tried many different workarounds, including the following:

But none of that made a difference.

That's when I stumbled over a simple concept that I had never considered: Install to a virtual machine and flash it to physical hardware. It so simple and it just works.

I have outlined the steps below.

Installation steps

1. Download the official Windows 11 ISO

You can download it for free from Microsoft. Pick the x64-version, not the ARM-version, and whichever language your prefer.

2. Install VirtualBox on your current OS

I'm using Fedora 41, but VirtualBox runs everywhere. Download it for your OS of choice and install it. On Fedora, I had to update the kernel and install some kernel headers for it to install correctly. Something on the line of:

$ sudo dnf install make time perl gcc dkms kernel-devel kernel-headers

I also had to disable KVM kernel modules as they collided with whatever makes VirtualBox tick. In my case, this did the trick:

$ sudo rmmod kvm_amd
$ sudo rmmod kvm

I believe getting VirtualBox to run in Windows is much simpler, but I didn't have Windows at hand—hence this guide.

3. Install Windows 11 in a Virtual box container.

This part was straight-forward. Just create a new container and boot the ISO. A few notes worth mentioning:

4. Update everything, boot it up, check that it works. Now shut it down.

As the title says. If you believe you have a functioning Windows 11 install that boots, go to the next step.

5. Convert your VDI-file to a raw IMG file

Locate your vdi-file somewhere in your home-folder or similar. This is the volume of your Windows container.

Use the following command to convert it to a raw image. “win10.img” is your output file. Change “Windows 10.vdi” to whatever your input file is named.

$ VBoxManage clonehd "Windows 10.vdi" "win10.img" --format RAW

This took a while on my Steam Deck, maybe 20 minutes or so. And while it did it, it stuck to 0% on the progress bar. Then in the last five seconds or so, it went to 100%, and that was it.

Just wait it out. It will get there :–)

6. Use dd to write the image file to media

You can use this command with any physical media really, including SSDs and harddrives. My Micro SD Card happened to be “/dev/sdc”, so this is what I used below. Use the command lsblk to see what devices you have to choose from, or install “gparted” to get a better overview of what you have got to work with.

$ sudo dd if=[win10.img] of=[/dev/sdc] bs=4M status=progress

This one also took a while, but the progress bar was very precise.

7. Clean up the partitions

You need to resize the main partition to take up the full space of the SD card. Otherwise you will only have the amount you picked in VirtualBox earlier. I used “gparted” for this, but presumably “KDE Partition Manager”, pure fdisk, or any other similar tool would also work.

This was a bit challenging, since the main partition was followed by a small 600 MB partition, and then the rest was unallocated space. Moving the 600 MB partition to the end of the disc wasn't an option.

Turns out, the 600 MB partition is simply a Windows Recovery Partition, and you are unlikely to ever need this. It can be safely deleted.

So, in summary:
1. Delete the last partition (around 600 MB).
2. Resize the big one to take up all the unallocated space left on the SD Card.

8. Windows Drivers on the Steam Deck

You can pick what to boot on the Steam Deck by holding down “volume up” or “volume down” when you power on the system. One goes directly to the boot menu, and the other one allows you to check BIOS settings among other things.

Before you boot up Windows, get the drivers and put them on an USB pen-drive (or copy them directly to the partition, if possible).

Installing all the drivers is straight-forward. You can get them all here:

https://help.steampowered.com/en/faqs/view/6121-ECCD-D643-BAA8

9. Afterword

Congratulations! You managed to install Windows 11 and move it to a physical drive and boot it up.

A few notes on usage:

#SteamDeck #Windows11 #Tinkering #VirtualBox #BootFromSD