Boot manager on drive A suddenly points to drive B?

Discussion in 'SSD and HDD storage' started by AsiJu, Jul 24, 2020.

  1. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    Something really strange happened.

    To begin I have a Crucial SSD (SATA) and an Intel SSD (NVME).
    Both drives have Windows 10 installed. Windows was originally cloned from Crucial to Intel.

    Intel drive has the Windows installation in use, Crucial was only kept as backup / failsafe.

    So, I was away for two days so left PC unplugged and swapped the CMOS battery.

    When I started the PC I got an error about missing boot device.
    Checking BIOS I saw that Windows Boot Manager (Intel ...) had disappeared, only Windows Boot Manager (Crucial ...) was available.

    Both options were available before, naturally, and I used Intel option to boot.

    Being unable to boot I used USB install media to get into Windows setup.
    I saw that indeed there wasn't an EFI partition on Intel drive, only main data partition and a 16 MB MSR partition.

    Not being sure what had happened I started to clean install Windows on Intel drive, erasing both existing partitions.

    Install started and progressed up to the point of first reboot.
    Again got an error "no boot device" and still no boot manager option for Intel drive.

    Retried installing, same story.

    I spent the next minutes resting my head on my hands trying to grasp the frack had just happened and happening.

    As a last resort decided to boot to Crucial drive and try diagnosing the Intel drive via that.
    So selected Windows Boot Manager (Crucial) to boot from and...

    Windows install I started earlier resumed from Intel drive!

    I now have Windows reinstalled and running on the Intel drive but somehow the boot manager of Intel drive disappeared while PC was unplugged and now the boot manager on Crucial drive actually boots the Intel drive!

    How the hell can something like this happen while PC is unplugged?
    How can a boot manager from disk A disappear and boot manager from disk B "replaces" it?

    Why didn't Windows setup recreate the boot manager / EFI partition on Intel drive?


    Smart thing to do next would be to unplug Crucial drive and re-reinstall on Intel to "force" boot manager on correct drive but tbh I'm afraid to touch the disks at this point.

    In short what the hell just happened?
     
  2. mbk1969

    mbk1969 Ancient Guru

    Messages:
    14,147
    Likes Received:
    12,338
    GPU:
    GF RTX 4070
    It is a consensus to remove secondary drives while installing Windows.

    SATA ports are numbered and most probably ordered from Windows point of view, so most probably primary drive better be connected to primary SATA port (#0).
     
  3. zipper

    zipper Maha Guru

    Messages:
    1,199
    Likes Received:
    223
    GPU:
    GTX 680M
    One of my installs (cloned drive) didn't want to boot before I removed the source drive. After one succesful boot adding the drive back didn't cause any problems anymore.
     
  4. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    Yes but none of that explains why the og. boot manager disappeared.

    Do NVME drives rely on power supply or CMOS battery for data retainment?
     

  5. Astyanax

    Astyanax Ancient Guru

    Messages:
    15,745
    Likes Received:
    6,561
    GPU:
    GTX 1080ti
    nvme's rely on electron gates in the nand cells, hence why one common data loss reason is due to a defect in the gate letting electrons escape prematurely.
     
  6. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    Doubt that would neatly erase 2 partitions (EFI+recovery) and leave others intact.

    Besides I hadn't any errors or issues with the drive earlier.

    Though at this point I'll believe almost anything... you'd think an unplugged PC will retain its state.

    I'd just like to know for sure what happened and why.
     
  7. 386SX

    386SX Ancient Guru

    Messages:
    1,922
    Likes Received:
    2,097
    GPU:
    AMD Vega64 RedDevil
    After reading the title I thought "Who the hell still uses 3.5 and 5.25 inch floppy disk drives in 2020??!!" :D

    One of these moments, you know? ;)

    The reinstall did detect an active primary partition and added itself to its boot loader I would guess.

    What settings and what program did you use to clone the disks? Did you include ALL partitions?
    Did you encounter some "Windows repair screen" of some kind during cloning? That would be an indicator for something having changed in the background.

    Good luck. ;)
     
    AsiJu likes this.
  8. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    Heh, I thought about floppy drives as well when typing that :)

    I used Minitool Partition Wizard to clone and cloned all partitions (entire disk).
    Used the "Migrate OS" function.

    No errors during or after cloning and Windows booted fine from new drive first time without repair screen.
    (And old disk booted fine still too).

    I've also clean installed on new drive once since.

    I'm guessing what happened is a combination of all these:

    - new disk was (originally) a clone of old disk
    - Windows was installed on both drives still
    - CMOS battery replaced during PC being off for about 72 hours
    - exact combination of hardware and software used and Windows builds on drives being different

    I still don't understand how the boot manager disappeared from Intel drive though.

    The EFI partition was perhaps never there in the first place since first clean install, not sure.
    Meaning boot loader of old drive was used already then. Still, got both drives bootable up until now.

    Yes, additionally this means I cannot boot to old drive anymore as Crucial will actually boot Intel.
     
    Last edited: Jul 27, 2020
    386SX likes this.
  9. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    One more question for the more knowledgeable about these things:

    if I now remove the Crucial drive - which should again make the system unbootable, unless it actually does something else like randomly spawn a group of pink elves - is there a way to repair the installation on Intel drive?

    Ie. recreate the boot manager on Intel disk?

    I could manually clone the EFI and Recovery partitions from Crucial to Intel and then remove the Crucial drive but I'm afraid that might cause a singularity in the time-space continuum...

    Also I'll now summon the Windows Master @Extraordinary

    any ideas?
     
  10. mbk1969

    mbk1969 Ancient Guru

    Messages:
    14,147
    Likes Received:
    12,338
    GPU:
    GF RTX 4070
    Most probably you have to fix BCD after cloning those partitions needed for boot.
     

  11. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    How does one do that? Also thanks for trying to help.
     
  12. mbk1969

    mbk1969 Ancient Guru

    Messages:
    14,147
    Likes Received:
    12,338
    GPU:
    GF RTX 4070
    Last edited: Jul 28, 2020
  13. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    Right, is the HarddiskVolume# the disk ID of the disk used to boot?

    Meaning if Crucial is say disk 1 and Intel is disk 2 I need to change that from 1 to 2?
    Or does that actually point to a particular partition?

    What is the appropriate syntax for changing that value or querying the volume id?

    I'm not at all familiar with bcdedit.

    Edit: ah saw you added a link, much appreciated.

    Think I have all the info I need for now, going to try it.
     
    Last edited: Jul 28, 2020
  14. mbk1969

    mbk1969 Ancient Guru

    Messages:
    14,147
    Likes Received:
    12,338
    GPU:
    GF RTX 4070
    There is no simple way to map a partition to "HarddiskVolume#" format. So the page from MS (I linked) gives advise to assign the EFI boot partition a letter and then set "Bcdedit /set {bootmgr} device partition=<letter>://" with assigned letter (instead of <letter>).
     
  15. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    Yeah read that, I'll use diskpart command to identify correct volume first and assign a letter if missing.

    Funny though that I don't think Windows even assigns a letter to EFI partition by default...
    Install (UEFI) creates 4 partitions, EFI, MSR, Recovery and the main partition where Windows is installed.
    Only main partition has a drive letter by default I think.
     

  16. mbk1969

    mbk1969 Ancient Guru

    Messages:
    14,147
    Likes Received:
    12,338
    GPU:
    GF RTX 4070
    Before you mess with BCD though, lets look at it closely. Execute in elevated command prompt "bcdedit /enum all > c:\temp\bcd_all.txt" and paste that "c:\temp\bcd_all.txt" here between code tags (and then between spoiler tags if file is too long).
     
  17. mbk1969

    mbk1969 Ancient Guru

    Messages:
    14,147
    Likes Received:
    12,338
    GPU:
    GF RTX 4070
  18. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    I'll do that once I actually have time to tinker with the PC, probably over the weekend.
     
  19. AsiJu

    AsiJu Ancient Guru

    Messages:
    8,368
    Likes Received:
    3,050
    GPU:
    MSI RX6800XT G.XT.
    Managed some PC time so here goes as requested:
    @mbk1969

    Code:
    
    Firmware Boot Manager
    ---------------------
    identifier              {fwbootmgr}
    displayorder            {bootmgr}
                            {f04f5518-c466-11ea-8cea-806e6f6e6963}
                            {f04f5517-c466-11ea-8cea-806e6f6e6963}
    timeout                 2
    
    Windows Boot Manager
    --------------------
    identifier              {bootmgr}
    device                  partition=\Device\HarddiskVolume5
    path                    \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
    description             Windows Boot Manager
    locale                  fi-FI
    inherit                 {globalsettings}
    default                 {current}
    resumeobject            {a9b0c0db-269b-11ea-b9f0-fd95bc072250}
    displayorder            {current}
    toolsdisplayorder       {memdiag}
    timeout                 3
    
    Firmware Application (101fffff)
    -------------------------------
    identifier              {f04f5517-c466-11ea-8cea-806e6f6e6963}
    description             Hard Drive
    
    Firmware Application (101fffff)
    -------------------------------
    identifier              {f04f5518-c466-11ea-8cea-806e6f6e6963}
    description             CD/DVD Drive
    
    Windows Boot Loader
    -------------------
    identifier              {357f633c-4d45-11e8-8ca0-ebe1514788ea}
    device                  partition=E:
    path                    \WINDOWS\system32\winload.efi
    description             Windows 10
    locale                  fi-FI
    inherit                 {bootloadersettings}
    recoverysequence        {357f633e-4d45-11e8-8ca0-ebe1514788ea}
    displaymessageoverride  Recovery
    recoveryenabled         Yes
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    osdevice                partition=E:
    systemroot              \WINDOWS
    resumeobject            {357f633b-4d45-11e8-8ca0-ebe1514788ea}
    nx                      OptIn
    bootmenupolicy          Standard
    
    Windows Boot Loader
    -------------------
    identifier              {357f633e-4d45-11e8-8ca0-ebe1514788ea}
    device                  ramdisk=[\Device\HarddiskVolume4]\Recovery\WindowsRE\Winre.wim,{357f633f-4d45-11e8-8ca0-ebe1514788ea}
    path                    \windows\system32\winload.efi
    description             Windows Recovery Environment
    locale                  fi-FI
    inherit                 {bootloadersettings}
    displaymessage          Recovery
    osdevice                ramdisk=[\Device\HarddiskVolume4]\Recovery\WindowsRE\Winre.wim,{357f633f-4d45-11e8-8ca0-ebe1514788ea}
    systemroot              \windows
    nx                      OptIn
    bootmenupolicy          Standard
    winpe                   Yes
    
    Windows Boot Loader
    -------------------
    identifier              {current}
    device                  partition=C:
    path                    \Windows\system32\winload.efi
    description             Windows 10
    locale                  fi-FI
    inherit                 {bootloadersettings}
    recoverysequence        {a9b0c0dd-269b-11ea-b9f0-fd95bc072250}
    displaymessageoverride  Recovery
    recoveryenabled         Yes
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    osdevice                partition=C:
    systemroot              \Windows
    resumeobject            {a9b0c0db-269b-11ea-b9f0-fd95bc072250}
    nx                      OptIn
    bootmenupolicy          Standard
    
    Windows Boot Loader
    -------------------
    identifier              {a9b0c0dd-269b-11ea-b9f0-fd95bc072250}
    device                  ramdisk=[C:]\Recovery\WindowsRE\Winre.wim,{a9b0c0de-269b-11ea-b9f0-fd95bc072250}
    path                    \windows\system32\winload.efi
    description             Windows Recovery Environment
    locale                  fi-fi
    inherit                 {bootloadersettings}
    displaymessage          Recovery
    osdevice                ramdisk=[C:]\Recovery\WindowsRE\Winre.wim,{a9b0c0de-269b-11ea-b9f0-fd95bc072250}
    systemroot              \windows
    nx                      OptIn
    bootmenupolicy          Standard
    winpe                   Yes
    
    Windows Boot Loader
    -------------------
    identifier              {dbcfa084-c4fa-11ea-a858-ebcf5c48de53}
    device                  ramdisk=[unknown]\Recovery\WindowsRE\Winre.wim,{dbcfa085-c4fa-11ea-a858-ebcf5c48de53}
    path                    \windows\system32\winload.efi
    description             Windows Recovery Environment
    locale                  fi-fi
    inherit                 {bootloadersettings}
    displaymessage          Recovery
    osdevice                ramdisk=[unknown]\Recovery\WindowsRE\Winre.wim,{dbcfa085-c4fa-11ea-a858-ebcf5c48de53}
    systemroot              \windows
    nx                      OptIn
    bootmenupolicy          Standard
    winpe                   Yes
    
    Resume from Hibernate
    ---------------------
    identifier              {357f633b-4d45-11e8-8ca0-ebe1514788ea}
    device                  partition=E:
    path                    \WINDOWS\system32\winresume.efi
    description             Windows Resume Application
    locale                  fi-FI
    inherit                 {resumeloadersettings}
    recoverysequence        {357f633e-4d45-11e8-8ca0-ebe1514788ea}
    recoveryenabled         Yes
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    filedevice              partition=E:
    filepath                \hiberfil.sys
    bootmenupolicy          Standard
    debugoptionenabled      No
    
    Resume from Hibernate
    ---------------------
    identifier              {a9b0c0db-269b-11ea-b9f0-fd95bc072250}
    device                  partition=C:
    path                    \Windows\system32\winresume.efi
    description             Windows Resume Application
    locale                  fi-FI
    inherit                 {resumeloadersettings}
    recoverysequence        {a9b0c0dd-269b-11ea-b9f0-fd95bc072250}
    recoveryenabled         Yes
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    filedevice              partition=C:
    filepath                \hiberfil.sys
    bootmenupolicy          Standard
    debugoptionenabled      No
    
    Windows Memory Tester
    ---------------------
    identifier              {memdiag}
    device                  partition=\Device\HarddiskVolume5
    path                    \EFI\Microsoft\Boot\memtest.efi
    description             Windowsin muistidiagnostiikka
    locale                  fi-FI
    inherit                 {globalsettings}
    badmemoryaccess         Yes
    
    EMS Settings
    ------------
    identifier              {emssettings}
    bootems                 No
    
    Debugger Settings
    -----------------
    identifier              {dbgsettings}
    debugtype               Local
    
    RAM Defects
    -----------
    identifier              {badmemory}
    
    Global Settings
    ---------------
    identifier              {globalsettings}
    inherit                 {dbgsettings}
                            {emssettings}
                            {badmemory}
    
    Boot Loader Settings
    --------------------
    identifier              {bootloadersettings}
    inherit                 {globalsettings}
                            {hypervisorsettings}
    
    Hypervisor Settings
    -------------------
    identifier              {hypervisorsettings}
    hypervisordebugtype     Serial
    hypervisordebugport     1
    hypervisorbaudrate      115200
    
    Resume Loader Settings
    ----------------------
    identifier              {resumeloadersettings}
    inherit                 {globalsettings}
    
    Device options
    --------------
    identifier              {357f633f-4d45-11e8-8ca0-ebe1514788ea}
    description             Windows Recovery
    ramdisksdidevice        partition=\Device\HarddiskVolume4
    ramdisksdipath          \Recovery\WindowsRE\boot.sdi
    
    Device options
    --------------
    identifier              {a9b0c0de-269b-11ea-b9f0-fd95bc072250}
    description             Windows Recovery
    ramdisksdidevice        partition=C:
    ramdisksdipath          \Recovery\WindowsRE\boot.sdi
    
    

    Code:
    
    Windows Boot Manager
    --------------------
    identifier              {bootmgr}
    device                  partition=\Device\HarddiskVolume5
    path                    \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
    description             Windows Boot Manager
    locale                  fi-FI
    inherit                 {globalsettings}
    default                 {current}
    resumeobject            {a9b0c0db-269b-11ea-b9f0-fd95bc072250}
    displayorder            {current}
    toolsdisplayorder       {memdiag}
    timeout                 3
    
    Windows Boot Loader
    -------------------
    identifier              {current}
    device                  partition=C:
    path                    \Windows\system32\winload.efi
    description             Windows 10
    locale                  fi-FI
    inherit                 {bootloadersettings}
    recoverysequence        {a9b0c0dd-269b-11ea-b9f0-fd95bc072250}
    displaymessageoverride  Recovery
    recoveryenabled         Yes
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    osdevice                partition=C:
    systemroot              \Windows
    resumeobject            {a9b0c0db-269b-11ea-b9f0-fd95bc072250}
    nx                      OptIn
    bootmenupolicy          Standard
    

    HarddiskVolume 5 appears to be the C:\ drive of Intel disk:
    listvolume.png

    E:\ drive is the other Windows installation on Crucial disk. (Volume 3)
    D:\ is a mechanical harddrive (Volume 1)
    G:\ is Blu-Ray drive (Volume 0)

    Volume 4 is EFI partition on Crucial, note: no drive letter
    Volume 2 is Recovery partition on Crucial

    listpart_disk_1_Crucial.png

    listpart_disk_2_Intel.png
     
    Last edited: Jul 29, 2020
  20. mbk1969

    mbk1969 Ancient Guru

    Messages:
    14,147
    Likes Received:
    12,338
    GPU:
    GF RTX 4070
    @AsiJu

    I see some duplicated entries in enum all output. If you are not planning to boot from second drive they can be removed.
     

Share This Page