New
#11
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.
DiskGenius: Data Recovery, Partition Manager, Backup & Disk Utilities
free version works fine
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.
Have things changed?
Looks good right? correct attrib and correct type,.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
However
Do I now run retain partition inside diskpart?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.
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.