Results 1 to 7 of 7

Thread: Anyone a bit of a BCD expert?

  1. #1

    Anyone a bit of a BCD expert?

    Short version:
    I need to edit the partition number of the boot manager as it seems to point to a non existent hard drive.
    In old MBR speak, I want to set the right drive active and edit the boot.ini to match. But under uefi bcd.

    Long version:
    Frequent crashing lead to to try and reset my win 10 install on the weekend. After multiple attempts that went nowhere, I created a USB boot stick with the win 10 media tool and set about the install.
    Which also had issues because of partition ordering problems.
    I ended up deleting the boot/system partitions on the m2 drive figuring windows would figure it out...
    But each time it boots it seems to want to go to a partition 3 and fails. The only way I can boot is to boot off the USB, and go to repair. Then the boot menu has "exit and boot win 10 on partition 4" which is successful.

    I've poked around with easybcd and visual bad and it looks like the successful boot is reading the bcd from a hard-drive 10. But that doesn't exit when I look under the driveletters tool. There's a 9 and there's a 12 (and others) but no 10 (nor 11).

    I also see many windows boot managers when I hit the uefi boot menu on start up.
    If this was mbr, I could just edit the boot.ini on each partition and add multiple options to try different drives and partitions. And then once I work out which one is correct, delete the other entries.
    But easybcd etc only seem to let me pick "drive letter c" and so on. Which doesn't work because it seems to be saving to an invalid store (accessible when booting to repair via USB rather than booting from one of the drives). Grr.

    Push comes to shove I'll create another partition on the drive, disconnect the data drives and try another install on the weekend. But if anyone can help me get into the guts of the bcd and clean it right up, appreciated.

  2. #2
    I'm no expert but something to try

    My bcdedit output is :

    C:\WINDOWS\system32>bcdedit

    Windows Boot Manager
    --------------------
    identifier {bootmgr}
    device partition=\Device\HarddiskVolume2
    path \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
    description Windows Boot Manager
    locale en-GB
    inherit {globalsettings}
    default {current}
    resumeobject {8468137e-6a96-11e8-a6fc-d5c5c63eca49}
    displayorder {current}
    toolsdisplayorder {memdiag}
    timeout 30

    Windows Boot Loader
    -------------------
    identifier {current}
    device partition=C:
    path \WINDOWS\system32\winload.efi
    description Windows 10
    locale en-GB
    inherit {bootloadersettings}
    recoverysequence {84681380-6a96-11e8-a6fc-d5c5c63eca49}
    displaymessageoverride Recovery
    recoveryenabled Yes
    isolatedcontext Yes
    allowedinmemorysettings 0x15000075
    osdevice partition=C:
    systemroot \WINDOWS
    resumeobject {8468137e-6a96-11e8-a6fc-d5c5c63eca49}
    nx OptIn
    bootmenupolicy Standard

    The path to my UEFI boot being \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI on partition=\Device\HarddiskVolume2 , to find what \Device\HarddiskVolume2 translates to used winobj from sysinternals as per https://www.mysysadmintips.com/windo...harddiskvolume .

    For me it translates to HardDisk 2 Partition 2

    That is my 100MB Boot partition:

    C:\WINDOWS\system32>diskpart

    Microsoft DiskPart version 10.0.17134.1

    Copyright (C) Microsoft Corporation.
    On computer: xxxxxxxxxx

    DISKPART> list disk

    Disk ### Status Size Free Dyn Gpt
    -------- ------------- ------- ------- --- ---
    Disk 0 Online 931 GB 0 B *
    Disk 1 Online 1863 GB 1024 KB *
    Disk 2 Online 476 GB 0 B *
    Disk 3 Online 931 GB 1024 KB

    DISKPART> select disk 2

    Disk 2 is now the selected disk.

    DISKPART> list partition

    Partition ### Type Size Offset
    ------------- ---------------- ------- -------
    Partition 1 Recovery 450 MB 1024 KB
    Partition 2 System 100 MB 451 MB <-----
    Partition 3 Reserved 16 MB 551 MB
    Partition 4 Primary 476 GB 567 MB

    So In theory you should be able to find and select your UEFI Volume:

    DISKPART> list volume

    Volume ### Ltr Label Fs Type Size Status Info
    ---------- --- ----------- ----- ---------- ------- --------- --------
    Volume 0 H DVD-ROM 0 B No Media
    Volume 1 D xxxxxx NTFS Partition 931 GB Healthy
    Volume 2 E xxxxxx NTFS Partition 1862 GB Healthy
    Volume 3 NTFS Partition 450 MB Healthy
    Volume 4 C NTFS Partition 476 GB Healthy Boot
    Volume 5 FAT32 Partition 100 MB Healthy System <------
    Volume 6 F xxxxxx NTFS Partition 292 GB Healthy
    Volume 7 G xxxxxx NTFS Partition 638 GB Healthy

    Select volume 5

    assign it a letter so you can refer to it:

    assign letter=s

    set the device element :

    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {bootmgr} device partition=s:// system partition

    and path:

    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {bootmgr} path \efi\microsoft\boot\bootmgfw.efi

    And assuming your windows partition has been assigned c: (change as appropriate if not)

    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {default} device partition=c:
    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {default} osdevice partition=c:

    the /store S:\EFI\Microsoft\Boot\BCD parameter points the changes to the HardDisk BCD store as opposed to the USB one you booted off for the repair.

  3. #3
    Originally Posted by disorganise View Post (Source)
    Short version:
    I need to edit the partition number of the boot manager as it seems to point to a non existent hard drive.
    In old MBR speak, I want to set the right drive active and edit the boot.ini to match. But under uefi bcd.

    Long version:
    Frequent crashing lead to to try and reset my win 10 install on the weekend. After multiple attempts that went nowhere, I created a USB boot stick with the win 10 media tool and set about the install.
    Which also had issues because of partition ordering problems.
    I ended up deleting the boot/system partitions on the m2 drive figuring windows would figure it out...
    But each time it boots it seems to want to go to a partition 3 and fails. The only way I can boot is to boot off the USB, and go to repair. Then the boot menu has "exit and boot win 10 on partition 4" which is successful.

    I've poked around with easybcd and visual bad and it looks like the successful boot is reading the bcd from a hard-drive 10. But that doesn't exit when I look under the driveletters tool. There's a 9 and there's a 12 (and others) but no 10 (nor 11).

    I also see many windows boot managers when I hit the uefi boot menu on start up.
    If this was mbr, I could just edit the boot.ini on each partition and add multiple options to try different drives and partitions. And then once I work out which one is correct, delete the other entries.
    But easybcd etc only seem to let me pick "drive letter c" and so on. Which doesn't work because it seems to be saving to an invalid store (accessible when booting to repair via USB rather than booting from one of the drives). Grr.

    Push comes to shove I'll create another partition on the drive, disconnect the data drives and try another install on the weekend. But if anyone can help me get into the guts of the bcd and clean it right up, appreciated.
    I work at a bcd club 3 times a year, it's both heaven and hell, not sure what that's got to do with our game however

  4. #4
    I'd just bite the bullet and secure erase the M2 drive, either from a compatible BIOS or a manufacturers support tool.

  5. #5
    Originally Posted by Asp Explorer View Post (Source)
    I'd just bite the bullet and secure erase the M2 drive, either from a compatible BIOS or a manufacturers support tool.
    This would be my suggestion as well.

    Another option is, as you mentioned, disconnect ALL drives except the one you want to install on, format and then install on that one. Then reconnect the other drives and use drive manager to set the drive letters the way you want.

  6. #6
    Originally Posted by GuruNot View Post (Source)
    I'm no expert but something to try

    My bcdedit output is :

    C:\WINDOWS\system32>bcdedit

    Windows Boot Manager
    --------------------
    identifier {bootmgr}
    device partition=\Device\HarddiskVolume2
    path \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
    description Windows Boot Manager
    locale en-GB
    inherit {globalsettings}
    default {current}
    resumeobject {8468137e-6a96-11e8-a6fc-d5c5c63eca49}
    displayorder {current}
    toolsdisplayorder {memdiag}
    timeout 30

    Windows Boot Loader
    -------------------
    identifier {current}
    device partition=C:
    path \WINDOWS\system32\winload.efi
    description Windows 10
    locale en-GB
    inherit {bootloadersettings}
    recoverysequence {84681380-6a96-11e8-a6fc-d5c5c63eca49}
    displaymessageoverride Recovery
    recoveryenabled Yes
    isolatedcontext Yes
    allowedinmemorysettings 0x15000075
    osdevice partition=C:
    systemroot \WINDOWS
    resumeobject {8468137e-6a96-11e8-a6fc-d5c5c63eca49}
    nx OptIn
    bootmenupolicy Standard

    The path to my UEFI boot being \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI on partition=\Device\HarddiskVolume2 , to find what \Device\HarddiskVolume2 translates to used winobj from sysinternals as per https://www.mysysadmintips.com/windo...harddiskvolume .

    For me it translates to HardDisk 2 Partition 2

    That is my 100MB Boot partition:

    C:\WINDOWS\system32>diskpart

    Microsoft DiskPart version 10.0.17134.1

    Copyright (C) Microsoft Corporation.
    On computer: xxxxxxxxxx

    DISKPART> list disk

    Disk ### Status Size Free Dyn Gpt
    -------- ------------- ------- ------- --- ---
    Disk 0 Online 931 GB 0 B *
    Disk 1 Online 1863 GB 1024 KB *
    Disk 2 Online 476 GB 0 B *
    Disk 3 Online 931 GB 1024 KB

    DISKPART> select disk 2

    Disk 2 is now the selected disk.

    DISKPART> list partition

    Partition ### Type Size Offset
    ------------- ---------------- ------- -------
    Partition 1 Recovery 450 MB 1024 KB
    Partition 2 System 100 MB 451 MB <-----
    Partition 3 Reserved 16 MB 551 MB
    Partition 4 Primary 476 GB 567 MB

    So In theory you should be able to find and select your UEFI Volume:

    DISKPART> list volume

    Volume ### Ltr Label Fs Type Size Status Info
    ---------- --- ----------- ----- ---------- ------- --------- --------
    Volume 0 H DVD-ROM 0 B No Media
    Volume 1 D xxxxxx NTFS Partition 931 GB Healthy
    Volume 2 E xxxxxx NTFS Partition 1862 GB Healthy
    Volume 3 NTFS Partition 450 MB Healthy
    Volume 4 C NTFS Partition 476 GB Healthy Boot
    Volume 5 FAT32 Partition 100 MB Healthy System <------
    Volume 6 F xxxxxx NTFS Partition 292 GB Healthy
    Volume 7 G xxxxxx NTFS Partition 638 GB Healthy

    Select volume 5

    assign it a letter so you can refer to it:

    assign letter=s

    set the device element :

    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {bootmgr} device partition=s:// system partition

    and path:

    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {bootmgr} path \efi\microsoft\boot\bootmgfw.efi

    And assuming your windows partition has been assigned c: (change as appropriate if not)

    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {default} device partition=c:
    Bcdedit /store S:\EFI\Microsoft\Boot\BCD /set {default} osdevice partition=c:

    the /store S:\EFI\Microsoft\Boot\BCD parameter points the changes to the HardDisk BCD store as opposed to the USB one you booted off for the repair.
    Dude!!!!!

    I ran through this twice.
    First time, on reboot it still gave the error screen (can't find bootmgfw.efi or similar) and shut down.
    I booted up pressing F8 and instead of choosing one the generic windows boot managers, I went for the one that is on the SSD (not the M2. When I built this PC it was with SSD, and then a few months back I bought an m2 NVMe).
    it booted up (yay)

    So I ran through again.....
    *This* time, the initial BCDEDIT command actually had an entry for device partition=\ which allowed me to actually use the winobj etc. (1st time I winged it just looking for the system vol).
    Now when I rebooted.....it took a few secs as if it was doing a double bootloader, but...it booted I can actually reboot without stuffing around with boot menus and repair menus.

    thank you soo much

  7. #7
    Originally Posted by disorganise View Post (Source)
    Dude!!!!!

    I ran through this twice.
    First time, on reboot it still gave the error screen (can't find bootmgfw.efi or similar) and shut down.
    I booted up pressing F8 and instead of choosing one the generic windows boot managers, I went for the one that is on the SSD (not the M2. When I built this PC it was with SSD, and then a few months back I bought an m2 NVMe).
    it booted up (yay)

    So I ran through again.....
    *This* time, the initial BCDEDIT command actually had an entry for device partition=\ which allowed me to actually use the winobj etc. (1st time I winged it just looking for the system vol).
    Now when I rebooted.....it took a few secs as if it was doing a double bootloader, but...it booted I can actually reboot without stuffing around with boot menus and repair menus.

    thank you soo much
    You are welcome.