Factory recovery - Create a Custom Recovery Partition  

Page 2 of 25 FirstFirst 123412 ... LastLast

  1. Posts : 4,580
    several
       #10

    yes.
      My Computer


  2. Posts : 16,325
    W10Prox64
       #11

    SIW2 said:
    yes.
    Cheers.
      My Computer


  3. Posts : 4,580
    several
       #12

    Probably only need to change the files on recov partition when it is a change in major version.
      My Computer


  4. Posts : 4,580
    several
       #13

    @Kari, you could do this: then you just need to type in the driveletter e.g. F in the red bit

    Code:
    @ECHO OFF
    
     SET DRIVELETTER=
     ECHO.
     (set WINLOADER=)
    for /f "usebackq tokens=1,2" %%G in (`bcdedit.exe /enum {current} ^| find "path"`) do set WINLOADER=%%H
    ECHO.
     (set LCAL=)
    for /f "usebackq tokens=1,2" %%G in (`bcdedit.exe /enum {current} ^| find "locale"`) do set LCAL=%%H
    ECHO.
    bcdedit /create {ramdiskoptions} /d "Ramdisk"
    bcdedit /set {ramdiskoptions} ramdisksdidevice partition=%DRIVELETTER%:
    bcdedit /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
    for /f "tokens=2 delims={}" %%i in ('bcdedit.exe /create /d "Recovery" /application OSLOADER') do (set guid={%%i})
    bcdedit /set %guid% device ramdisk=[%DRIVELETTER%:]\sources\boot.wim,{ramdiskoptions}
    bcdedit /set %guid% path %WINLOADER%
    bcdedit /set %GUID% locale %LCAL%
    bcdedit /set %guid% osdevice ramdisk=[%DRIVELETTER%:]\sources\boot.wim,{ramdiskoptions}
    bcdedit /set %guid% systemroot \windows
    bcdedit /set %guid% winpe yes
    bcdedit /set %guid% detecthal yes
    bcdedit /displayorder %guid% /addlast
      My Computer


  5. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #14

    SIW2 said:
    @Kari, you could do this: then you just need to type in the driveletter e.g. F in the red bit
    Thanks @SIW2, that's a good idea. Don't understand why I didn't think about it in the first place.

    Edited tutorial, changing the batch file to ask drive letter. However, as I wanted to make it a bit more "elegant" , I added some visual eye candy and made a simple check to assure user has entered a correct drive letter.

    New, edited batch:

    Code:
    @ECHO OFF
    TITLE Add Recovery to Windows boot menu
    :SETLETTER
    CLS
    ECHO.
    ECHO             ###################################################
    ECHO             #                                                 #
    ECHO             #   This batch file creates recovery environment  #
    ECHO             #        adding it to Windows boot menu.          #
    ECHO             #                                                 #
    ECHO             ###################################################
    ECHO.
    SET /P DRIVELETTER= ^-- Please enter drive letter for your custom recovery partition (without colon): 
    IF NOT EXIST %DRIVELETTER%:\sources\boot.wim ECHO. & ECHO No valid Windows image found on given partition %DRIVELETTER% &ECHO. & PAUSE & GOTO :SETLETTER
    ECHO.
    bcdedit /create {ramdiskoptions} /d "Ramdisk"
    bcdedit /set {ramdiskoptions} ramdisksdidevice partition=%DRIVELETTER%:
    bcdedit /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
    for /f "tokens=2 delims={}" %%i in ('bcdedit.exe /create /d "Recovery" /application OSLOADER') do (set guid={%%i})
    bcdedit /set %guid% device ramdisk=[%DRIVELETTER%:]\sources\boot.wim,{ramdiskoptions}
    bcdedit /set %guid% path \windows\system32\winload.efi
    bcdedit /set %guid% osdevice ramdisk=[%DRIVELETTER%:]\sources\boot.wim,{ramdiskoptions}
    bcdedit /set %guid% systemroot \windows
    bcdedit /set %guid% winpe yes
    bcdedit /set %guid% detecthal yes
    bcdedit /displayorder %guid% /addlast
    Factory recovery - Create a Custom Recovery Partition-image.png

    Kari
      My Computer


  6. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #15

    simrick said:
    Okay, good to know. But then I would have to make sure to keep it updated on a regular basis, (twice a year), because a repair install has to be at least the same version as you're running...or am I getting myself confused?
    In the same way you have to create a new install media for each new feature upgrade, you must create a new recovery environment for it.

    Once created, you don't have to run the batch file again. When Windows will for instance be upgraded to version 1809 late this year, you just do the Part One from tutorial capturing new image. Then, delete contents on Recovery partition replacing everything with contents of version 1809 ISO image, and finally replace the install.wim or install.esd file in its Sources folder with your custom install.wim.

    Might take 10 or 15 minutes of your time twice a year but is worth of it.

    Kari
      My Computer


  7. Posts : 16,325
    W10Prox64
       #16

    Kari said:
    In the same way you have to create a new install media for each new feature upgrade, you must create a new recovery environment for it.

    Once created, you don't have to run the batch file again. When Windows will for instance be upgraded to version 1809 late this year, you just do the Part One from tutorial capturing new image. Then, delete contents on Recovery partition replacing everything with contents of version 1809 ISO image, and finally replace the install.wim or install.esd file in its Sources folder with your custom install.wim.

    Might take 10 or 15 minutes of your time twice a year but is worth of it.

    Kari
    Thank you, Kari. Appreciate that explanation.
      My Computer


  8. Posts : 14
    Windows 10
       #17

    Hi,

    I followed this tutuorial. It did create a new option in the boot menu. However when I boot from the recovery partition WinPE loads "loading files" after tha a command prompt starts with wpeinit. Then it waits. I need to find the drive letter for my recovery partition then I can start setup.exe.

    Should it not boot from the the recovery parthtion automatically using setup.exe. Perhaps my ISO was created wrong

    Thanks
      My Computer


  9. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #18

    Fafaxx said:
    Should it not boot from the the recovery parthtion automatically using setup.exe. Perhaps my ISO was created wrong.
    The recovery option in boot menu, when recovery partition is setup correctly as told in this tutorial, boots to this:

    Factory recovery - Create a Custom Recovery Partition-image.png

    On the other hand, if boot media is a normal WinPE media (tutorial), it boots to Command Prompt and runs wpeinit command to enable networking.

    Sounds to me that you boot to WinPE.

    Kari
      My Computer


  10. Posts : 14
    Windows 10
       #19

    Yes, there was a problem with boot.wim. I corrected it and now it works. I modified boot.wim earlier with language packs and driver and it grew almost to 800 MB. I took the one which was shipped and only injected the language packs I needed. Now it is fine and it boots directly to setup.exe with the choices to select languages to continue setup. It is a nice thing.

    Thank you for this tutorial!!
      My Computer


 

Tutorial Categories

Factory recovery - Create a Custom Recovery Partition Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  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 06:47.
Find Us




Windows 10 Forums