Repair HyperV Machine Boot (VHDX)

Page 2 of 4 FirstFirst 1234 LastLast

  1. Posts : 913
    CP/M
       #11

    Davichin
    What you can try (not tested, not guarenteed):

    Always backup the whole VM first.
    - create similar VM, install LTSC
    - using Reflect, take an image of system reserved partition only
    - in broken VM, restore that partition
    - try to use bootrec if it finds win installation, then rebuildbcd
    - try if macrium can repair bcd store
    or
    - add new vdisk into VM as second disk
    - install second LTSC on it (beware not to overwrite existing win partition on 1st disk), it should create system reserved partition on first disk; if not see below
    - use EasyBCD to add startup entry for old installation (now you already can live with both disks/installations)
    - if needed (bcd on 2nd disk) copy system reserved partition from 2nd to 1st disk using Reflect
    - remove second vdisk
    or
    - last chance is to edit bcd manually using bcdedit, system reserved partition can be taken & restored from any other system.
    Last edited by muchomurka; 10 Apr 2020 at 19:53.
      My Computer


  2. Posts : 913
    CP/M
       #12

    Kari
    Are you really speaking about rescueing existing OS installation (by re-creating missing system reserved partition and boot loader inside)? Then please describe the mechanism how it works which is unclear & not working on physical hardware and in other hypervisors.
    Are you speaking about an fresh install - all the configuration, updates, user accounts, programs etc lost?. If this is the case then please re-read 1st post several times, again and again, there is a chance you understand it.
    Thanks again.
      My Computer


  3. Posts : 18,433
    Windows 11 Pro
       #13

    @Kari,

    Does creating a new VM with an existing .vhdx file recreate the system partition on the virtual hard drive?
      My Computer


  4. Posts : 913
    CP/M
       #14

    Davichin
    In the morning I feel my suggestions were a bit over-complicated; the easiest way should be:
    - add second vhdx into the same virtual machine
    - install win10 on it using ltsc iso
    - add bootmenu entry for rescued system using easybcd.
    Other steps are unnecessary.
      My Computer


  5. Posts : 18,433
    Windows 11 Pro
       #15

    muchomurka said:
    Davichin
    In the morning I feel my suggestions were a bit over-complicated; the easiest way should be:
    - add second vhdx into the same virtual machine
    - install win10 on it using ltsc iso
    - add bootmenu entry for rescued system using easybcd.
    Other steps are unnecessary.
    But then you have two full installs of Windows in the same VM and all you are using the second install of Windows for is a boot menu entry to boot the first install.

    It would take less than 5 minutes just to recreate a System partition on the existing vhdx drive.
      My Computer


  6. Posts : 913
    CP/M
       #16

    Who cares if original installation works but if you really want - optional steps:
    - delete boot entry for new installation
    - delete corresponding partitions (except EFI of course)
    - shrink second vhdx.

    It would take less than 5 minutes just to recreate a System partition on the existing vhdx drive.
    I do not know simpler way to re-create efi partition with bcd store which will work with rescued system, maybe someone else.
    Last edited by muchomurka; 10 Apr 2020 at 23:34.
      My Computer


  7. Posts : 11,247
    Windows / Linux : Arch Linux
       #17

    muchomurka said:
    Who cares if original installation works but if you really want - optional steps:
    - delete boot entry for new installation
    - delete corresponding partitions (except EFI of course)
    - shrink second vhdx.


    I do not know simpler way to re-create efi partition with bcd store which will work with rescued system, maybe someone else.
    1) dd just the efi partition to target drive if the data still exists
    2) libguestfs can do things with nearly all formats of VM's -- doesn't depend on any specific HOST (or Guest) file system.

    However depending on the complexity of the VM and the hardware it's being run on it's probably quicker simply to create a new VM --these days with decent hardware and SSD's re-installing Windows isn't such a tedious chore as it used to be --of course if you have a lot of old software with license keys etc plus need their updates to install as well --and even then some of those companies might not even exist any more then another issue.

    Cheers
    jimbo
      My Computer


  8. Posts : 17,661
    Windows 10 Pro
       #18

    NavyLCDR said:
    @Kari,

    Does creating a new VM with an existing .vhdx file recreate the system partition on the virtual hard drive?
    MBR formatted VHD does not need any, for GPT formatted VHD EFI partition must be manually created.

    I've now added this edit to my post:

    EDIT 11-APR-2020

    The above only works with Generation 1 VM and an MBR virtual hard disk. Because it has no System Reserved partition, the Windows partition C; must be set active.

    If the virtual hard disk is GPT formatted from Generation 2 VM, EFI partition must be created before it can be used on a new VM.
    Kari
      My Computer


  9. Posts : 8
    Windows 10 Pro
    Thread Starter
       #19

    muchomurka said:
    Who cares if original installation works but if you really want - optional steps:
    - delete boot entry for new installation
    - delete corresponding partitions (except EFI of course)
    - shrink second vhdx.


    I do not know simpler way to re-create efi partition with bcd store which will work with rescued system, maybe someone else.
    Hola a todos. Muchas gracias por todas las respuestas y por intentar ayudarme. Muchas gracias.
    He probado varias cosas... el resumen es el siguiente.
    Estoy con una maquina virtual HyperV de generacion 2.
    Archivo de Disco VHDX y GPT.
    Ya no existe la particion EFI de arranque .
    - Creo una maquina virtual nueva eligiendo como disco duro el que yo tengo pero al no tener la partición de arranque no funciona .
    - Creo un maquina virtual con la misma versión de sistema operativo y cuando esta funcional sustituyo el disco vhdx... tampoco funciona

    Now I am going to try this ... although I have never used the EasyBCD.

    - - - Updated - - -

    jimbo45 said:
    1) dd just the efi partition to target drive if the data still exists
    2) libguestfs can do things with nearly all formats of VM's -- doesn't depend on any specific HOST (or Guest) file system.

    However depending on the complexity of the VM and the hardware it's being run on it's probably quicker simply to create a new VM --these days with decent hardware and SSD's re-installing Windows isn't such a tedious chore as it used to be --of course if you have a lot of old software with license keys etc plus need their updates to install as well --and even then some of those companies might not even exist any more then another issue.

    Cheers
    jimbo
    Hi. I did not understand what you meant, but I think you mean what it would be to re-create the boot partition with "libguestfs" although I don't know how to do it.
    I have also tried booting with the Windows installation CD to see if it recognizes the installation but when the partition is missing it does not recognize that there is a windows installation and the boot cannot be repaired.
      My Computer


  10. Posts : 913
    CP/M
       #20

    Hello Davichin
    (reading done using Google Translator)
    No need to play with new VMs, just follow three steps in post #14, new Windows installation will create missing EFI partition with boot loader, EasyBCD then adds path to your old installation to boot menu. Backup your VM first!
    Last edited by muchomurka; 11 Apr 2020 at 09:10.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:13.
Find Us




Windows 10 Forums