Repairing a Windows 11 boot hang from Linux and WinRE (and when to stop)
windowsdual-bootnvmevmdregistryhivexntfs-3gbcdwinrediskpart
A Windows 11 install that stops booting after you change storage settings (adding a disk, installing Linux, switching Intel VMD/RST off) usually hangs forever on the spinning-dots screen. You can inspect and edit almost everything offline: from Linux (NTFS mount, registry hive edits, EFI variables) and from WinRE (diskpart, DISM, SFC, bcdboot). This article records the full toolkit and the decision path from the ArchZeph case (ASUS ROG, two 1863 GB NVMe disks, Windows on one, Arch on the other), where every software repair came back clean and the answer was a clean reinstall.
Background: why storage changes break Windows boot
- The boot-critical storage driver must be boot-start (
Start=0). With BIOS in AHCI mode and VMD disabled, NVMe disks are served by the inboxstornvmedriver.storahciis SATA-only and irrelevant for NVMe. - Intel RST/VMD drivers (
iaStorVD,iaStorAVC, ...) left at boot-start hunt for a controller that is gone. AServices\<drv>\StartOverride\0value overridesStart, so check both. - Driver Start values: 0 boot, 1 system, 2 auto, 3 on demand, 4 disabled.
Toolkit from Linux
Mount read-write (Windows was not cleanly shut down, so NTFS is dirty and hibernation data may exist):
sudo mount -t ntfs-3g -o remove_hiberfile /dev/nvme0n1p3 /mnt/win # FUSE ntfs-3g supports remove_hiberfile
# kernel ntfs3 does NOT support remove_hiberfile; -o force mounts but leaves hiberfil.sys
Read and edit the SYSTEM hive (path is case-sensitive: WINDOWS/System32/config/SYSTEM; Select\Current tells you which ControlSet is live):
sudo hivexregedit --merge --prefix 'HKEY_LOCAL_MACHINE\SYSTEM' /mnt/win/WINDOWS/System32/config/SYSTEM <<'EOF'
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\iaStorAVC]
"Start"=dword:00000003
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\iaStorAVC\StartOverride]
"0"=dword:00000003
EOF
Verify with hivexget before rebooting. Boot Windows once without changing order: sudo efibootmgr -n <WindowsBootManagerNum>.
Toolkit from WinRE (Shift+F10 at the first Setup screen, or Repair > Command Prompt)
diskpart→list disk,list volume,select volume N→detail volumeto map volume to disk.- Offline image health:
DISM /Image:C:\ /Cleanup-Image /RestoreHealthandsfc /scannow /offbootdir=C:\ /offwindir=C:\WINDOWS. - Rebuild boot files: assign the ESP a letter in diskpart, then
bcdboot C:\Windows /s S: /f UEFI. This fixed a0xc000000e("device does not exist") error caused by BCD device-GUID drift after adding a disk and by repeated hard power-offs during the spinner. - Safe Mode via
bcdedit /set {default} safeboot minimal; boot logging writesntbtlog.txt.
Diagnostic logic that settles it
- If both a normal boot and Safe Mode (Minimal) hang without writing a single new line to ntbtlog.txt, the hang is before driver load (early kernel). There is no offending driver to disable.
- Clean DISM and SFC rule out corrupted system files.
- A deleted, all-zero hiberfil plus hibernation disabled rules out a stale-resume hang (a Fast Startup image captured in VMD mode would hang when resumed in AHCI mode, so it is worth testing first).
- Disabling the NVIDIA display stack (
nvlddmkm,NVDisplayStart=4) changed the symptom but did not fix it. At that point, stop guessing and reinstall. Back up the user profile from Linux first (on ArchZeph,C:\Users\Justin, about 163 GB including AppData, copied to VictusPop).
Clean reinstall without breaking the Linux disk
- Boot the installer USB fresh and choose Install now. "Repair your computer" leads only to recovery menus with no install path.
- At the first Setup screen press Shift+F10, run diskpart, identify the Windows disk by its OS-labeled volume, then
select disk <Linux disk>→offline disk. Offline does not persist across reboots; redo it in the same session you install from. - Error
0x80070001 - 0x4002Fon a multi-disk machine (especially two identical-size disks) means Setup is confused by the other disks: offline them. - "I don't have a product key": ASUS and most OEM laptops carry the Windows license in firmware (ACPI MSDM table), so a clean install reactivates automatically online and picks the right edition.
- Custom install, delete only the Windows disk's partitions, install into the unallocated space. With Linux offline, Windows cannot touch its ESP. Afterward fix boot order with
efibootmgrif needed. - After first boot:
powercfg /h offand disable Fast Startup to avoid stale hibernation images.
Making the install USB from Linux
install.wim in current Win11 ISOs is about 7 GB, above FAT32's 4 GB limit, and raw dd of the ISO failed on the ASUS ("media driver missing"). Working layout: partition 1 FAT32 (about 1.5 GB, ESP) with every ISO file except sources/install.wim; partition 2 NTFS with the full ISO. mkntfs is in the ntfsprogs package, not ntfs-3g.
Gotchas
- ASUS firmware auto-boots the first NVRAM entry on a 1 s timeout, so a present "Windows Boot Manager" entry can look missing. Read
efibootmgr -v. - Avoid force-off loops during a hang; they corrupted the BCD here.
- Disk numbers can swap between boots; re-identify by content every session.
- With a frustrated user, one action at a time, and say plainly when a step is a long shot.
See also
- VictusPop, Justin's desktop (hardware, OS, boot, quirks)
- Mounting a full-disk image read-only to recover old projects