How to get bootable VHD into BIOS boot menu?

Page 3 of 5 FirstFirst 12345 LastLast

  1. Posts : 13
    Windows 10
       #21

    cereberus said:
    Is it a vhd file or vhdx file?

    You can only native boot vhdx files in W10/11.
    Please note that in my humble experience and despite what Microsoft claims, one can boot under Windows 10 even a "simple" VHD file containing Window 10 itself or what one wants.

    tyeeman said:
    I want to simulate a C: failure, and then boot into the VHD. I was told by another friend that if C: fails, the Windows boot selection menu will not appear.
    Not true,
    although you didn't specify the exact meaning of "C: failure".
    If by "C: failure" you mean a "Windows" issue where it won't boot just because it can't load something like boot manager, winload, kernel, etc, then please note that the Boot Menu will appear, but first Windows will attempt to repair itself.
    https://learn.microsoft.com/en-us/tr...roubleshooting
    If windows fails the auto-repair then it will offer you a menu with various further options including something like "Choose another operating system", and if you click on it then the Boot Menu will appear and it will contain both your current Windows entry and your VHD entry, clicking on the latter it will boot your VHD.
    If "C: failure" means a diferent and more severe thing just like hardware failure and/or corrupt LBAs (i.e. partition table entries) in the GPT layout, then Boot Menu I'm afraid no longer would have the opportunity to be shown.

    tyeeman said:
    If I remove C, aren't they then gone?
    No, since both EFI and BCD files are located on ESP partition.
    tyeeman said:
    Yes, but the vhdx also has them?
    This is irrelevant since your VHD boots from the ESP partition (just as it was already reported to you before my replies) and in any case even if your VHD had them (and if the partition was MBR style it would certainly have them) it wouldn't boot from those because as repeatedly said your VHD instead boots from the ESP partition.

    tyeeman said:
    So the vhdx will not boot unless I create a system partition.
    Not true.
    The VHD can have a single Windows partition "only" and it will continue to boot just fine.
    In other words, a VHD does not need at all of an ESP partition on itself since it boots from the ESP partition on your disk from you have boot in order to see a Boot Menu, that's from boot files (EFI and BCD) existing on that ESP partition on your disk.

    tyeeman said:
    So how come the vhdx currently boots without a system partition on the disk it resides on?
    It seems to me there is a bit of confusion here since nothing can boot without an intact ESP partition, under any circumstances, unless you use another device suitable for that purpose.

    tyeeman said:
    Is the answer because it's stored on the C drive system partition currently.
    Please just read the reply above.

    tyeeman said:
    I have to create a system partition on the disk the vhdx resides on if the disk that c drive is on fails.
    It seems to me the same confusion here too, however you may have your VHD file even on your Windows partition, just as an extreme example, and if the alleged disk failure is not hardware or LBAs related then your VHD will boot, just because it boots from a healthy ESP partition.

    Hoping the above helps.
      My Computer


  2. Posts : 28
    win 10
    Thread Starter
       #22

    Thanks for the replies. Take a look at my disk management screenshot a few posts up. My VHD is on H:, when mounted the VHD is disk 4, E drive, which has an included ESP of it's own. I'm asking if Disk0, which includes C drive and the current ESP, if that Disk0 totally fails, then there is nothing available from it, will I still get a choice to boot the VHD from disk4 using it's own internal ESP?
      My Computer


  3. Posts : 4,598
    several
       #23

    tyeeman said:
    OK, that explains it and why I have to create a system partition on the disk the vhdx resides on if the disk that c drive is on fails. Thanks for your help. I'll let you know how it turns out.

    OK, I plan to use these commands

    diskpart
    list disk
    select disk 3 (or whatever it is)
    create partition EFI
    format quick fs=FAT32
    assign letter=A
    exit
    bcdboot E:\Windows /s A: /f UEFI

    Where E is my mounted VHD letter.
    I think it should work.

    - - - Updated - - -

    Since my H: is the one holding the VHD and it's already partitioned I've read I can use disk management to shrink it but it will shrink from the end of the volume. I believe the system partition I'm trying to create needs to be at the start of the volume. Hmm...how to do that?Attachment 408464

    - - - Updated - - -

    After more reading it looks like the efi system partition can reside anywhere says @NavyLCDR. I will try these commands (with my volume numbers) -

    diskpart
    select volume c
    shrink desired=100
    create part EFI
    format fs=fat32 quick
    assign letter=t
    exit
    bcdboot C:\Windows /s T: /f UEFI
    diskpart
    select vol t
    remove letter=t
    exit
    exit
    where are you up to now?

    how about a diskmgmt screenshot and bcdoutput of the new bcdstore
      My Computer


  4. Posts : 715
    WIN 10 19045.4291
       #24

    @tyeeman

    You are far away from being professional. Just look at the partition-layout of disk 0, what you call C-Drive.
    It's just horrible!

    When I loose my C-Partition it is completely recovered within 5 minutes. Even when I delete the C-Partition.
    How likely is it, that you loose the complete disk?

    It's good to have a a VHDX for troubleshooting the rest. My VHDX is just 90 GB and it gets updated every month automatically. In case the ESP get's corrupt or even deleted, it takes 3 minutes to create a new one.
      My Computer


  5. Posts : 13
    Windows 10
       #25

    tyeeman said:
    I'm asking if Disk0, which includes C drive and the current ESP, if that Disk0 totally fails, then there is nothing available from it, will I still get a choice to boot the VHD from disk4 using it's own internal ESP?
    Short answer: no.

    Long answer: I can see that you are passionate and that you want to learn and I like that.
    Let's proceed one step at a time.
    Between us, I don't see anything wrong with the layout of your Disk 0 other than the fact that it's just (unnecessarily) huge for a Windows installation, but you'll figure that out on your own in due time.

    Back to the topic, please note that I hadn't done it yet, but your genuine interest intrigued me and so after a few failed attempts I like that just managed to boot Windows 10 single partition GPT partition-style from "simple" VHD on 2nd disk with a single NTFS partition (in addition to ESP partition) with a .wim image applied to partition where VHD file is located in order to boot VHD from ESP partition on 2nd disk itself.
    I'm a little tired now, but if interested we'll talk about it again tomorrow for details.
    Cheers

    How to get bootable VHD into BIOS boot menu?-sshot.png


    By the way: why is your VHD file 200GB large?
      My Computer


  6. Posts : 28
    win 10
    Thread Starter
       #26

    Thanks for the "no" answer. Sorry for the wrong terminology earlier. When I said C drive failure I meant disk0 failure. I have to rearrange my PC desk to get access to the motherboard to try this. I'll try to do it tonight.

    Update - it looks like a pain to get to my Disk0. I would have to remove the CPU heatsink and the GPU just to test this.
    Last edited by tyeeman; 1 Week Ago at 20:53.
      My Computer


  7. Posts : 13
    Windows 10
       #27

    tyeeman said:
    I would have to remove the CPU heatsink and the GPU just to test this.
    ???
    I don't think anyone asked you to do that, why would you want to do this?

    tyeeman said:
    Thanks for the "no" answer.
    Okay, but as before described there are alternatives.

    If you can't boot your VHD from Disk 0 completely failed, you can always do it from Disk 1 where your VHD is stored.

    All you need to do is: partition Disk 1 with a first ESP partition and a second NTFS and create the EFI boot files on the ESP partition.
    Then copy your VHD file to the NTFS partition and add related entries in both the existing Boot Manager and BCD file on the ESP partition.
    Then you apply a suitable .wim image to your NTFS partition to make it capable of completing the boot of your VHD file.

    At startup press the related key for showing your BIOS boot menu and choose to start the Boot Manager of the Disk 1 and you are done.

    Please note that at least here (using a VHD instead of a VHDX file) after the choice in the BIOS boot menu the system automatically reboot once and then boot from VHD.
      My Computer


  8. Posts : 28
    win 10
    Thread Starter
       #28

    Exactly. That's what I posted above -

    diskpart
    list disk
    select disk 3 (or whatever it is)
    create partition EFI
    format quick fs=FAT32
    assign letter=A
    exit
    bcdboot E:\Windows /s A: /f UEFI

    Where E is my mounted VHD letter.

    Won't this work?

    - - - Updated - - -

    Forgot to add the -

    Select vol x
    Shrink desires=100

    - - - Updated - - -

    The above is for H: where my vhd is sitting now.
      My Computer


  9. Posts : 13
    Windows 10
       #29

    tyeeman said:
    Won't this work?
    Surely if you don't add anything else it won't work.

    And, sorry if I'm not happy (for personal reasons) to follow your steps searching for errors with diskpart, I use diskpart, but only when strictly necessary because I prefer using executables with a GUI, just as a (great) example DiskGenius.
    Where you find a way called Quick Partition to partition together that works great and partitions your disk correct into GPT partitions.
    First perform a backup of your data existing on disk.
    Running DiskGenius and make the ESP partition visible by assigning it a letter and running BOOTICE set the related entries on both Boot Manager and BCD.
    Use the command prompt only to add boot files to the ESP partition.
    But this still isn't enough to boot your VHD.
    By the way, throughout this phase you have no need to mount your VHD unless for other reasons of your own.

    Hoping you know how to do it then you need to extract the "install.wim" file from the Windows installation ISO file (from the folder "sources") and apply it to your newly created NTFS partition running ImageX and then, if you have done everything perfectly, it will work.


    Please note that I don't think it's correct to assign the letter A to a volume on HDD/SSD because A and B are historically attributed to old floppy disks and I think Windows doesn't like it.

    If you don't recognize some step, just ask, but preferably let do one thing at a time and do it well, otherwise it seems like we won't get out of it.

    How to get bootable VHD into BIOS boot menu?-sshot.png
      My Computer


  10. Posts : 28
    win 10
    Thread Starter
       #30

    Before trying @logon procedure I tried the procedure I mentioned above -

    diskpart
    select volume H
    shrink desired=100
    create part EFI
    format fs=fat32 quick
    assign letter=T
    exit
    bcdboot F:\Windows /s T: /f UEFI (where F: is the mounted VHD)
    diskpart
    select vol T
    remove letter=T
    exit
    exit

    and now my VHD shows in my F11 boot menu as a WD m.2 drive (which is where it is). I selected it and booted right into my VHD.
    Here is my disk management screenshot -

    How to get bootable VHD into BIOS boot menu?-vhd-boot-disk-management.jpg

    You can see the shrunken H: (by 100MB) where the VHD is located and the new 100MB system partition, and you can see the VHD is now the booted disk (C:). My disk0 which was where C: was is now K:.

    So I have accomplished my goal I believe. If disk0 fails, which is my normal C:\windows installation, then on reboot I select the WD m.2 drive which boots into the VHD.
      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 20:12.
Find Us




Windows 10 Forums