Problem Setting Recovery Partition after Moving Partitions

Page 2 of 2 FirstFirst 12

  1. Posts : 5
    Windows 10
       #11

    SIW2 said:
    You would be better off using %systemdrive% in your cmd file. Contrary to popular belief the osletter is not always C
    is it addressed to me? I am offering the user to select their drives and also assign a letter to their recovery partition after they selected it.
      My Computer


  2. Posts : 4,594
    several
       #12

    if "%selection%"=="3" (
    set /p partition=Enter the drive letter of the partition you want to use:

    echo.
    echo Performing Bcdboot...
    echo.
    bcdboot C:\Windows /s %partition%
    goto menu

    )

    you have assumed osletter C. It might not be.
      My Computer


  3. Posts : 5
    Windows 10
       #13

    SIW2 said:
    if "%selection%"=="3" (
    set /p partition=Enter the drive letter of the partition you want to use:

    echo.
    echo Performing Bcdboot...
    echo.
    bcdboot C:\Windows /s %partition%
    goto menu

    )

    you have assumed osletter C. It might not be.
    Thanks I have edited it in the code, however I only worked on the diskpart section and just created the menu as a structure others can fill in with additional useful fixes. The diskpart section was the one troubling people in this thread. I myself wasted a bit of time before I found this thread, so hopefully it speeds up the process for others. It would be nice if others who have more experience with the other commands can weigh in. For example, some of those commands may not work with GPT, only with MBT. For example on MBT disks we would need a different approach that makes the recovery partition active with ID = 07 I believe. We could improve the script by better separating MBR and GPT based actions, to ensure the menus don't show inappropriate actions. It is so strange to me that even commercial software like Macrium, AOMEI, Minipartition Manafer, passfab, EasyRe don't have a good way of differentiating actions for GPT vs MBR. For example AOMEI doesn't allow setting a GUID, their ID setting only works for MBR. And in particular it is so surprising there is no good solution in the market to reconnect orphan recoveries to the boot record in a smart way by scanning the structure and automatically assigning with user confirmation...

    I already contacted those developers, but it may take a while until they integrate those suggestions. A more through and tidied up script would probably warrant its own thread and would probably be very useful.
      My Computer


  4. Posts : 4,594
    several
       #14
      My Computer


  5. Posts : 5
    Windows 10
       #15

    That's great, it doesn't seem to do the "agentc" but it has deep functionality. Wondering if it can add a boot entry to load a recovery partition that it itself creates (like Macrium does), and then lets you load its own img file from there, or if it can create its own recovery partitions instead of an image file. Will check in more details.
      My Computer


  6. Posts : 281
    Win 10 21H2 LTSC
       #16

    Have things changed?

    Code:
    DISKPART> detail partition
    
    Partition 1
    Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
    Hidden  : Yes
    Required: Yes
    Attrib  : 0X8000000000000001
    Offset in Bytes: 898086469632
    
      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
    * Volume 12    Y                RAW    Partition   1000 MB  Healthy    Hidden
    Looks good right? correct attrib and correct type,.

    However

    Code:
    R:\>REAGENTC.EXE /setreimage /path y:\Recovery\WindowsRE
    REAGENTC.EXE: The Windows RE image cannot be stored in the specified volume. Use the RETAIN command in DISKPART to prepare the volume and try again.
    Do I now run retain partition inside diskpart?
      My Computer


  7. Posts : 666
    WIN 10 19045.4291
       #17

    @Chrysalis

    FS=RAW!!
    =================================
    sel disk #
    sel par 1
    format quick fs=ntfs label="Recovery"
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001

    partition 1 for a Recovery? That's a long time ago
      My Computer


  8. Posts : 281
    Win 10 21H2 LTSC
       #18

    Pentagon said:
    @Chrysalis

    FS=RAW!!
    =================================
    sel disk #
    sel par 1
    format quick fs=ntfs label="Recovery"
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001

    partition 1 for a Recovery? That's a long time ago
    Same error, after formatting with NTFS and giving it Recovery label.

    The file system was left on raw before because no one ever listed formatting it as part of a list of commands to run not even Microsoft's own documentation.

    --

    I have now actually turned off recovery completely on my main system and hidden the update that patches it, seems the recovery system is finicky and fragile, given the amount of problem reports on the internet and I do have macrium rescue boot images.

    Out of 3 machines, 2 broke, and only 1 worked ok on the update.
      My Computer


 

  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 10:38.
Find Us




Windows 10 Forums