Zyratastic Windows 8 factory reset log: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 72: Line 72:


<source lang=bash>
<source lang=bash>
X:\windows\system32>dism /apply-image /imagefile:r:\RecoveryImage\Install.wim /index=2 /applydir:c:\
dism /apply-image /imagefile:r:\RecoveryImage\Install.wim /index=2 /applydir:c:\


# Deployment Image Servicing and Management tool
# Deployment Image Servicing and Management tool

Revision as of 21:44, 12 July 2014

This is the complete history log of the operations done to do a factory reset of the ASUS.

State before reset: - Recovery and restore partition present - GPT partition table as on 1st day

  • Start a command prompt via Windows 8 recovery drive (usb stick)
  • First start diskpart to reset and format the EFI and WINDOWS partitions (labelled SYSTEM and OS):
diskpart

# Microsoft DiskPart version 6.3.9600
# 
# Copyright (C) 1999-2013 Microsoft Corporation.
# On computer: MININT-LGVR6G1
  • In diskpart:
sel disk 0
list vol

#  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
#  ----------  ---  -----------  -----  ----------  -------  ---------  --------
#  Volume 0     F                       DVD-ROM         0 B  No Media
#  Volume 1     C   OS           NTFS   Partition    188 GB  Healthy
#  Volume 2     D   DATA         NTFS   Partition    180 GB  Healthy
#  Volume 3         SYSTEM       FAT32  Partition    300 MB  Healthy    Hidden
#  Volume 4         Recovery     NTFS   Partition    900 MB  Healthy    Hidden
#  Volume 5         Restore      NTFS   Partition     20 GB  Healthy    Hidden
#  Volume 6     E   RECOVERY     FAT32  Removable    960 MB  Healthy
#  Volume 7     G   NXP          FAT    Removable    249 MB  Healthy

sel vol 3
format quick fs=fat32 label=SYSTEM
assign letter s

sel vol 1
format quick fs=ntfs label=OS
assign letter c

sel vol 4
assign letter t
# Optionally, set again id and attributes. Should not be necessary.
# set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
# gpt attributes=0x8000000000000001

sel vol 5
assign letter r
# Optionally, set again id and attributes. Should not be necessary.
# set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
# gpt attributes=0x8000000000000001

list vol

#  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
#  ----------  ---  -----------  -----  ----------  -------  ---------  --------
#  Volume 0     F                       DVD-ROM         0 B  No Media
#  Volume 1     C   OS           NTFS   Partition    188 GB  Healthy
#  Volume 2     D   DATA         NTFS   Partition    180 GB  Healthy
#  Volume 3     S   SYSTEM       FAT32  Partition    300 MB  Healthy    Hidden
#  Volume 4     T   Recovery     NTFS   Partition    900 MB  Healthy    Hidden
#* Volume 5     R   Restore      NTFS   Partition     20 GB  Healthy    Hidden
#  Volume 6     E   RECOVERY     FAT32  Removable    960 MB  Healthy
#  Volume 7     G   NXP          FAT    Removable    249 MB  Healthy

exit
  • Now apply the windows image from the Restore partition, rebuild the EFI partition (BCD), and set some windows restore hooks:
dism /apply-image /imagefile:r:\RecoveryImage\Install.wim /index=2 /applydir:c:\

# Deployment Image Servicing and Management tool
# Version: 6.3.9600.16384
# 
# Applying image
# [==========================100.0%==========================]
# The operation completed successfully.

# Optional (not done because image was already present and same size, so likely identical)
# md T:\Recovery\WindowsRE
# copy C:\Windows\System32\Recovery\winre.wim T:\Recovery\WindowsRE\

bcdboot C:\Windows /s S: /l fr-FR /f ALL
# Boot files successfully created.

bcdedit

# Windows Boot Manager
# --------------------
# identifier              {bootmgr}
# device                  partition=S:
# path                    \EFI\Microsoft\Boot\bootmgfw.efi
# description             Windows Boot Manager
# locale                  fr-FR
# inherit                 {globalsettings}
# default                 {default}
# resumeobject            {26accdf9-09ef-11e4-8849-9baf0a666ddf}
# displayorder            {default}
# toolsdisplayorder       {memdiag}
# timeout                 30
# 
# Windows Boot Loader
# -------------------
# identifier              {default}
# device                  partition=C:
# path                    \Windows\system32\winload.efi
# description             Windows 8
# locale                  fr-FR
# inherit                 {bootloadersettings}
# isolatedcontext         Yes
# allowedinmemorysettings 0x15000075
# osdevice                partition=C:
# systemroot              \Windows
# resumeobject            {26accdf9-09ef-11e4-8849-9baf0a666ddf}
# nx                      OptIn
# bootmenupolicy          Standard
# detecthal               Yes

bcdedit /export s:\EFI\Microsoft\Boot\BCD.001
dir

#  Volume in drive S is SYSTEM
#  Volume Serial Number is 98DD-3C53
# 
#  Directory of S:\EFI\Microsoft\Boot
# 
# 12/07/2014  18:05    <DIR>          .
# 12/07/2014  18:05    <DIR>          ..
# 12/07/2014  18:05    <DIR>          bg-BG
# 27/06/2012  02:05             4,186 boot.stl
# 26/04/2013  07:13         1,354,472 bootmgfw.efi
# 26/04/2013  07:13         1,350,888 bootmgr.efi
# 12/07/2014  18:05    <DIR>          cs-CZ
# 12/07/2014  18:05    <DIR>          da-DK
# 12/07/2014  18:05    <DIR>          de-DE
# 12/07/2014  18:05    <DIR>          el-GR
# 12/07/2014  18:05    <DIR>          en-GB
# 12/07/2014  18:05    <DIR>          en-US
# 12/07/2014  18:05    <DIR>          es-ES
# 12/07/2014  18:05    <DIR>          et-EE
# 12/07/2014  18:05    <DIR>          fi-FI
# 12/07/2014  18:05    <DIR>          fr-FR
# 12/07/2014  18:05    <DIR>          hr-HR
# 12/07/2014  18:05    <DIR>          hu-HU
# 12/07/2014  18:05    <DIR>          it-IT
# 12/07/2014  18:05    <DIR>          ja-JP
# 12/07/2014  18:05    <DIR>          ko-KR
# 12/07/2014  18:05    <DIR>          lt-LT
# 12/07/2014  18:05    <DIR>          lv-LV
# 26/07/2012  04:57         1,263,856 memtest.efi
# 12/07/2014  18:05    <DIR>          nb-NO
# 12/07/2014  18:05    <DIR>          nl-NL
# 12/07/2014  18:05    <DIR>          pl-PL
# 12/07/2014  18:05    <DIR>          pt-BR
# 12/07/2014  18:05    <DIR>          pt-PT
# 12/07/2014  18:05    <DIR>          qps-ploc
# 12/07/2014  18:05    <DIR>          ro-RO
# 12/07/2014  18:05    <DIR>          ru-RU
# 12/07/2014  18:05    <DIR>          sk-SK
# 12/07/2014  18:05    <DIR>          sl-SI
# 12/07/2014  18:05    <DIR>          sr-Latn-CS
# 12/07/2014  18:05    <DIR>          sv-SE
# 12/07/2014  18:05    <DIR>          tr-TR
# 12/07/2014  18:05    <DIR>          uk-UA
# 12/07/2014  18:05    <DIR>          zh-CN
# 12/07/2014  18:05    <DIR>          zh-HK
# 12/07/2014  18:05    <DIR>          zh-TW
# 12/07/2014  18:05    <DIR>          Fonts
# 12/07/2014  18:05    <DIR>          Resources
# 12/07/2014  18:25            24,576 BCD
# 12/07/2014  18:25            24,576 BCD.001
#                6 File(s)      4,022,554 bytes
#               39 Dir(s)     265,740,288 bytes free

bcdedit /import BCD /clean
# The operation completed successfully.

c:\windows\system32\ReAgentc.exe /setosimage /path R:\RecoveryImage /target C:\Windows /index 2
# Directory set to: \\?\GLOBALROOT\device\harddisk0\partition6\RecoveryImage
#
# REAGENTC.EXE: Operation Successful.

c:\windows\system32\ReAgentc.exe /setreimage /path T:\Recovery\WindowsRE /target C:\Windows
# Directory set to: \\?\GLOBALROOT\device\harddisk0\partition2\Recovery\WindowsRE
# 
# REAGENTC.EXE: Operation Successful.