[SOLVED] Help install WimBoot in VMware BIOS mode

Discussion in 'Scripting' started by xinso, Sep 28, 2014.

  1. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,632
    13,641
    340
    #1 xinso, Sep 28, 2014
    Last edited by a moderator: Apr 20, 2017
    [SOLVED] It needs x64.
    Edit: OMG, It's compatible with both x64 and x86!!!




    I failed to manage VMware Firmware = "efi" following tutorials available, and I don't know about diskpart.

    For ISO, could you please turn the following files to BIOS mode ? Thanks.

    With Firmware = "bios", it failed in "W:\Windows\System32\bcdboot W:\windows".

    startnet.cmd
    Code:
    @echo off
    
    FOR %%a IN ( C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z: ) DO @if exist %%a\bootmgr.efi set U_Drv=%%a
    
    FOR %%a IN ( C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z: ) DO @if exist %%a\windows\notepad.exe set W_Drv=%%a
    
    %U_DRV%
    
    @echo off
    diskpart /S %U_DRV%\DiskpartFiles\disk-wimboot.txt
    
    rem == Add the Windows image to the Images partition ==
    set error=copy image file fail
    md "I:\Windows Images\"
    @echo copying file,please wait
    copy %U_DRV%\image\wimboot.wim "I:\Windows Images\install.wim"
    if %errorlevel% neq 0 goto Error
    
    rem == Apply the Windows image to the Windows partition ==
    set error=Apply image file fail
    md W:\Scratch
    dism /Apply-Image /ImageFile:"I:\Windows Images\install.wim" /ApplyDir:W: /Index:1 /WIMBoot /ScratchDir:W:\Scratch
    if %errorlevel% neq 0 goto Error
    
    rem === Copy boot files to the System partition =========
    set error=create boot fail
    W:\Windows\System32\bcdboot W:\windows
    if %errorlevel% neq 0 goto Error
    
    rem == Add the Windows RE image to the Images partition ==
    set error=create folder fail
    md I:\Recovery\WindowsRE
    if %errorlevel% neq 0 goto Error
    set error=copy winre fail
    copy %U_DRV%\winre\winre.wim I:\Recovery\WindowsRE\winre.wim
    if %errorlevel% neq 0 goto Error
    
    rem == Register the location of the recovery tools ==
    set error=Set the location of the Image fail
    W:\Windows\System32\Reagentc /SetREImage /Path I:\Recovery\WindowsRE /Target W:\Windows
    if %errorlevel% neq 0 goto Error
    
    rd /q/s W:\Scratch
    
    goto pass
    
    :pass
    color a0
    ECHO ====================================================
    ECHO    U disk plug you please, start your computer      
    ECHO ====================================================
    pause
    wpeutil shutdown
    
    :Error
    color c0
    ECHO ====================================================
    ECHO                  %error%              
    ECHO ====================================================
    pause
    goto Error
    
    :end
    disk-wimboot.txt
    Code:
    rem == CreatePartitions-WIMBoot-UEFI.txt ==rem == These commands set up the hard drive partitions
    rem    for WIMBoot. 
    rem
    rem    Example: diskpart /s CreatePartitions-WIMBoot-UEFI.txt
    rem
    rem    Adjust the partition sizes to fill the drive
    rem    as necessary. ==
    select disk 0
    clean
    convert gpt
    rem == 1. System partition (ESP) ===================
    create partition efi size=100
    format quick fs=fat32 label="System"
    rem == 2. Microsoft Reserved (MSR) partition =======
    create partition msr size=128
    rem == 3. Windows partition ========================
    create partition primary
    format quick fs=ntfs label="Windows"
    assign letter="W"
    
    REM +++++++++-IMPORTANT++++++++++++++++++++++++++++++ 
    REM calculate the disk space and adjust to the size of your install.wim and custom.wim
    shrink desired = 5000
    REM +++++++++++++++++++++++++++++++++++++++++++++++++
    
    rem === 4. Images partition ========================
    create partition primary
    format quick fs=ntfs label="Images"
    assign letter="I"
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001
    exit
     
  2. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    #2 s1ave77, Sep 28, 2014
    Last edited by a moderator: Apr 20, 2017
    What was the problem with efi boot in VMware :g:? Actually i found it very easy. Created a new VM without starting it directly and closed the program. Then opened the VMX file and added one line after the memory settings

    Code:
    firmware = "efi"
    Done, VM boots in UEFI mode :good3:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,632
    13,641
    340
    #3 xinso, Sep 28, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Thanks.

    Code:
    usb_xhci:3.deviceType = "hub"
    usb_xhci:3.port = "3"
    usb_xhci:3.parent = "-1"
    firmware = "efi"
    tools.syncTime = "FALSE"
    But it shows

    efi.png
     
  4. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    What version is it you are running?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,632
    13,641
    340
    #5 xinso, Sep 28, 2014
    Last edited: Sep 28, 2014
    (OP)
    It's 10.0.3 build-1895310

    I've tried Murphy's way, and others to no avail.

    So I tried to follow the script and manually installed in BIOS mode, and it worked.

    C: = WimBoot System
    D: = Install.wim

    Manual BIOS Mode.png