Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Windows 8.1 creates 2nd Recovery Partition

UEFI

  • Please log in to reply
4 replies to this topic

#1
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,852 posts
  • Joined 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Donator

If you have a computer with Windows 8 that was installed by an OEM on a GPT disk, the Windows 8.1 update from the Store will create a second recovery partition! Alternatively, if your OS is installed on an MBR disk, the 2nd partition is not created. This second partition is seen as a 350MB Recovery partition. For example a standard deployment of Windows 8 on GPT with recovery partition and diskpart:

 

DISKPART> list part
  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Recovery           300 MB  1024 KB
  Partition 2    System             100 MB   301 MB
  Partition 3    Reserved           128 MB   401 MB
  Partition 4    Primary             50 GB   529 MB
  Partition 5    Primary           5000 MB    50 GB

 

The above is outlined as:

Part 1 = WindowsRE (winre.wim)

Part 2 = BCD/boot file location

Part 3 = MSR

Part 4 = OS

Part 5 = Recovery Image (install.wim)

 

After the update to Windows 8.1, it will stick a new Recovery partition after the OS. Here is the new layout including details:

 

DISKPART> sel disk 0
 
Disk 0 is now the selected disk.
 
DISKPART> list part
 
  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Recovery           300 MB  1024 KB
  Partition 2    System             100 MB   301 MB
  Partition 3    Reserved           128 MB   401 MB
  Partition 4    Primary             50 GB   529 MB
  Partition 5    Recovery           350 MB    50 GB
  Partition 6    Primary           5000 MB    51 GB
 
DISKPART> sel part 1
 
Partition 1 is now the selected partition.
 
DISKPART> detail part
 
Partition 1
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : Yes
Required: No
Attrib  : 0X8000000000000000
Offset in Bytes: 1048576
 
  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 3         Windows RE   NTFS   Partition    300 MB  Healthy    Hidden
 
DISKPART> sel part 5
 
Partition 5 is now the selected partition.
 
DISKPART> detail part
 
Partition 5
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : Yes
Required: Yes
Attrib  : 0X8000000000000001
Offset in Bytes: 54401171456
 
  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 5                      NTFS   Partition    350 MB  Healthy    Hidden

 

The update goes through a checklist when updating:

 

2013-10-25 09:41:16, Info                  SP         F Suspend bitlocker if needed
2013-10-25 09:41:16, Info                  SP         S Boot WinPE
2013-10-25 09:41:16, Info                  SP         S Prepare SafeOS for rollback
2013-10-25 09:41:16, Info                  SP         S Set SafeOS boot entry as the default boot entry
2013-10-25 09:41:16, Info                  SP         S Cleanup safe OS mount directory
2013-10-25 09:41:16, Info                  SP         S Apply WIM file PathForNewOS, index 4 to C:\$WINDOWS.~BT\NewOS
2013-10-25 09:41:16, Info                  SP         S Set boot command %SYSTEMDRIVE%\$WINDOWS.~BT\Sources\SetupPlatform.exe /postoobe for phase 3
2013-10-25 09:41:16, Info                  SP         S Set boot command %SYSTEMDRIVE%\$WINDOWS.~BT\Sources\SetupPlatform.exe /presysprep for phase 0
2013-10-25 09:41:16, Info                  SP         S Set boot command %SYSTEMDRIVE%\$WINDOWS.~BT\Sources\SetupPlatform.exe /postsysprep for phase 1
2013-10-25 09:41:16, Info                  SP         S Set boot command %SYSTEMDRIVE%\$WINDOWS.~BT\Sources\SetupPlatform.exe /preoobe for phase 2
2013-10-25 09:41:16, Info                  SP         S Set entropy for C:\$WINDOWS.~BT\NewOS
2013-10-25 09:41:16, Info                  SP         S Add boot entry for C:\$WINDOWS.~BT\NewOS\WINDOWS. Locale = en-US
2013-10-25 09:41:16, Info                  SP         S Set OS Switch rollback checkpoint
2013-10-25 09:41:16, Info                  SP         S Backup the recovery partition to C:\$WINDOWS.~BT\Sources\RecoveryPartitionBackup
2013-10-25 09:41:16, Info                  SP         S Apply EAs for C:\$WINDOWS.~BT\NewOS
2013-10-25 09:41:16, Info                  SP         S Install Dynamic Updates
2013-10-25 09:41:16, Info                  SP         S Install Driver DU Updates
2013-10-25 09:41:16, Info                  SP         S Install OS updates (DU) to keep installation up-to-date
2013-10-25 09:41:16, Info                  SP         S Relocate OS from C:\$WINDOWS.~BT\NewOS to C:\
2013-10-25 09:41:16, Info                  SP         S Add boot entry for C:\WINDOWS. Locale = en-US
2013-10-25 09:41:16, Info                  SP         S Prepare the new OS for first boot
2013-10-25 09:41:16, Info                  SP         S Setup the recovery partition
2013-10-25 09:41:16, Info                  SP         S Orchestrate OS switch for NewOS with safe OS SafeOS and rollback OS ExternalRollback. DelayedSwitch: 0
2013-10-25 09:41:16, Info                  SP         S Copy log files from C:\$WINDOWS.~BT\Sources\Panther to C:\WINDOWS

 

Attached is selected entries from the setupact.log after the update, which shows some of the things that the update does. Things left out is when the update downloads and install.wim, mounts it with DISM, scans the existing OS for applicable drivers and packages and injects them, unmounts the image and them uses DISM to apply it to the hard drive.

 

Regarding the extra recovery partition, there does not seem to be a way to prevent it from happening. :(

Attached Files


MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg



How to remove advertisement from MSFN

#2
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,318 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

All your hard disk space are belong to us! :w00t:

 

jaclaz



#3
boostcraver

boostcraver
  • Member
  • 2 posts
  • Joined 26-October 14
  • OS:Windows 8.1 x64
  • Country: Country Flag

Just fixed this on my laptop.

 

Essentially you can just move the WinRE environment to the original Recovery Partition (Partition 1). 

 

Step Zero obviously is back up your entire system with clonezilla or something else nice.

 

First note the time stamps of WinRE.wim or other files everywhere:

c:\dir /ah c:\windows\system32\recovery

 

Backup your disk partition info:

diskpart>  list volume

diskpart>  list disk

diskpart>  select disk 0

diskpart>  select par 1

diskpart>  detail par

diskpart> select par 2

diskpart>  detail par

...

Until you have saved all the partition details.  You will use the GUID to make the Recovery partitions accessible.

select the old recovery partition

set id=07 # Many of the guides show to do this, but it didn't work for me.  My other system with Win8.1 Enterprise shows it as 07 hIdden, but my Win8.1 corporate OEM edition showed it differently... so try setting it as a GUID

OR

set id=GUID of a basic didks...

set id=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

 

Refer to this wiki for more info about GUIDs:  http://en.wikipedia....64-bit_versions

Now assign a drive letter for the old partition

select the volume for the old recovery partition

assign letter=o # O for Old

dir /ah

dir /s

Note time stamps of the old recovery folder and recovery files... probably from before you re-installed windows

Now make a new sub directory:

mkdir o:\Recoverynew\WinRE

now disable WinRE globally

reagentc /disable

Check the date / timestamp of any new files in c:\windows\system32\recovery... if it is brand new you can copy this one to the Old partition, or you will grab it from the "new recovery partition"

Now perform the same partition change to basic disk type to unhide and assign a drive letter (N) to the "new recovery" partition which you will be removing:

Either copy the WinRE.wim and its associated attributes (hidden, system) from the C: or the N: drive:\

 

Robocopy.exe C:\Windows\System32\Recovery\ O:\Recoverynew\WindowsRE\ Winre.wim /copyall /dcopy:t /move

 

Now re-set reagentc and re-enable it:

  1. Configure Win RE: reagentc /setreimage /path Q:\Recovery\WindowsRE
  2. Enable Win RE: reagentc /enable

(thanks:  http://www.sepago.de...nt-re-explained )

 

Kill the new partition... reboot and test

Then test winre environment by going to PC settings - Update and Recovery - Recovery - Advanced - Restart Now - Advanced - Advanced Command prompt...

Once you know that WinRE is working, go back to windows, and expand your Primary Partition.  That's why I had to do all the above.  I had the extra second recovery partition blocking my C: drive from being able to expand into some unused disk space (hey!  11G on a 250G SSD is worth it for all this).

 

Enjoy.


Edited by boostcraver, 26 October 2014 - 01:17 PM.


#4
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,852 posts
  • Joined 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Donator

select the old recovery partition
set id=07 # Many of the guides show to do this, but it didn't work for me.  My other system with Win8.1 Enterprise shows it as 07 hIdden, but my Win8.1 corporate OEM edition showed it differently... so try setting it as a GUID


Of course, Disk IDs like 07 are for MBR disks, not GPT. GPT uses GUIDs as you found out.

MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg


#5
boostcraver

boostcraver
  • Member
  • 2 posts
  • Joined 26-October 14
  • OS:Windows 8.1 x64
  • Country: Country Flag

Cool... thanks for that tidbit. 







Also tagged with one or more of these keywords: UEFI

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users