Share via

How to make windows bootable again on original hard drive, and which boot config to use (MBR or UEFI)

Anonymous
2024-12-10T11:49:45+00:00

Hi all. I've read posts and instructions on recreating the system partition using bootable media, and am trying to follow to fix issues with the original OS on the original hard drive. It's possible it's very wrecked, as I've tried many things including some bootsec and bootrec commands. I'd like to avoid wiping the entries for the current OS, which is on a different disk, in VHD files. NB I currently have no recovery partitions (they all got nuked).

working bcd on main drive

Windows Boot Manager


identifier {bootmgr}

device partition=\Device\HarddiskVolume1

path \EFI\Microsoft\Boot\bootmgfw.efi

description Windows Boot Manager

locale en-us

inherit {globalsettings}

default {current}

resumeobject {caacd81c-a838-11ef-ad90-803c75063fc8}

displayorder {current}

toolsdisplayorder {memdiag}

timeout 30

Windows Boot Loader


identifier {current}

device partition=C:

path \windows\system32\winload.efi

description Windows 11

locale en-us

inherit {bootloadersettings}

isolatedcontext Yes

allowedinmemorysettings 0x15000075

osdevice partition=C:

systemroot \windows

resumeobject {caacd81c-a838-11ef-ad90-803c75063fc8}

nx OptIn

bootmenupolicy Standard

Here's the main disks and their partition mess at present, disk 1 is original that doesn't boot - previously encountering bluescreen error like tcpip.sys not found - tried sfc which reportedly failed to complete.

So I'm reviewing the info here

https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcdboot-command-line-options-techref-di?view=windows-11#repair-the-system-partition

which also links to related articles for recreating system partition, for MBR or UEFI. I'm not sure which one it was, and whether it matters, or if either can be used, if supported in BIOS - in testing I have ability to enable legacy entries for bootable devices in bios on lenovo laptop - is legacy == BIOS/MBR, and non-legacy == GPT /UEFI ?

This may not help, as this my not be the original entry, and currently not-bootable, but for what it's worth here's the bcd data from the system (F:) partition of disk 1

F:>bcdedit /store f:\Boot\BCD

Windows Boot Manager


identifier {bootmgr}

device partition=F:

description Windows Boot Manager

locale en-us

inherit {globalsettings}

default {default}

resumeobject {9995fbb8-a7d1-11ef-adf9-a30311e0afe7}

displayorder {default}

                    {9995fbba-a7d1-11ef-adf9-a30311e0afe7} 

toolsdisplayorder {memdiag}

timeout 30

Windows Boot Loader


identifier {default}

device unknown

path \Windows\system32\winload.exe

description Windows 10

locale en-us

inherit {bootloadersettings}

allowedinmemorysettings 0x15000075

osdevice unknown

systemroot \Windows

resumeobject {9995fbb8-a7d1-11ef-adf9-a30311e0afe7}

nx OptIn

bootmenupolicy Standard

Windows Boot Loader


identifier {9995fbba-a7d1-11ef-adf9-a30311e0afe7}

device locate=\Windows\system32\winload.exe

path \Windows\system32\winload.exe

description new

locale en-us

inherit {bootloadersettings}

allowedinmemorysettings 0x15000075

osdevice locate=\Windows

systemroot \Windows

resumeobject {9995fbb8-a7d1-11ef-adf9-a30311e0afe7}

nx OptIn

bootmenupolicy Standard


Next steps I'm thinking

  • recheck and retest bios config and results of boot attempts
  • run any related fix commands like sfc
  • recreate system partition using boot media

to be continued... suggestions etc. welcome!

UPDATE 1.

Noticed current BCD info is not verbose; added to show referenced vhd

Windows Boot Manager


identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}

device partition=\Device\HarddiskVolume1

path \EFI\Microsoft\Boot\bootmgfw.efi

description Windows Boot Manager

locale en-us

inherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}

default {caacd81d-a838-11ef-ad90-803c75063fc8}

resumeobject {caacd81c-a838-11ef-ad90-803c75063fc8}

displayorder {caacd81d-a838-11ef-ad90-803c75063fc8}

toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d}

timeout 30

Windows Boot Loader


identifier {caacd81d-a838-11ef-ad90-803c75063fc8}

device vhd=[I:]\win11.vhdx,locate=custom:12000002

path \windows\system32\winload.efi

description Windows 11

locale en-us

inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}

isolatedcontext Yes

allowedinmemorysettings 0x15000075

osdevice vhd=[I:]\win11.vhdx,locate=custom:22000002

systemroot \windows

resumeobject {caacd81c-a838-11ef-ad90-803c75063fc8}

nx OptIn

bootmenupolicy Standard

NB: In the process I noticed I'm actually on windows 11, trying to recover original window 10 volume, from windows 10 install usb... just in case that makes a diff...

The verbose info for the target windows 10 system partition:

F:>bcdedit /v /store f:\Boot\BCD

Windows Boot Manager


identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}

device partition=F:

description Windows Boot Manager

locale en-us

inherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}

default {9995fbb9-a7d1-11ef-adf9-a30311e0afe7}

resumeobject {9995fbb8-a7d1-11ef-adf9-a30311e0afe7}

displayorder {9995fbb9-a7d1-11ef-adf9-a30311e0afe7}

                    {9995fbba-a7d1-11ef-adf9-a30311e0afe7} 

toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d}

timeout 30

Windows Boot Loader


identifier {9995fbb9-a7d1-11ef-adf9-a30311e0afe7}

device unknown

path \Windows\system32\winload.exe

description Windows 10

locale en-us

inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}

allowedinmemorysettings 0x15000075

osdevice unknown

systemroot \Windows

resumeobject {9995fbb8-a7d1-11ef-adf9-a30311e0afe7}

nx OptIn

bootmenupolicy Standard

Windows Boot Loader


identifier {9995fbba-a7d1-11ef-adf9-a30311e0afe7}

device vhd=[I:]\win11.vhdx,locate=custom:12000002

path \Windows\system32\winload.exe

description new

locale en-us

inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}

allowedinmemorysettings 0x15000075

osdevice vhd=[I:]\win11.vhdx,locate=custom:22000002

systemroot \Windows

resumeobject {9995fbb8-a7d1-11ef-adf9-a30311e0afe7}

nx OptIn

bootmenupolicy Standard

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-12-13T09:44:54+00:00

    Hi, JonnyHotchkiss.

    Thank you for posting in the Microsoft Community.

    From your description, I understand that you want to make Windows on the original hard drive bootable again, the system has been severely damaged and there is no recovery partition, and you have tried the bootsec and bootrec commands. I understand your confusion about this problem.

    Bootrec is mainly used to repair boot records, boot files, and rebuild boot configuration data, while bootsec is mainly used to repair boot sectors or master boot records and repair UEFI boot problems.

    In Windows, you can confirm the partition style of the hard drive through the Disk Management tool:

    1. Press Win + X, then select Disk Management.
    2. Find your system drive (usually C drive), right-click it and select Properties.
    3. Go to the Volume tab and check the Partition Style:
    • If you see GPT, it means the hard drive is a GPT partition and the system should be in UEFI mode.
    • If you see MBR, it means the hard drive is an MBR partition and the system should be in BIOS mode.

    Your current BIOS settings have Legacy boot enabled and Secure Boot disabled, which means that you boot your system based on BIOS/MBR boot mode. You mentioned that Windows Boot Manager (UEFI) seems to load Windows 11 through vhd (virtual hard disk), which may mean that your system or some partitions have used UEFI mode (such as Windows Boot Manager itself).

    The convert gpt command you mentioned is used to convert an MBR disk to a GPT disk. Indeed, this command will erase the entire disk, so it is destructive. Before executing convert gpt, make sure you have backed up the data on the disk because the command will delete all partitions on the disk.

    You should set the startup disk to Yes in the following situations:

    • When installing or restoring the operating system, select the partition containing the boot files as the startup disk.
    • When changing the operating system boot order, select the disk or partition you want to boot the operating system as the default.
    • When repairing boot problems, make sure the partition containing the boot files is marked as the startup disk.

    You mentioned that you accidentally turned the disk into a dynamic disk when trying to add a simple volume through Disk Management. Dynamic disks can cause some problems, especially when booting configuration and recovering the operating system, and it is usually recommended to use a basic disk. I am glad to hear that you restored it to a basic disk state through the Aomei tool.

    You mentioned that you tried bootsect /nt60 but received "Access Denied" and "Volume Locked" error messages. This problem usually occurs when:

    You are not running the command prompt with administrator privileges. Make sure to start the command prompt with administrator privileges (right-click "Command Prompt" and select "Run as Administrator").

    The partition may be occupied by the operating system or other programs, preventing bootsect from modifying the boot record. In this case, restarting the computer and entering Windows PE or Recovery Environment and then running bootsect from there can usually avoid this problem.

    In addition to this, you can also try an in-place upgrade. If the in-place upgrade does not solve your problem, you can reinstall the Windows operating system using USB media and try to reference the virtual hard disk again.

    Windows in-place upgrade - Configuration Manager | Microsoft Learn

    Download Windows 11

    Disclaimer: Please back up your relevant data before reinstalling the Windows system.

    We look forward to hearing from you!

    Best Regards.

    Capoo - MSFT | Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-12-10T18:55:38+00:00

    Latest progress report: Earlier I noticed another factor, I'd inadvertently made the disk dynamic, perhaps by trying to add a simple volume via diskmgmt. Fixed this with Aomei, back to a basic disk type, albeit with a logical volume

    Also after further reading I noticed that one of the boot entries in the store on the F: partition of the BIOS/MBR/Non-GPT disk was invalid, referring to a vhd volume on another disk. After removing this the boot error message changes from winload.exe to a less detailed message.

    I also tried the bootsect /nt60 with /mbr and even /force, but although it mentioned success it also said access was denied as the volume is locked- I'll retry from the bootable media in case different, and update with specific messages and results.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-12-10T12:17:44+00:00

    I've restarted and checked BIOS and see SecureBoot Disabled, and Legacy Enabled, which appears to allow support for BIOS/MBR.

    From the BIOS Boot Menu it seems the Windows Boot Manager (UEFI) loads the windows11 from vhd; whilst reviewing the sample script to recreate the EFI partition (I need disk1, not disk0) I noticed the convert gpt command, which I think I'd tried before only to discover it was destructive and would wipe the disk... so wonder if that means I must be using the MBR BIOS on that disk?! 🤔🤷🏻⁉️

    NB: I have aomei partition assistant, which may allow for disk conversion without data loss (MBR to GPT) but don't recall if I've used it successfully - usually my attempts to rearrange partitions with this fail with varying degrees of spectacularity / spectacularness... red squiggles! I digress!!

    https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?view=windows-11&preserve-view=true#createpartitions-uefitxt

    Image

    Next tests: BIOS / legacy boot attempts, system partition and bcdboot entry recreation.. 🤞🏻

    UPDATE!

    I just noticed the answer to "which disk type" via diskpart list disk

    Currently at least the new SSD volume with VHD boot entries is on a GPT disk (0), and the original unbootable windows 10 volume is on non-GPT (MBR).

    //not sure if disk details has anything noteworthy here; wondering when the boot disk should be yes...

    DISKPART> deta dis

    SanDisk SD8SN8U-128G-1006

    Disk ID: 86560827

    Type : SATA

    Status : Online

    Path : 2

    Target : 0

    LUN ID : 0

    Location Path : PCIROOT(0)#PCI(1700)#ATA(C02T00L00)

    Current Read-only State : No

    Read-only : No

    Boot Disk : No

    Pagefile Disk : Yes

    Hibernation File Disk : No

    Crashdump Disk : No

    Clustered Disk : No

    Volume ### Ltr Label Fs Type Size Status Info


    Volume 0 F NTFS Simple 115 MB Healthy

    Volume 1 D Windows NTFS Simple 60 GB Healthy Pagefile

    DISKPART> lis dis

    Disk ### Status Size Free Dyn Gpt


    Disk 0 Online 931 GB 675 GB *

    * Disk 1 Online 119 GB 59 GB *

    Disk 2 Online 14 GB 0 B

    Disk 3 Online 35 GB 0 B *

    Disk 4 Online 50 GB 1024 KB

    To the Legacy mobile!

    Was this answer helpful?

    0 comments No comments