Doing a Clean Windows 11 Install on a Microsoft Surface Pro X

Prepare yourselves for the tale of the most absurd journey I've ever undertaken to get an endpoint to work. Honestly, I think a better title for this article might have been "The most advanced bit of black magic fuckery I've ever done to get an operating system to work". I must warn you, here be dragons.

As the endpoint guy, I get to play with a lot of different devices. Of course, you've got your iPads, iPhones, macOS devices, Windows devices, and even some Androids too! Your Macs might be based on x86 or ARM, your Windows PCs will almost always be based on x86, and your mobile devices (tablets and phones) are pretty much all based on ARM. At some point or another, I've gotten to play with all of these kinds of devices, just to see how they work. After all, part of being good at managing endpoints is developing a good understanding of them through direct experience.

Recently, I stumbled across an unopened box for a Surface Pro X in our inventory, and nobody knew what it was for. Chances are, it was for some specific one-off use and then shelved and never bothered with again. The interesting thing, though, is that it hadn't been opened yet, which tells me that whatever the plan was for it didn't end up happening.

Now, as some of you might already know, the Surface Pro X is an ARM-based Windows tablet. It's full Windows, just compiled for ARM instead of x86. Since I'm the endpoint guy, and we're doing the whole "cloud-native Autopilot/Azure AD/Intune" thing for Windows devices, I thought this would be a very interesting challenge for me. Windows on ARM provisioned via Autopilot and managed by Intune is something that I believed should work, but I had never tried it before.

I check this thing out of inventory, and start it up. It boots into a fairly old version of Windows 10 (I think maybe 1903), and I didn't notice until after I had it in Audit Mode that it was using Windows 10 Home. No biggie, I'll just sysprep this thing and log into it normally and then do all the upgrades and whatnot.

While I'm doing the upgrades, I go ahead and get it imported into Autopilot. First it goes to Windows 10 21H1, and then it says "Your device can run Windows 11", but doesn't give me a choice to actually perform the upgrade. It just says "We'll let you know when it's ready". Bah! I'm an engineer, I don't answer to you, Microsoft! I'll get Windows 11 on this thing myself!

So I hit up the Volume License Servicing Center, download myself a copy of Windows 11 Enterprise for ARM, mount it on the Surface, and run through the setup program. I want a clean install, so I choose to not keep anything. Install proceeds, needs to reboot, and then all of the sudden, BSOD... Crap! Ok, no worries, let's see if it just takes me to recovery mode. Spoiler alert: No, it does not. I just keeps booting up, crashing mid-boot, and starting over.

Ok, that's fine. I can fix this. I've installed Windows a million times. I'll fire up my trusty Rufus, grab my flash drive, and make a bootable Windows 11 installer for ARM. Got that done, booted to USB, and then went to install Windows 11. No drives detected. Oh, this must need some kind of special storage driver that isn't in Windows 11 ARM already. Ok, let's go try and download that.

Fun fact: Microsoft does not publish the drivers for the Surface Pro X. It will gladly let you download a recovery image based on Windows 10 1909, but you can forget about getting an actual driver package.

Ok... Now what do I do? I can't install Windows 11 on a drive I can't see. I can't see the drive because I need drivers. I can't get the drivers. Maybe if I had another Surface Pro X that was functional, I could take its drivers out and copy them over here, but I don't have one of tho... Wait a minute! The recovery image! It's just a Windows 10 installer, and it's certainly going to have the drivers I need! I'd even be willing to bet that those drivers are compatible with Windows 11!

Ok, I grab the recovery image, extract it, and see a familiar directory: Sources. This is where the boot.wim and the install.wim files are normally kept on installation disks for Windows. Sure enough, I see my files there. At first, I tried to create a recovery disk based on this image, but every time I tried to boot to it, the installation disk would get wiped for some reason. Literally, I would create the recovery disk, copy the image files over, plug it into the Surface Pro X, and try to boot from it. Booting would fail, and then I'd try to plug it back into my workstation, and the drive was completely wiped! I did this 3 times, same behavior each time.

At this point, I'm beginning to get irritated. Why doesn't this work? It's alright though, I've got more things I can try. I've got that boot.wim file, and I'm fairly confident that Microsoft would include the storage drivers in the boot.wim file. I'm also fairly sure that I could use that boot.wim file on a Windows 11 USB installer. So, back to Rufus. I create a bootable Windows 11 ARM install disk, and drop in the boot.wim file to replace what came with the Windows 11 ISO.

This time, I at least get recovery tools, which is farther than I got last time. However, that boot.wim file didn't actually work like I was hoping. But hey! I've got a command prompt in a Windows instance that can see the internal storage AND my USB drive! Awesome! I'll just use diskpart and DISM to manually install Windows 11. All I'd be doing is the same stuff that the Windows installer itself does, just manually.

There's an excellent guide on docs.microsoft.com about how to partition a UEFI hard drive for Windows installation. There's also a companion to that which tells you how to take a WIM file and apply it to the drive you just partitioned. Seriously, you can just follow that to install Windows without ever actually booting into an OS.

So I go through that process, and I'm super excited. Of course this will work, right? Wrong. Installation is completed, so I shut it down, power it back on, and instant BSOD. This time, it says "INACCESSIBLE_BOOT_DEVICE" as the stop code. Interesting, so you're telling me that Windows 11 literally doesn't come with the storage drivers for the Microsoft Surface Pro X at all!?

Ugh... I was really hoping I wouldn't have to do this, but I do. I've got my install.swm files from the recovery media. You can use 7-Zip to extract those into a proper Windows OS folder structure. Drivers registered with Windows are located in C:\Windows\System32\DriverStore\FileRepository. So I go there, make a copy of all of those drivers, and put them in C:\ImageServicing\Drivers on my workstation.

So I mount the install.wim file from the Windows 11 ISO I downloaded earlier using DISM, take those drivers I just extracted from the recovery image, and add them to the mounted install.wim file using DISM. Surprisingly, this actually went off without a hitch. All but 2 of the drivers out of like 470 were installed successfully. I commit the changes to the install.wim file, and paste it over top of the install.wim file located in my USB Windows 11 install disk.

If it's not clear already, what I've effectively had to do is scavenge drivers from a recovery image that I downloaded from Microsoft, and apply them to the installer I'm about to use to install Windows 11. I think this takes the title of "single jankiest thing I've ever attempted".

Surprisingly, though, this actually works. I am able to get back into my command prompt, and again using diskpart and DISM, I can apply my install.wim file onto the Surface Pro X internal storage. This time, when I shut it down and power it back up, Windows 11 actually boots successfully. Windows Autopilot even fires right up as soon as it's connected to the internet.

This exercise in insanity has been very eye-opening, to say the least. Why would Microsoft put out an ARM-based Windows device while not releasing drivers for it? Why would Microsoft NOT include the drivers for their own home-built hardware into their own operating system? Why would the recovery image I tried to make (following Microsofts own documentation) keep formatting my recovery disk? All in all, by the time I got through this, I hated the process so much that I don't think I could honestly recommend this device to anybody.

Hope you enjoyed this adventure! I'll talk about managing these things in a later post.

Tung Duong Ngo

Electrical Engineer with Computer Science background

2 年

The little but important trick "copying boot.wim from official recovery image and replace the boot.wim from the ISO image" just saves my day. It has the drivers for the recovery screen so that I can use the command prompt to do more advanced actions. Thank you for an interesting article.

Nikolas Evers

Entwickler bei junge haie GmbH

2 年

I had to go through the same ordeal today - your post was incredibly helpful. Thank you for the black magic! ??♂?

要查看或添加评论,请登录

William Ogle的更多文章

社区洞察

其他会员也浏览了