Factory recovery - Create a Custom Recovery Partition  

Page 25 of 25 FirstFirst ... 15232425

  1. Posts : 4,594
    several
       #240

    msconfig>boot tab delete what you dont want
      My Computer


  2. Posts : 69
    win10 pro
       #241

    SIW2 said:
    msconfig>boot tab delete what you dont want
    well, I don't know since I thought that upon each recovery that it would only show "windows 10" with MyRecovery and not the extra entries. Apparently booting to dos is the way since msconfig won't allow a delete even if admin "access denied".
      My Computer


  3. Posts : 4,594
    several
       #242

    It wont allow you to delete the entry you are booted into. Set the entry you want as default you should be able to get rid of the others.

    post a screenshot of what it says like this:

    Factory recovery - Create a Custom Recovery Partition-msconfig.jpg
      My Computer


  4. Posts : 69
    win10 pro
       #243

    See my attached pictures 1-5. The first is the double win10 shown in the bootup options displayorder list with "on volume 3" followed by MyRecoveryWin10Pro; second is the msconfig showing the two win10pro options in the list; third, is the popup showing "access denied" after I selected the second bootup option to delete its entry. Note: in the past I had selected "cancel" even though I'm administrator. However, I now selected ok to both popups. ; fourth, I used bcdedit to show what is in the bootup options list and the displayorder {ID} entries to confirm that the other win10pro entry isn't there; fifth, I then rebooted to see what bootup options would be displayed.
    Thus, it now only shows one win10 option and not two. So ignoring the access denied and hitting ok made it work the way as expected although I don't know why I got access denied to begin with.

    Factory recovery - Create a Custom Recovery Partition-win10bootup_1.jpgFactory recovery - Create a Custom Recovery Partition-win10bootup_2..jpgFactory recovery - Create a Custom Recovery Partition-win10bootup_3..jpgFactory recovery - Create a Custom Recovery Partition-win10bootup_4..jpgFactory recovery - Create a Custom Recovery Partition-win10bootup_5.jpg

    - - - Updated - - -

    One of the things that needs to be added to the Recovery.bat file posted here is the the storing of the {ID} # that was created to a temp file and then a Recoveryx64Del.bat file that uses this saved ID to remove the ramdisk and its WinRecovery display name, so that one can bootup without showing the multiple display options.

    So my Recoverx64.bat changed the path to /x64/sources since my Recovery partition has both the x32 and x64 but with my modified install.wim put in the x64/sources subdirectory. The files on this partition were those that would be created my mediacreator tool.

    My Recoveryx64Del.bat uses the MyRecoveryWin10Proguid.dat file to remove the ramdisk and bootup option for MyRecoveryWin10Pro. The dat file content specifies the ID that was created as {b129db86-95e9-11ee-820d-e78cb99e2e21}
    for example.

    @ECHO OFF
    TITLE Add Recovery to Windows boot menu
    :SETLETTER
    CLS
    ECHO.
    ECHO ###################################################
    ECHO # #
    ECHO # This batch file creates recovery environment #
    ECHO # for x64 adding it to Windows boot menu. #
    ECHO # The recovery partition also contains x86 but #
    ECHO # not used - only x64 is used. #
    ECHO ###################################################
    ECHO.
    SET /P DRIVELETTER= ^-- Please enter drive letter for your custom recovery partition (without colon):
    IF NOT EXIST %DRIVELETTER%:\x64\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%:
    REM note: the sdi file may need \x64 added to path. There is one in the root and in the x86 subdirectory
    bcdedit /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
    for /f "tokens=2 delims={}" %%i in ('bcdedit.exe /create /d "MyRecoveryWin10pro" /application OSLOADER') do (set guid={%%i})
    bcdedit /set %guid% device ramdisk=[%DRIVELETTER%:]\x64\sources\boot.wim,{ramdiskoptions}
    bcdedit /set %guid% path \windows\system32\winload.efi
    bcdedit /set %guid% osdevice ramdisk=[%DRIVELETTER%:]\x64\sources\boot.wim,{ramdiskoptions}
    bcdedit /set %guid% systemroot \windows
    bcdedit /set %guid% winpe yes
    bcdedit /set %guid% detecthal yes
    bcdedit /displayorder %guid% /addlast

    REM Write the guid to a file so that it can be used by RecoveryWin10Prox64Del.bat to remove the bootup MyRecoveryWin10Pro option
    echo %guid% >MyRecoveryWin10proguid.dat
    pause
    See the /x64/sources and the last line that echoes the guid to the dat file.

    @
    ECHO OFF
    TITLE Remove Recovery Option "MyRecoveryWin10pro" from Windows boot menu

    CLS
    REM Remove the bcdedit identifier tag assigned for removal.
    set /p guid= <MyRecoveryWin10proguid.dat

    ECHO "MyRecoveryWin10pro guid removed. " %guid%

    bcdedit /delete %guid% /cleanup

    REM Remove the ramdiskoptions
    bcdedit /delete {ramdiskoptions} /f

    REM Remove the guid from the displayorder list of bootmgr
    bcdedit /displayorder %guid% /remove

    REM Remove guid environment variable
    set guid=

    REM Delete the temporary data file that has the guid
    del /f MyRecoveryWin10proguid.dat
    Of course, one could create a batch file to make it more versatile by adding command line switches/data to the batch files command line in cases where one has more than one bootup option.

    I'm assuming that as the number of bootup option list increases, that the font size size is reduced automatically, and that a scroll window appears if the number is beyond the number that can be displayed on one screen.

    Question: I've done the same for my windows Server 2022 using the batch file method. However, what is displayed is the WinServer 2022 name, but the MyRecoveryWinSrvr2022 name I specified doesn't show. It only shows "ramdisk" and when selected will recover my win server 2022 from my wim file. Moreover, the background color doesn't change, nor does the font size increase like the win10 pro bootup options do. Note: I'm not mixing Win server 2022 boot and recovery at the same time as win10 pro and recovery. They both have their own batch files and I run the delete batch file on win10pro before I switch over to the set of batch files for win server 2022 and vice versa.
    Last edited by swegmike; 20 Dec 2023 at 07:41.
      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 11:09.
Find Us




Windows 10 Forums