Factory recovery - Create a Custom Recovery Partition  

Page 16 of 25 FirstFirst ... 61415161718 ... LastLast

  1. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #150

    likes2learn said:
    Would I need to create an ei.cfg etc because this is an OEM install? Maybe just something new with 1903? Could just be that I created a bad wim file, just not sure where to start troubleshooting.
    Weird.

    Anyway, a missing image description is the issue. I've now edited step 1.10 in this tutorial, to add description to captured image when capturing it with DISM.

    You have three options, as far as I can see.

    1.) Use a generic key for your Windows edition instead of selecting I don't have a product key when Windows Setup asks for it.

    Generic product keys:
    • Windows 10 Home Single Language: 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
    • Windows 10 Home: TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
    • Windows 10 Pro: VK7JG-NPHTM-C97JM-9MPGT-3V66T

    Education, Enterprise and Server editions, see following support article for generic install keys: Appendix A: KMS Client Setup Keys

    2.) Install Windows System Image Manager and Windows Deployment Tools as told in steps 1.1 to 1.3 in this tutorial, then see this post about how to change / add image description to your WIM file.

    3.) Recapture the WIM file, this time adding the /description switch to DISM capture command as told in now edited step 1.10 in tutorial.

    Kari


    Note   Note
    EDIT:

    I tested this just now, 10 hours after posting the above. I captured the WIM file from an existing system without image description. Restoring from custom recovery partition worked like a charm, which makes it even more difficult to understand why you got issues.
    Last edited by Kari; 27 Aug 2019 at 22:37. Reason: Added a note
      My Computer


  2. Posts : 1
    Windows 10
       #151

    I have experimented with default strings, and now I can't change name in selection screen ("Ramdisk").
    I have used line to receive legacy view of selection:
    "bcdedit /set {default} bootmenupolicy legacy"
    Factory recovery - Create a Custom Recovery Partition-dscpdc_0001.jpg

    Can I change name in legacy selection menu?
    I have deleted with msconfig tha boot selection, and tried to add new with new name, but received that file allready exist, with new added entry, with the same name.
      My Computer


  3. Posts : 2
    Windows 10 x64 Home Single Language Edition
       #152

    Hidden partition not booting: solved


    tjmack said:
    I messed up somewhere but not sure where.

    I can't get the Recovery partition to work whenever I hide it from File Explorer using the Remove letter method within Disk Management. Whenever I do and reboot into Recovery to run its Wndows Installation, right after its "Setup is starting..." screen I get, "A media driver that your computer needs is missing" error. And whenever I make the partition visible again by putting a drive letter back, and then try the Recovery partition, it works.

    I think its how I copied the Windows installation contained within the original ISO that has left some sort of broken file reference behind, but not sure.

    Anyone got any other ideas?

    Thanks for the tutorial, anyway.
    I have encountered the same issue that @tjmack had:
    A media driver that your computer needs is missing error during recovery process just after the initial Language/Region screen.

    In the end, I have solved the issue.

    Here’s how it went:

    I have followed the original Kari’s guide and made a bootable MyRecovery partition in the “last” 20GB of space of my drive, mounted as R:\. Besides that, I had two other volumes, OS (C:\) and Data (D:\) on my hard drive, which was the only one installed onto my laptop.
    I rebooted my laptop to MyRecovery drive and made sure that system installation process went as far as Partition Management screen. I then aborted the installation process and rebooted to the original OS again.

    Here is the interesting part:

    When I have unmounted “R:\” volume to make it invisible for the OS and rebooted to Recovery again, I got A media driver that your computer needs is missing error after the Language/Region settings screen, and never got further than that. Error message stated that drivers needed for the installation drive have not been found, with a dialog option for choosing the drivers manually. I tried manually feeding hdd drivers to the system, but to no success.

    After I mounted the R: volume again from the main OS, recovery process went successfully again. What!?
    This behavior persisted. I have tried many things, even rebuilding the Recovery partition from scratch, this time using files from Win 10 ISO image instead of the USB drive, but no luck.
    Since I was sure that the issue was really about installation media mounting and drivers, I have launched Shift+F10 command line from the Language/Region screen of installation process and used diskpart list vol commands to confirm:

    If “MyRecovery” partition has previously been mounted in the main OS as R:\ or any other letter, it successfully mounted during the installation process as E: being last on the drive:

    Volume 0: DVD-drive______________F:
    Volume 1: System Recovery
    Volume 2: OS_____________________C:
    Volume 3: Data___________________D:
    Volume 4: MyRecovery_____________E:
    Volume 5: hidden Fat 32


    If “MyRecovery” partition has been unmounted from the main OS, it simply wouldn’t mount during the installation process:

    Volume 0: DVD-drive______________E: <unsure if it was E or F
    Volume 1: System Recovery
    Volume 2: OS_____________________C:
    Volume 3: Data___________________D:
    Volume 4: MyRecovery
    Volume 5: hidden Fat 32


    I then tried manually mounting MyRecovery partition using Diskpart, and after that the installation went fine. However, I was unhappy by the fact that the user would need to manually mount the partition in case system recovery is needed.

    Now, it is hard to recreate, so I am not 100% sure that it is not the previous step that has done the trick, but:
    Trying to understand how the automatic mounting process treats differend kinds of partitions/drives, I have plugged in a random USB stick with some files that I had lying around and booted into recovery again. Aaaaand behold:

    Volume 0: DVD-drive______________G:
    Volume 1: System Recovery
    Volume 2: OS_____________________C:
    Volume 3: Data___________________D:
    Volume 4: MyRecovery_____________E:
    Volume 5: hidden Fat 32
    Volume 6: USB drive______________F:


    Not only MyRecovery had mounted, it kept getting mounted even after I plugged USB out and rebooted! No idea how or why, but it worked. I suspect that there is some bug in Windows installator that treats the last volume before the DVD-drive as somehow special. When I added a USB stick, the MyRecovery volume stopped being the last one and the process went fine.

    So yeah, I have done only two things, manually mounted the volume during installation process using command line and simply plugged in a USB drive. One of those two has done the trick, and I am 80% sure that it is the latter.

    @tjmack, could you please confirm if it works for you.
    @Kari, any ideas what it might have been?
    Last edited by Kirill Mos; 03 Nov 2019 at 11:25.
      My Computer


  4. Posts : 2
    Windows 10 x64 Home Single Language Edition
       #153

    Recovery password / Partition encryption


    @Kari , great tutorial! I am very happy to get custom recovery partition without using any commercial software or exotic dualboot linux/clonezilla builds.

    I have a question though: is there a way to make unauthorized access to recovery process more difficult?

    There are two problems that I am concerned about:
    1. It is hard to make a fully ready-to-use OS installation without any personal data, so my recovery image definitely contains some. Moreover, if I am going to make an updated image later, I will have to log out of every single software/service and delete every possible personal file if I want to be really safe.
    2. If an unexperienced user somehow gets booted into “Choose OS” window and continues with the process, current state of the OS can be lost along with any valuable files.

    As I understand, encrypting a .wim file isn’t an option with this method, because standard Windows installator can’t deal with encrypted image. Is this right? Can anything be done about this?
    Or, for example, is there a way to just incorporate a password prompt into some step of the recovery process just to make sure a random user can’t easily initiate the recovery?

    Sidenote:
    I think it would also be great if you included a small guide for removal/configuration of boot options into the original post. A couple screenshots from msconfig -> boot and System Properties -> Advanced -> Startup and Recovery would save a ton of time for people who have multiple identical boot entries after misusing your script or get “Choose OS” dialog each time they boot.
      My Computer


  5. Posts : 3
    Windows 10 Pro
       #154

    Hey Kari,

    Thanks for the great instructions. However, I ran into a snag. My OS is an upgrade from Win7 to Win10Pro. I just tried your instructions and i get "This app can't run on your PC". My PC is MBR and I am using a partition on the same physical drive, the same way a factory recovery would be. I just had to rebuild my PC from scratch due to crash so it is Win10 Pro 1909 with all patches. I downloaded the Win10 ISO 1909. Below is my script and screen print of error. Thanks in advance.

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

    @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 ('winload.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.exe
    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
    pause
      My Computer


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

    thomastg said:
    I just tried your instructions and i get "This app can't run on your PC".
    My apologies for a delayed reply.

    For some reason, you have replaced an important command in the script with a command which is completely wrong, therefore making the script invalid.

    See screenshots. In first one is the script as shown in tutorial, BCDEDIT command highlighted. In second one, your script showing how you have changed it to WINLOAD command. That is wrong, doesn't work. Click screenshots to enlarge.
    Factory recovery - Create a Custom Recovery Partition-correct.jpg

    Factory recovery - Create a Custom Recovery Partition-wrong.jpg

    Fix that, and the script works.

    Kari
      My Computer


  7. Posts : 3
    Windows 10 Pro
       #156

    Kari said:
    My apologies for a delayed reply.

    For some reason, you have replaced an important command in the script with a command which is completely wrong, therefore making the script invalid.

    See screenshots. In first one is the script as shown in tutorial, BCDEDIT command highlighted. In second one, your script showing how you have changed it to WINLOAD command. That is wrong, doesn't work. Click screenshots to enlarge.
    Factory recovery - Create a Custom Recovery Partition-correct.jpg

    Factory recovery - Create a Custom Recovery Partition-wrong.jpg

    Fix that, and the script works.

    Kari
    Sorry to bother you again, but that did not work either.
      My Computer


  8. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #157

    thomastg said:
    Sorry to bother you again, but that did not work either.
    I can only say, that I took your batch script, changed that one word / command, and tested it on BIOS based physical and virtual machines. Both worked without issues.

    Kari
      My Computer


  9. Posts : 3
    Windows 10 Pro
       #158

    No I really appreciate your help. I actually had fixed what you pointed out before, i just had uploaded the wrong bat file to the conversation. But what I haven't done is send you the output I am getting from the batch file. See below.

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

    - - - Updated - - -

    BTW, i am an Admin on my machine.

    - - - Updated - - -

    ...but may not be setup correctly.

    - - - Updated - - -

    Setup is a singe 1TB physcial drive as follows:
    Win10 C: 920GB
    Recovery E: 25GB
      My Computer


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

    thomastg said:
    BTW, i am an Admin on my machine.
    "Access is denied" after each command hints that you are running the batch file from a normal Command Prompt. As told in step 3.4, it must be run from an elevated Command Prompt. You being a local admin does not mean that you can run commands requiring elevation from normal Command Prompt.

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




Windows 10 Forums