Solved Need help reinstalling Windonws 8 from USB

This is likely a pointless question...

But if you don't mind, should I leave the .txt file's code untouched (if I want to leave the partition size the same as in the example of course) IE - I don't need to delete the pointers in your code? For example the annotations you put in the code to desribe the function of the line etc. Many thanks! :)



Comment lines start with REM (this is not case sensitive). The entire line will be ignored. REM stands for remark.

You can remove/edit comment lines or leave comment lines untouched.

Thank you for your help with this. Cheers! :)
 

My Computer

System One

  • OS
    Windows 8.1 Pro
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Acer Predator G3-605
    CPU
    Intel Core i7 4770 @ 3.4GHZ
    Motherboard
    Acer Predator
    Memory
    16GB DDR3 @ 798MHz
    Graphics Card(s)
    Nvidia GTX 770 2GB - Personally Overclocked
    Sound Card
    N/A
    Monitor(s) Displays
    Acer Pradator full HD LED 24''
    Screen Resolution
    1920 x 1080
    Hard Drives
    Corsair Neutron GTX 240 GB (Boot)
    2 TB Seagate
    PSU
    500W
    Case
    Acer Pradator G3-605
    Cooling
    All standard
    Keyboard
    Corsair Raptor K50 RGB
    Mouse
    Acer Optical Mouse
    Internet Speed
    40Mbps
    Browser
    Chrome
    Antivirus
    Bitdefender Windows 8 Security
Hi!

I have a problem when using genet's method. After running ApplyImage.bat it begins applying image until 57% done it says:

Code:
Error 1392

The file or directory is corrupted or unreadable.

The DISM log file can be found at X:\windows\Logs\DISM\dism.log
File not found - Winre.wim
0 File<s> copied
Boot files successfully created.
REAGENTC.EXE: No valid image found in the specified path.

Directory set to: \\?\GLOBALROOT\device\harddisk0\partition5\RecoveryImage

REAGENTC.EXE: Operation Successful.

Install-directories are separated in five pieces. Any advice to solve the problem?

I have Lenovo G505s laptop with Windows 8.1 preinstalled and I'd like to change a new hard drive on it.
 

My Computer

System One

  • OS
    Vista, Win8.1
Hi. Stumbled across this site/thread whilst coming to a halt swapping a HDD to SSD in my kids Toshiba Satellite / Win 8 laptop.

I created a Windows 8 Recovery USB, swapped out the old HDD (600gb), popped in the new Samsung SSD (120gb) and ran through the Win8 Reset PC process. Stopped at the error message "Unable to reset PC. A required drive partition is missing" - then found this thread (esp GENET process).

Keen to give it a whirl...however my Win8 Recovery USB has a single file named INSTALL.ESD in the SOURCES folder - not install.wim or multiple install.swm files.

Am I going to hit a brick wall straight away if the file type is not the same as in GENET's instructions?

Thanks all.
 

My Computer

System One

  • OS
    Windows 8
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satellite
The fix isn't working for me. I'm getting 'Diskpart was unable to open or read the script file, Make sure the file you specified exists'.

Any help much appreciated as this is currently driving me up the wall.

Thanks.
 

My Computer

System One

  • OS
    8
I'm getting 'Diskpart was unable to open or read the script file, Make sure the file you specified exists'.

diskpart /s D:\CreatePartitions.txt

Where D is a drive letter of your recovery USB flash drive.

You can use this at the command prompt to see what drive letters are in use: diskpart > list volume > exit
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    System Manufacturer/Model
    Lenovo G580
    CPU
    Intel Core i5-3230M
    Memory
    8 GB
    Graphics Card(s)
    Intel HD Graphics 4000
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender, standard user account
    Other Info
    UEFI firmware (BIOS) embedded Windows 8 product key.
I'm getting 'Diskpart was unable to open or read the script file, Make sure the file you specified exists'.

diskpart /s D:\CreatePartitions.txt

Where D is a drive letter of your recovery USB flash drive.

You can use this at the command prompt to see what drive letters are in use: diskpart > list volume > exit

Thanks mate. I had tried various drive letters except C: which it turned out to be.

Was having problems with the batch file part but it seems to be working now.

Many thanks for taking the time to post this info up :thumb:
 
Last edited:

My Computer

System One

  • OS
    8
When you try to refresh/reset your PC from the Windows 8 recovery USB flash drive.
- Refresh your PC: "The drive where Windows is installed is locked. Unlock the drive and try again."
- Reset your PC: "Unable to reset your PC. A required drive partition is missing."

The Windows 8 recovery USB flash drive do not re-create partitions on a hard disk or install Windows 8 to a blank hard disk.

You can manually create the required partitions (special GPT attributes are required beyond just the empty partitions) and manually restore using your Windows 8 recovery USB flash drive.

NOTE: Before you start, make sure that the sources folder contains *.swm files in the Windows 8 recovery USB flash drive (see screenshot below).

Why the USB boot media does not contain the install.wim image file?
- With GPT partitions only FAT32 can be used on the USB boot media.
- With FAT32 you can't put a file larger than ~4GB on the drive.

View attachment 41324

1.

Sample: Configure UEFI/GPT-Based Hard Drive Partitions by Using Windows PE and DiskPart

Save the following code as CreatePartitions.txt

- In this example, the recovery image partition size is 20480 MB (20 GB).

- In this example, the Windows RE tools partition size is 1000 MB. Do not reduce the size of the partition or you will receive error message "There is not enough space on the disk", when you run the batch file.

Code:
rem == CreatePartitions.txt ==
rem == These commands are used with DiskPart to
rem    create five partitions
rem    for a UEFI/GPT-based PC.
rem == Usage: diskpart /s ScriptFileName
rem == Example: diskpart /s D:\CreatePartitions.txt
rem ================================================
select disk 0
clean
convert gpt
rem == 1. Windows RE tools partition ===============
create partition primary size=1000
format quick fs=ntfs label="Windows RE tools"
assign letter="T"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
rem == 2. System partition =========================
create partition efi size=260
format quick fs=fat32 label="System"
assign letter="S"
rem == 3. Microsoft Reserved (MSR) partition =======
create partition msr size=128
rem == 4. Windows partition ========================
rem ==    a. Create the Windows partition ==========
create partition primary 
rem ==    b. Create space for the recovery image ===
shrink minimum=20480
rem       ** NOTE: Update this size to match the size
rem                of the recovery image           **
rem ==    c. Prepare the Windows partition ========= 
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 5. Recovery image partition ================
create partition primary
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
exit

2.

Samples: Applying Windows, System, and Recovery Partitions by using a Deployment Script

Save the following code as ApplyImage.bat

- In this example, the image file is *.swm (install.swm, install2.swm, install3.swm, etc.)
- In this example, the recovery image path is R:\RecoveryImage

Code:
@echo off
rem == ApplyImage.bat ==
rem == These commands copy the selected image file to
rem    predefined hard disk partitions on a UEFI-based computer.

rem == Usage: ApplyImage.bat WimFileName
rem == Example: D:\ApplyImage D:\sources\*.swm

rem === Copy the image to the recovery image partition =======================
md R:\RecoveryImage
xcopy %1 R:\RecoveryImage\

rem === Apply the image to the Windows partition =============================
dism /Apply-Image /ImageFile:R:\RecoveryImage\install.swm /SWMFile:R:\RecoveryImage\install*.swm /Index:1 /ApplyDir:W:\
rem === dism /Apply-Image /ImageFile:R:\RecoveryImage\install.wim /Index:1 /ApplyDir:W:\

rem === Copy the Windows RE Tools to the Windows RE Tools partition ==========
md T:\Recovery\WindowsRE
copy W:\windows\system32\recovery\winre.wim T:\Recovery\WindowsRE\winre.wim

rem === Copy boot files from the Windows partition to the System partition ===
bcdboot W:\Windows

rem === Register the location of the recovery tools ==========================
W:\Windows\System32\reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows

rem === Register the location of the push-button reset recovery image ========
W:\Windows\System32\reagentc /setosimage /path R:\RecoveryImage /target W:\Windows /index 1

3.

Copy CreatePartitions.txt and ApplyImage.bat into the root dir of your recovery USB flash drive.

4.

Boot to the System Recovery Options screen using your recovery USB flash drive and select:

- Troubleshoot > Advanced options > Command Prompt

5.

Run the Diskpart script.

Warning: This will completely deletes all data contained on the Disk 0

diskpart /s D:\CreatePartitions.txt

Where D is a drive letter of your recovery USB flash drive.

6.

Run the ApplyImage.bat batch file.

D:\ApplyImage D:\sources\*.swm

Where D is a drive letter of your recovery USB flash drive.

7.

Once everything is done, remove your recovery USB flash drive, close command prompt window and select "Continue - Exit and continue to Windows 8".

8.

Once you finished the Windows installation, you can check the information of the Recovery Environment (see screenshot below).

In the elevated command prompt, type: reagentc /info

View attachment 41325

You can also type commands: diskpart > select disk 0 > list partition (see screenshot below).

View attachment 41326

View attachment 41327

Thank you very much for your reply, I have followed these steps up to step 8 and it has successfully booted into Windows.
Thanks a lot, you're a real life saver.

I just have one question - When running the .bat file, after it had finished applying the image it came up saying that W:\windows\system32\recovery\winre.wim does not exist, is this normal or should I be worried?

When I run reagentc /info it says "Windows RE status: Disabled"

md R:\RecoveryImage
xcopy %1 R:\RecoveryImage\

It's giving me error:
"File not found - %1
0 File copied"

I have .swm files in usb.
Any solution plz?
 

My Computer

System One

  • OS
    Windows 8.1
md R:\RecoveryImage
xcopy %1 R:\RecoveryImage\

It's giving me error:
"File not found - %1
0 File copied"

I have .swm files in usb.
Any solution plz?

Not a definite answer but I had issues with another system since my post above and none of this worked. It was because it hadn't copied to the USB properly, so it could be worth you creating your usb recovery drive again.
 

My Computer

System One

  • OS
    8
hi all
new on forum i tried the recovery process as described in post 13 everythig complets the image get applied winre.wim file copied successfully then i get error : failure when attepting to copy boot files.
i cant boot to install win 8

any help appreciated please

Eggie
 

My Computer

System One

  • OS
    win 8
    Computer type
    PC/Desktop
    System Manufacturer/Model
    hp 23 envy recline
    CPU
    i5
    Memory
    8gb
i cant boot to install win 8

How to download and clean install Windows 8.1 if you have an OEM computer with UEFI firmware (BIOS) embedded Windows 8/8.1 product key. -> link
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    System Manufacturer/Model
    Lenovo G580
    CPU
    Intel Core i5-3230M
    Memory
    8 GB
    Graphics Card(s)
    Intel HD Graphics 4000
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender, standard user account
    Other Info
    UEFI firmware (BIOS) embedded Windows 8 product key.
i cant boot to install win 8

How to download and clean install Windows 8.1 if you have an OEM computer with UEFI firmware (BIOS) embedded Windows 8/8.1 product key. -> link

Hi Genet
Thanks for reply i worked it out yesterday late in night that i needed to enable secure boot in bios. I did that and got boot files and got windows installed from recovery backup but it isnt the one i had when pc came new. Only have 4 tiles in home screen and i still cant do recovery from F11 key original key for recovery for some reason recovery tile missing altogether i only have option for Refresh ,Repair, System Restore or Continue to windows as before i had and extra tile saying Recovery manager. I follwed post 13 very closely i had original recovery partition intact i still do but cant use it. When i boot up and press F11 the win logo comes and then after 6 seconds or so go back into windows screen. What i need is somehow to go into recovery so can restore back to factory but its not happewning at all i had 32 .swm files a total of 16GB in recovery partition but when used post 13 to recover from partition it just dint restore to factory instead i got at lot less software installed even i used another win 8 i would havr]e got alot software in way microsoft tiles in homescreen at moment only have 4 tiles Desktop, File Explorer, Internet Explorer, and Windows Store.

Very baffled any help appreciated please.

Thanks
Eggie
 

My Computer

System One

  • OS
    win 8
    Computer type
    PC/Desktop
    System Manufacturer/Model
    hp 23 envy recline
    CPU
    i5
    Memory
    8gb
Back
Top