DualBoot Windows 10 with native boot on vhdx file.

Page 1 of 2 12 LastLast

  1. Posts : 250
    Windows 10 22H2
       #1

    DualBoot Windows 10 with native boot on vhdx file.


    hello everyone,

    I need to try cortana reminders on the 2004 version.

    I have vmware but I would like to try to install on my hardware if possible with a dual boot.

    I would like to use native boot on vhdx file.

    I have seen tutorials and I have partially prepared a dos batch script to automate everything but I am missing the entry phase in the BCD.

    But I would like to check again if everything is okay also the initial part.

    Where do you recommend starting from?
      My Computers


  2. Posts : 4,142
    Windows 3.1 to Windows 11
       #2

    After you create your VHD and have applied the OS into it..
    To Add the VHD to your Host Boot Menu

    With ? being the current drive letter assigned to the monted VHD
    Bcdboot ?:\Windows
      My Computer


  3. Posts : 250
    Windows 10 22H2
    Thread Starter
       #3

    Thanks for the tip but it's been a long time since I made the script and I don't remember much.

    I'd like to check everything with you.

    I read this tutorial to create the VHDX Create and Set Up New VHD or VHDX File in Windows 10. and this Problem creating GPT VHD automatically even if I haven't understood much.

    For the installation of windows on the vhd I had found a tutorial but now I can't find it.

    Can you help me find the remaining tutorials?

    Do you know if there is a script already ready?

    In the meantime, I fix the script a little (which is not finished) and place it as soon as it is done.

    This is the steps in the script

    1. backup bcd
    2. create vhdx
    3. apply windows image to vhdx (install?)
    4. add entry in bcd
    5. restore bcd
      My Computers


  4. Posts : 17,661
    Windows 10 Pro
       #4

    This video explains how to set up a native boot VHD:



    For full instructions, see this post in Ten Forums video thread.

    Kari
      My Computer


  5. Posts : 250
    Windows 10 22H2
    Thread Starter
       #5

    Thanks Kari,

    I have the ISO "Win10_2004_Italian_x64.iso" downloaded with the microsoft tools. How do I extract the .wim or the .esd?
      My Computers


  6. Posts : 17,661
    Windows 10 Pro
       #6

    einstein1969 said:
    I have the ISO "Win10_2004_Italian_x64.iso" downloaded with the microsoft tools. How do I extract the .wim or the .esd?
    Mount the ISO file as virtual DVD (tutorial). WIM or ESD image (install.wim or install.esd) can be found in X;\Sources folder, X: being the drive letter of mounted ISO.

    Kari
      My Computer


  7. Posts : 250
    Windows 10 22H2
    Thread Starter
       #7

    Thank you very much. !!!
      My Computers


  8. Posts : 250
    Windows 10 22H2
    Thread Starter
       #8

    Thanks again.

    I installed the 2004 version in dualboot on .vhdx file.

    I had some problems with the script because in case of an error, these errors were not seen. I made changes to the script and added checks in case of errors and more so it is more convenient to use...

    Code:
    @echo off
    
    Rem check amministrative privileges
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if '%errorlevel%' NEQ '0' Echo Run with amministrative privileges! & pause & exit
    
    Rem Set the destination dir of .vhdx file
    set "vhdx_dir=C:\VHD"
    
    Rem Set the path of Install.wim
    ::set "wim_dir=I:\sources"
    
    Rem Set the index of version to install
    set "index=8"
    
    Rem Set the boot description
    set "boot_desc=W10 PRO EN-GB (VHD)"
    
    mkdir %vhdx_dir%
    cd /D %vhdx_dir%
    (
    echo create vdisk file="%vhdx_dir%\DualBoot.vhdx" maximum=51200 type=expandable
    echo attach vdisk
    echo create partition primary
    echo format label="DualBootVHD" quick
    echo assign letter=W
    echo exit
    ) >"VHDConfig.txt"
    
    start /B /wait diskpart /s VHDConfig.txt
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    start /B /wait dism /apply-image /imagefile:%wim_dir%\install.wim /index:%index% /applydir:W:\
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    start /B /wait bcdboot W:\Windows
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    start /B /wait bcdedit /set {default} description "%boot_desc%"
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    cls
    echo. 
    echo Windows deployed to VHD file
    echo and added to host boot menu.
    echo.
    pause
    exit
    Kari, if you want you can update your thread by adding this script if you want.
      My Computers


  9. Posts : 15,480
    Windows10
       #9

    einstein1969 said:
    Thanks again.

    I installed the 2004 version in dualboot on .vhdx file.

    I had some problems with the script because in case of an error, these errors were not seen. I made changes to the script and added checks in case of errors and more so it is more convenient to use...

    Code:
    @echo off
    
    Rem check amministrative privileges
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if '%errorlevel%' NEQ '0' Echo Run with amministrative privileges! & pause & exit
    
    Rem Set the destination dir of .vhdx file
    set "vhdx_dir=C:\VHD"
    
    Rem Set the path of Install.wim
    ::set "wim_dir=I:\sources"
    
    Rem Set the index of version to install
    set "index=8"
    
    Rem Set the boot description
    set "boot_desc=W10 PRO EN-GB (VHD)"
    
    mkdir %vhdx_dir%
    cd /D %vhdx_dir%
    (
    echo create vdisk file="%vhdx_dir%\DualBoot.vhdx" maximum=51200 type=expandable
    echo attach vdisk
    echo create partition primary
    echo format label="DualBootVHD" quick
    echo assign letter=W
    echo exit
    ) >"VHDConfig.txt"
    
    start /B /wait diskpart /s VHDConfig.txt
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    start /B /wait dism /apply-image /imagefile:%wim_dir%\install.wim /index:%index% /applydir:W:\
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    start /B /wait bcdboot W:\Windows
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    start /B /wait bcdedit /set {default} description "%boot_desc%"
    if '%errorlevel%' NEQ '0' echo( & echo ###### Error! ###### & pause & exit
    cls
    echo. 
    echo Windows deployed to VHD file
    echo and added to host boot menu.
    echo.
    pause
    exit
    Kari, if you want you can update your thread by adding this script if you want.
    I always add switches /p /d after bcdboot command so the new vhd does not become the default boot drive, and also it is not placed first in boot menu.
      My Computer


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

    cereberus said:
    I always add switches /p /d after bcdboot command so the new vhd does not become the default boot drive, and also it is not placed first in boot menu.
    I put the VHD entry first / default on purpose. First OOBE boot requires a few restarts, having new VHD entry as default I don't have to remain on PC to choose it after every restart when boot menu is shown.

    I can always change the order and change default OS when VHD has been fully setup and booted to desktop first time.

    Kari
      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 18:26.
Find Us




Windows 10 Forums