OEM Recovery Partition Creator for Windows

Discussion in 'MDL Projects and Applications' started by AnarethoS, Sep 11, 2010.

  1. robex

    robex MDL Novice

    Jul 29, 2009
    6
    0
    0
    Thanks for the info


    I tried with the last partition to , the problem is that the whole remaining partition is set as hidden , with the recovery image (whole 415 gb)

    i need the folowing structure:


    Rcovery tools 1gb
    System reserved 100mb
    Windows - 70gb
    Extra - 415 gb (remainig space)

    Can you help me?
     
  2. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    The recovery partition needs to be bigger then 1 gig...not even the OS is going to fit on that. lol Plus 70 gig for windows is real small. If you add office, other apps and updates it will consume that real fast.
     
  3. robex

    robex MDL Novice

    Jul 29, 2009
    6
    0
    0
    Ok, my mistake

    I wanted

    Hidden drive: Recovery tools 1gb
    Hidden drive: System reserved 100mb
    C drive: Windows - 100gb
    E drive: Extra - 380 gb (remainig space)
    Hidden drive: Recovery Image partition - 12GB

    Can you provide a working set of Settings file with the above layout? (for Windows 8 last partition)

    Greatly appreciate the help!
     
  4. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    I think you are confused on some things about this project. recovery tools are included into the recovery partition. 100 mb for system is very small and is not recommended by Microsoft. I dont think you can make the system hidden...AnarethoS will have to answer that one. I still say 100 gigs is small for windows once you install everything and get updates and such. I will advise you to talk with AnarethoS on all of this for you are going to have to edit a few files. I dont know if he will support it if you are going to adjust it to this degree. Lets wait for his response.
     
  5. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #2545 AnarethoS, Dec 12, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Hi everyone!

    I made some test and I confirm that Windows 8.1 does not like to have the recovery tools on the same partition as the recovery image. Although I could try to fix that, it will not be 100% clean and since the recovery process is supposed to be clean, I won't do it.

    So, for Windows 8/8.1, the new option will be to have 1 partition for the recovery tools and 1 partition for the recovery image.

    Microsoft recommend to have the recovery image partition as the last partition of the drive, but I found it may create problems when the end user resize its Windows partition which then change the partition number of the recovery image partition. Also, it was hard to adapt the scirpt to the different partition layout some of you are using (like Windows partition + Partition1 for data + Partition2 for other stuff, etc.).

    I have made a new version that I have to test prior releasing it. The partition layout for Windows 8/8.1 will then be the following :

    For MBR/BIOS
    Code:
    1 - Recovery Tools - NTFS - 1gb
    2 - Recovery Image - NTFS - 12gb
    3 - System partition - NTFS - 150mb
    4 - Windows partition - NTFS - Everything left on the drive
    

    For GPT/UEFI
    Code:
    1 - Recovery Tools - NTFS - 1gb
    2 - Recovery Image - NTFS - 12gb
    3 - System partition - FAT32 - 150mb
    4 - MSR partition - 128mb
    5 - Windows partition - NTFS - Everything left on the drive
    
    This way, you will be able to change the partition layout after the Windows partition without affecting the recovery process.

    BUT, this will remove the ability to delete the recovery image to reclaim it's space. Although on big HDD this should not be a problem, on smaller SSD, it could be a problem. If this is your case, you can then use the following partition scenario (old WIM on the last partition mode) :

    For MBR/BIOS
    Code:
    1 - Recovery Tools - NTFS - 1gb
    2 - System partition - NTFS - 150mb
    3 - Windows partition - NTFS - Everything left on the drive
    4 - Recovery Image - NTFS - Size you want (Rezising of partition 3 needed)
    

    For GPT/UEFI
    Code:
    1 - Recovery Tools - NTFS - 1gb
    2 - System partition - FAT32 - 150mb
    3 - MSR partition - 128mb
    4 - Windows partition - NTFS - Everything left on the drive
    5 - Recovery Image - NTFS - Size you want (Rezising of partition 4 needed)
    
    In this scenario, you will have to manually resize the Windows partition to create the recovery partition. No further playing with partition will be supported, but you will have the option to reclaim the unused space.


    I know it is not perfect, but it seems impossible to make a software that will please everyone and I think this new way may be the best for Windows 8/8.1


    I will let you know when the new version will be available.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    I also found out something about created the recovery partition...if the drive has an oem recovery partition locked , it will not be deleted and you will have two recovery partitons and your software will crash. This was on a HP which is known for locking the recovery and system partitions. I am writing zeros to the drive to wipe it clean and then will try again.
     
  7. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,008
    957
    90
    I don't know why MS can't include a resize option for there autounattend.xml. For a standard install it's easy enough to script shrinking then creating the recovery partition.
    It does get complicated for end users if they want "data" partitions too.

    It should be easy but it's not!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    In fact, M$ support "dynamic" size only for the last partition using the AutoUnattend.xml file. It is a problem in this scenario, since the last partition should be fixed size but the Windows partition should be dynamic.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    I tried to install win 8.1 mbr last partition and it failed at this point in the script:

    IF NOT EXIST %RECOVERYLETTER%:\ GOTO ERRORNOREC
    IF NOT EXIST %IMAGELETTER%:\ GOTO ERRORNOREC

    Which brings up:

    :ERRORNOREC
    CLS
    ECHO *******************************************
    ECHO Recovery partition not found.
    ECHO *******************************************
    ECHO Please check settings and try again.
    ECHO *******************************************

    I counldnt use this software. Just did a straight install for I had no choice.
     
  10. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60

    With the "WIM on the last parttion" for Window, it tried to resize the Windows partition to shrink it to have space for the recovery partition. If, for any reason, it was unab;e to shrink the Windows partition, it would failed.

    Anyway, I have made a few change in the new version. Please read the following post :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Ok. New version out.

    I have remove the "WiM on first partition" for Windows 8/8.1. The recovery image has its own partition, which is either the second partition of the drive (recommended settings) or the last of the drive (not recommended).

    If the recovery image is on the last partition, you can reclaim the used space after creation of a recovery media (USB). This can't be done if the recovery image is on the second partition.

    If the recovery image is on the last partition, you can't create new partition as this will change the partition number and make the recovery process unusable. If you plan to change the number of partition (by resizing the Windows partition), you should consider to use the version with the recovery image on the second partition.

    If you prefer to have the recovery image on the last partition, you can use the included AutoUnattend.xml file, but you will have to manually resize the last partition to have it of the good size OR you can manually create all your partition by hand.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    I am going to test the new version today on my friends computer...will report back with findings. Thanks again AnarethoS.

    Update: Bad news, it failed win 8.1 with this error (used recommended partition and xml file):
     
  13. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Can you tell me which version you used?
    - Recovery on second partition or on the last partition?
    - MBR or UEFI?

    Also, can you give me screen shoot of the available partition and volume using DISKPART?


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    Second partition which is recommended and MBR for second partition which is recommended. Also used the autounattend.xml for second partition recommended. I did nothing to the settings files (no editing). Unfortunately I cant test on his machine anymore for it has been two days and he wanted it up and running so I just did a straight install with no recovery partition. I cant blame him...he was jonzing for the net. lol

    Oh I also before trying to install, wrote zeros to drive to wipe it good and clean before hand so it had no partitions to begin with.
     
  15. RJOliver

    RJOliver MDL Novice

    Nov 27, 2013
    16
    0
    0
    I have a few systems i can test with if you would like. Did you just re upload it under the .16 alpha link on the first post?
     
  16. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    @RJOliver,
    That would be great....I cant test anymore on my friends computer. Yes on first post is the new version.
     
  17. RJOliver

    RJOliver MDL Novice

    Nov 27, 2013
    16
    0
    0
    Worked great. Used all recommended files. second partition, mbr, used the core install not Pro but that shouldn't matter. I'll mess with the dvd usb creator later next week, but it should be fine.
     
  18. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    @AnarethoS,
    I think I used the wrong boot files (think I used x64 bit boot files instead of the x86 that I needed). Would that create that error on previous page? If so, then that was what I did wrong. I created new ones and the next time I get a chance I will test again. Thanks RJOliver for testing...seeing your comment told me I did something wrong which was the wrong boot files I believed that caused my error.
     
  19. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    The Windows 8 boot files are required for DVD creation and recovery but not for partition based recovery or theusb recovery.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    I re-created the project again and going to install win 8.1 on my lappy on tuesday. I have tested in vmware and it captures image without issues. Tuesday evening I will report any findings.