Windows 10: Factory recovery - Create a Custom Recovery Partition  

Page 2 of 2 FirstFirst 12

  1. Posts : 371
    trying to install win10
       2 Weeks Ago #10

    yes.
      My ComputerSystem Spec

  2.    2 Weeks Ago #11

    SIW2 said: View Post
    yes.
    Cheers.
      My ComputerSystem Spec


  3. Posts : 371
    trying to install win10
       2 Weeks Ago #12

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


  4. Posts : 371
    trying to install win10
       2 Weeks Ago #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 ComputerSystem Spec


  5. Posts : 14,230
    Windows 10 Pro
    Thread Starter
       2 Weeks Ago #14

    SIW2 said: View Post
    @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
    Click image for larger version. 

Name:	image.png 
Views:	7 
Size:	508.3 KB 
ID:	194332

    Kari
      My ComputerSystem Spec


  6. Posts : 14,230
    Windows 10 Pro
    Thread Starter
       2 Weeks Ago #15

    simrick said: View Post
    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 ComputerSystem Spec

  7.    2 Weeks Ago #16

    Kari said: View Post
    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 ComputerSystem Spec


 
Page 2 of 2 FirstFirst 12

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 Xbox Windows Phone


Related Threads
Hello everyone. I have a fairly new Dell laptop that I installed a SSD in after cloning the original HDD. Somehow the factory recovery partition was not copied to the SSD. I have tried twice to upgrade to W-10 and each time it has failed with...
Hello everyone, I would like to ask. How can I restore Windows to Factory reset with all Acer apps and drivers like recovery management, etc. I have Acer Aspire E5 with Windows 10 and I tried (for the first time when I had Recovery Management)...
Custom Recovery Partition in Installation and Upgrade
Hello, I have a fresh intalled Win-10 NVMe P50 with all necessary drivers etc. All factory partitions were deleted before installing Win-10. Was wondering how to create a Recovery Partition that would work like Lenovo factory system does...
So how would the home user do this if they wanted to create a recovery after their Windows 10 upgrade. I know for Windows 8 you could do the recimg thing to create the image file. I tried doing the commands listed in one of the thread to create the...
Installation & Upgrade Create Custom Recovery Image in Windows 10 in Tutorials
How to Create a Custom Recovery Image used to Refresh Windows 10 This tutorial no longer works starting with Windows 10 build 10130 released on May 29th 2015. The "C:\Windows\System32\recimg.exe" file has been removed in build 10130, and will...

Tags for this Thread

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 08:03.
Find Us