Factory recovery - Create a Custom Recovery Partition  

  1. Reynonic
    Posts : 8
    Windows 10
       #160

    GPT Bootable USB


    I have implemented the suggested recovery partition. Thanks for this by the way!

    The only issue I have is that I want to be able to create a single USB to do the same thing, but my WIM file exceeds the FAT32 file system maximum file size. I am trying to prepare for the possibility that the computer's sole HDD may fail and I may need to re-install/re-image a new HDD with the custom WIM that I made during this process.

    I know that I can create both 1) a normal FAT32 Windows Recovery USB (with which I can use to access an Admin Command Prompt) and 2) another USB formatted to NTFS, containing a copy of the recovery partition I made by following this tutorial, but I was wondering if there was a way to save this all on just 1 USB?

    I saw the mention of Create bootable USB installer if install.wim is greater than 4GB, but from what I understand, this does not work if you are using GPT. Is there any way to do similarly with a GPT system (that doesn't support booting from NTFS external media), so that I don't need to have 2 USBs, in order to re-install from my custom WIM file in the case that the HDD does fail and needs replacing?

    Is the only option to just make a recovery USB and then add a second NTFS partition to the same USB and then use command line to launch Setup.exe on the 2nd partition?

    Thanks for all of your hard work! It is appreciated!
      My Computer

  2. SIW2's Avatar
    Posts : 1,098
    trying to install win10
       #161

    Create more than one partition on the usb stick. setup should find the install.wim in the sources folder on the ntfs partition.
      My Computer

  3. Reynonic
    Posts : 8
    Windows 10
       #162

    SIW2 said:
    Create more than one partition on the usb stick
    Sorry, I was just editing my post. There is no option to make a bootable one that will eliminate the need for command line?
      My Computer

  4. SIW2's Avatar
    Posts : 1,098
    trying to install win10
       #163

    setup should find the install.wim in the sources folder on the ntfs partition.

    Your recovery usb should have winre.wim in the sources folder. You can add other wims - a custom winpe.wim, or the regular boot.wim from the installation media ( rename it to something like custom.wim or bootsetup.wim or anything you like ). Then add entries for the extra wims to bcd store on the usb stick.

    Then when you boot from the usb select from the boot menu. E.G if you select bootsetup.wim it contains setup.exe


    Copy the contents of the installation media to the ntfs partition ( put your install.wim in the sources folder instead of the original )
      My Computer

  5. Reynonic
    Posts : 8
    Windows 10
       #164

    SIW2 said:
    setup should find the install.wim in the sources folder on the ntfs partition.
    If I am understanding you correctly, when I select to "Install", the list of available OS Images will include both the FAT32 partition's default Install.esd (showing as Windows 10 64-bit or similarly) and the Install.wim on the NTFS Partition (showing as Recovery, which was specified using the dism /description argument during the WIM creation process)?

    Let I am understanding that wrong.
    Also, if that is the case, can I delete the Install.esd from the FAT32 partition, so that the only option is the custom "Recovery" WIM?

    AND

    Can I just make a Sources folder on the NTFS partition and put just the custom WIM in that? Are the duplicate files necessary in both partitions?

    Thanks for the fast response time btw... getting a computer ready for a gift.
      My Computer

  6. SIW2's Avatar
    Posts : 1,098
    trying to install win10
       #165

    Adding bcd entries pointing to extra wim files is easy.

    The fat32 partition sources folder can contain as many bootable wim files as you want. You need to add entries to the bcd store so you get a menu allowing you to select any of the bootable wims.

    Copy boot.wim from installation media into the sources foilder on the fat32 partition ( you will probabaly have to rename it to e.g bootsetup.wim - because iirc the recovery media sources folder already contains a file called boot.wim - which is in fact winre.wim renamed.)

    Then you add an entry to the bcd store on the fat32 partition pointing at bootsetup.wim

    Now when you boot from usb you get a menu - choose bootsetup.wim and run setup as normal. It will find sources\install.wim on the ntfs partition

    Also, if that is the case, can I delete the Install.esd from the FAT32 partition, so that the only option is the custom "Recovery" WIM?
    That is the idea. The recovery wim has to be named install.wim if it isn't already. You also have to copy all the other contents of the installation media sources folder to the sources folder on the ntfs partition.
    Last edited by SIW2; 22 Dec 2019 at 20:48.
      My Computer

  7. SIW2's Avatar
    Posts : 1,098
    trying to install win10
       #166

    First thing is copy installation media boot.wim to your desktop and rename it bootsetup.wim.
    Then copy bootsetup.wim to sources folder of usb stick.
    Then add entry for bootsetup.wim to bcd store on usb stick.

    ( use bootice to add the bcd entry as it is probably easier for you than commands ).
    BootIce.zip

    Test by booting the usb stick and select your new entry. If bootsetup.wim loads up - you have done it right.

    Now you can create your second partition ( ntfs), copy the sources folder from installation media to the ntfs partition. Put your install.wim in there instead of the one that came with the installation media.


    Test it :

    rename fat32\sources\install.esd to something else - e.g. Binstall.esd ( so setup.exe doesn't find it ). Or just delete it if you are never going to want it.

    Then boot from usb stick. Select bootsetup.wim from boot menu. Setup.exe should then find install.wim on the ntfs partition.
      My Computer


  8. Reynonic
    Posts : 8
    Windows 10
       #167

    Thanks for all of the help. I think I might stick with creating a Recovery USB, then adding the files from the Recovery Partition that I made earlier following this guide to a second NTFS partition made from the Unallocated space or I might even just buy an extra USB. I can't quite follow the rest or how adding a BCD entry to the Sources folder on the FAT32/Recovery partition helps the Setup.exe find the WIM on the NTFS partition. I guess if it works with the extra files, I will just try it as is and have duplicates on both partitions or have 2 USBs. I literally just started messing with partitioning and BCDs in the last week when I had to remove/replace a WinRE WIM (WinRE and Backup Image after Upgrade from Windows 8 to Windows 10), which took me over a week to figure out and might be the reason I have come down with the flu. I don't quite have time to research this in time for Christmas and this seems to be a bit beyond my level of comprehension, given that my head is splitting trying to wrap around this. Think that this is as good of a time as any to call it quits, since I am sick and have to work tomorrow. Anyways, thanks again for all of your help trying to explain this to a brick wall like myself. Have a Merry Christmas!
      My Computer

  9. SIW2's Avatar
    Posts : 1,098
    trying to install win10
       #168

    . I can't quite follow the rest or how adding a BCD entry to the Sources folder on the FAT32/Recovery partition helps the Setup.exe find the WIM on the NTFS partition.


    1. Boot.wim from the installation media contains setup.exe:

    Factory recovery - Create a Custom Recovery Partition-boot-wim-contents.jpg


    This is why adding Boot.wim from the installation media to fat32\sources folder means you can run setup.exe from there.

    If you add that extra wim file to fat32\sources then obviously you also need a bcd entry pointing at it.


    2. Your fat32\sources might currently have a file called boot.wim - but it is not the same. It is winre.wim renamed.

    Winre.wim - you will notice it does not contain setup.exe.

    Factory recovery - Create a Custom Recovery Partition-winre-wim-contents.jpg
    Last edited by SIW2; 23 Dec 2019 at 07:42.
      My Computer

  10. Reynonic
    Posts : 8
    Windows 10
       #169

    I stayed home sick, as I don't want to miss Christmas and got a bit of sleep, but am still not understanding.

    When you use the Windows Media Creation Tool to make a Recovery USB drive, the drive is already bootable. I don't have any other installation media other than the USB Recovery drive that I made myself, since this was a refurbished computer from DellRefurbished that I upgraded from Windows 8 to Windows 10 (which may have started as a Windows 7 PC). The computer only has 1 HDD. I am trying to do the same as this tutorial, but onto a USB drive.

    I am doing this, so I can be ready to prepare a new HDD, in the case the current HDD drive the fails. I am trying to make it so that, if the drive does fails, I can install a new HDD and change the boot order in BIOS, to boot to the Recovery USB drive. Then, when the Recovery USB (that is already bootable and already contains a setup.exe) starts, I can click "install", choose the new HDD, format it, and (when prompted to choose an OS version/architecture), choose the custom Install.WIM I created (which would be named "Recovery", due to the descriptor I gave it when it was made). By choosing this, it would install on the new HDD.

    In attempts to do this, I created a Recovery USB drive (using Windows Media Creation Tool) added an NTFS partition (to the remaining Unallocated portion of the drive). I then added all of the files from the FAT32 partition of this drive to the NTFS partition I created. I then copied my custom Install.wim from my HDD's Recovery partition (that I already had made using DISM by following this tutorial) and deleted the Install.esd file.

    I don't have much knowledge about bootloader's, bcd entries, or partitioning.

    The recovery drive can already be set to first in the boot order, so is adding a bcd entry supposed to give me a choice of whether to launch into the FAT32 partition's or the NTFS partition's setup.exe?

    "If you add that extra wim file to fat32\sources then obviously you also need a bcd entry pointing at it."
    I only need the option to do an install of my custom Install.wim file and that Install.wim cannot fit on the FAT32 partition.

    I do understand mounting WIMs (in general) and that only boot.wim contains the setup.exe file, but why would I need to boot to a WIM file to run setup.exe, which is already in the root of the 32-bit partition? Can UEFI/BIOS not run EXEs and are WIM files actually being used to boot the USB? Do they just put the EXE on Recovery USB drives, so that it can be launched from within the Windows OS?

    I feel I am missing a pretty big concept here or I may have not asked something properly, due to my own ignorance.
      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 Threads
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 14:53.
Find Us




Windows 10 Forums
 

This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.   Read more
I agree
Powered by cookie-script.com