Cloning Windows 11 and Getting it to Boot
Oddly, this article is focused on the latter part of the title.
There are a myriad of different ways to clone Windows to another HDD / SSD, etc. Software (Acronis, Linux based, etc.) and Hardware (USB drive bays that have cloning ability) based. This article is about getting it to boot on another piece of hardware (or in a Virtual Machine). And yes, there are many automated ways of doing it with Acronis Universal Restore, etc. This article is for when the 'automatic stuff' doesn't work.
If your interested in reading about the boot process of a PC and how Windows boots (NTLDR / MBR and UEFI Style), Wikipedia has a ton of good stuff on it.
First Things First (and where they are)
- BCD (Boot Configuration Data) Related Information
- Windows MBR BCD File (default location): C:\Boot\BCD
- Windows UEFI (AKA EFI) BCD File (typically): C:\EFI\Microsoft\Boot\BCD (https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcd-system-store-settings-for-uefi?view=windows-11 )
- An MBR BCD File and a UEFI BCD File can exist on the same disk / partition / volume (in different directories, see above for location).
- Setting a Partition active determines which BCD File is used (if there is more than one Partition with BCD File(s) of either type)
- EasyBCD (Free and Paid Version, 2.4.x seems to be the latest version)
- BootICE (No Home Website seems to be available and 18.104.22.168 seems to be the latest version)
- Visual BCD (free)
- ...and of course the BCDEDIT Command Line utility
- BOOTREC: Hmmm, good and bad here. FixMBR works great (just writes a standard Windows MBR sector). The rest of it isn't so great. It's hit an miss. Don't get depressed if /FixBoot doesn't work and /ScanOS doesn't find an OS.
- EaseUs or AOEMI Partition Manager (EaseUs 12.x seems to have issues cloning stuff properly)
- Acronis (various imaging utilities)
- Stuff to Do and Watch Out for
- Turn off Hibernation: Not a necessity, but eliminates the Hiberfile.sys File (can be re-enabled later)
- Turn off the Page File: Again, not necessary, but eliminates the PageFile.sys File (can be re-enabled later)
- Fast Boot (it can cause some funky Blue Screen issues): Disable it! (see below
- If Booting from the Windows 10 or 11 DVD / BR / ISO, at the first installation screen: SHIFT +F10 opens a command prompt
- Switching between RAID (Intel or other software based RAID), AHCI, IDE for SATA (or IDE / PATA) is much easier in Windows 11 (see below)
It seems like cloning software lives to not be able to clone the Boot Folder properly. Or Microsoft has done something to make it very difficult to clone the Boot (or EFI) Folder properly.
To fix a Partition's 'boot information' (not just the BCD File): bcdboot c:\Windows /l en-us /s c: /f ALL /v (choose the language of your choice, just to make sure the bcdboot command gets it right.)
- ...right after the bcdboot command is the C:\Windows: This is where the 'source' files are (IE, what the bcdboot command copies to the destination)
- /s: The Partition / Volume where the information is to be written, as identified by a drive letter (If a Volume / Partition hasn't been assigned a drive letter, use the DISKPART command to assign a drive letter: https://winaero.com/change-drive-letter-windows-10/, or any other number of websites with a how to on the subject )
- /f: What BCD information to create / write (IE, MBR or UEFI or both (ALL))
- /v: Verbose, IE display the 'log file' as it's doing things. Don't worry about errors it displays, as long as at the end it says 'succeeded'.
Fast Boot (not to be confused with Ready Boost) and HiberFile
Control Panel, Power, Choose what the power buttons do*, Turn on fast startup (To modify the settings, see the Change Settings that are currently unavailable towards the top)
Registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power\HiberbootEnabled (0 = off, 1 = on)
RAID (Intel or other software based RAID) / AHCI / IDE for SATA (or PATA for that matter)
The simplest thing to do is to let it crash and reboot a couple of times until it offers to boot into Safe Mode (which it should successfully do). Safe Mode now seems to include the ability to try various RAID / HDD / SSD / NGFF / NVMe / etc. drivers (or maybe it just loads all the drivers by default. Anyway, after booting into Safe Mode,
* And of course the setting is under the "Choose what the power buttons do" even though it is no way involved with any power buttons. And for that matter, why is the word buttonS plural? For the life of me, I cannot think of a single computer that has multiple external power buttons (the exception being motherboards that have the power button mounted on the case, plus a button the motherboard manufacturer placed on the motherboard itself, and not counting the power SWITCH on the rear of a PSU).
EasyBCD has some minor issues. The first that comes to mind is that it doesn't always decide on the correct BCD file if there are multiple partitions with BCD files. It gets it right about 98% of the time, but sometimes decides on the wrong one. So just to be sure, and to avoid frustration, double check by loading the BCD you want to edit.
Another issue it has relates to the "Metro" Boot Menu (see below). The checkbox for the menu just doesn't seem to ever match up with reality. Use BootICE or the Command line to control the "Metro" feature.
Metro Boot Menu (from Windows 8)
Instead of the clunky Text based boot menu, you can have a cool Windows 8 "tile looking" boot menu. The down side is that it comes up later in the boot process than the text menu. So if there's an issue with any partitions on a disk drive, you might never make it to that menu to select an option before the computer crashes. Play it safe and keep the text based menu.
Other Stop You in Your Track Issues and their Solutions
There are many, many reasons Windows will find not to boot. Here are just a couple of odd solutions;
MBR and UEFI Motherboards
If you've got a BOOT and EFI Folder / Directory on a Partition, watch out for a common hole to fall into for systems that boot MBR and UEFI. Remember, both the BOOT (for MBR) and EFI (for UEFI booting) have BCD files. If you're trying to boot via MBR and haven't modified the EFI BCD File, a system might fool you into a frustrating situation if it's booting from the EFI BCD file instead of the BOOT (MBR) BCD file. Manually select the boot device (F12 key on many systems), just to make sure.
Plain Cloning via Acronis (or some other software) or using USB Duplicator Bay
If Windows won't boot, use a boot CD to re-build / re-create the BSD information (MBR or U'EFI). The Windows installation DVD / ISO can be used. OR, one of several WinPE boot CDs out there (descendants of BartPE) like Hirem's Boot CD with a visual BCD Utility like EasyBSD or BootIce.
Scenario: Multiple Windows installations on multiple Partitions on a single Disk (HDD / SSD / etc.)
After Windows is imaged or installed on a 2nd, 3rd, whatever partition (IE, it isn't the only, nor the first Windows installation on a disk), and the BCD stuff has been taken care of to allow one to select any partition to boot from, it still might not boot. Solution? Edit and / or rebuild the BCD stuff on the partition of the Windows install that won't boot, then set that partition as active, see if it boots. If it does, go back to the original partition that was active, re-edit the BCD stuff, then set the original partition as active, reboot and see if selecting the new Windows install works then.
...and the number one item returned from a search by Google on the terms: "Windows" "Ready Boost" (or "ReadyBoost") is this retarded feature that actually promotes the idea of using Read Boost on a USB 2.0 device in the year 2022: https://www.thewindowsclub.com/how-to-turn-readyboost-on-or-off-in-windows-7 WTF?!?!?
Thankfully in an odd twist of fate where Microsoft actually gets something right in preventing users from enabling something they shouldn't is this;
ReadyBoost is not enabled because the computer is fast enough that ReadyBoost is unlikely to provide additional benefit. (...and it should be reworded: The ReadyBoost feature is not available. It is because this computer is fast enough that it will not benefit from this feature.
Again, Microsoft got something right. Wow!
So back to Google bashing... This is an example of why computers aren't smart enough to know the best answer. In the year 2022, the best formatted website (AKA conforming to Google's 'Best Practices') gets the number one listing, not the website containing the best information. It's that way with so many sites these days that poach content off of other sites, do a great job conforming to Google's 'Best Practices' in terms of SEO, and get listed first.
Rough Notes (all the below can be ignored, it's just the rough notes this article was based on
Be prepared to fix BCD stuff (the BOOTREC command is next to useless. Imagine spinning around in a circle seven times, and then pinning the tail on the donkey, that's about the success chances of BOOTREC, IE nothing evil or bad, just sheer luck that it will work or not, which begs the question of how useful a feature it is.) with: BCDBOOT: https://www.partitionwizard.com/partitionmagic/the-requested-system-device-cannot-be-found.html (Documentation from Microsoft: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcdboot-command-line-options-techref-di?view=windows-11)
BCDBOOT might require using DISKPART to manipulate drive letters: See above BCD Article and these: https://winaero.com/remove-drive-letter-windows-10/, https://winaero.com/change-drive-letter-windows-10/
RAID VS AHCI: In Windows 11, there's a shortcut to switching between RAID and AHCI: https://support.thinkcritical.com/kb/articles/switch-windows-10-from-raid-ide-to-ahci (The registry can still be used too, but this seems easier, except if one wants to switch back to IDE / ATA: https://wrw.is/switching-from-ahci-mode-back-to-ide/, and to a lesser degree: https://www.partitionwizard.com/partitionmagic/enable-ahci-after-win-10-installation.html)
(https://support.bromium.com/s/article/Disabling-Windows-10-Fast-Startup (and don't forget to mount the proper SYSTEM Hive, the System Hive from the Bootable Media or Rescue Media is different)
...turn off Ready Boost or Boot or whatever
Fix the BCD
NOTE: The BCD boot menu comes AFTER disk WhatEver.sys file, so if the correct drivers aren't there, will never see the menu
Another NOTE: One of the solutions from switching to ATA (IDE for SATA), is to switch the BIOS to AHCI (from ATA), then let it reboot and crash a couple of times until it finally offers the Safe Mode option (F8), then boot to Safe Mode, Reboot, then it will be in AHCI mode. OR use the boot CD / DVD / ISO to modify the Start Up Settings (in the BSD)
For Windows 11 (assuming RAID drivers are installed and assuming Windows was originally installed using the built in Intel RAID drivers or in AHCI mode, then RAID drivers installed and switching to RAID mode)
Switching from AHCI to RAID (or vice versa) is just changing it in the BIOS, letting Windows Boot, crash, reboot, crash, reboot, then Safe Mode, boot, then reboot, in RAID Mode (or reinstall the RAID drivers while in AHCI mode, then rebooting)
RAID or AHCI to IDE seems to be all good to go (or a Safe Boot, then Restart)
And IDE to ACHI
Noted Differences in Registry;
IDE / ATA: iaStorV is set to 0
AHCI: iaStorV is set to 1
RAID: iaStorV is set to 1
iaStor (plain) and msahci do NOT seem to exist anymore for Windows 11 (but storeahci does), perhaps in favor of the MS Storage Space 'thing' / 'multi-driver thing' (present in RAID, AHCI, and ATA / IDE).
intelide and pciide always set to 0 for RAID, IDE / ATA and AHCI modes
...see here for more information on Intel RAID and AHCI: https://blog.workinghardinit.work/2018/11/28/moving-from-ahci-to-raid/
In the end, switching between modes can be as simple as boot / safe mode / boot, without worrying about manually changing registry entries.