Solved Need help reinstalling Windonws 8 from USB

onefourone

New Member
Messages
6
Hi guys,

I am in a bit of a dilemma and am pulling my hair out trying to get this to work.

I recently purchased an Asus X551 laptop with Windows 8 but straight the way uninstalled Windows 8 and installed Ubuntu (after creating a Windows 8 recovery drive just in case). I have since decided that I want Windows 8 back as I have found that I cannot use a lot of software on Linux. The laptop did not come with any form of recovery disk or installation disk, the only reminent of Windows 8 I have is the recovery USB that I created from within the OS.

When I plug in the USB and boot from it it brings up the recovery menu with options to reset the PC but when I click it it says something like - "Unable to reset PC. A required partition is missing".

I could really do with some help on this, I have posted of on the Ubuntu forum but they aren't being very helpful since I am uninstalling Ubuntu.

Any help would be masively appreciated.

Thanks a lot.
 

My Computer

System One

  • OS
    Windows 8
    Computer type
    Laptop
For the installation, you need a Windows 8 .iso or an installatio disc or an image (which you should have made before gutting it). There were links on the web but they were removed. Maybe you can get it from a friend or from the manufacturer of your PC (usually at a small charge)

Btw: did you try to run windows programs with Wine in Ubuntu ?
 

My Computer

System One

  • OS
    Vista and Win7
    System Manufacturer/Model
    2xHP, 2xGateway, 1xDell, 1xSony
    Hard Drives
    5 SSDs and 12 HDs
Thanks for the reply. I thought that the recovery disk was equivalent to an image of the OS but clearly I was wrong. I haven't tried Wine with the exception of a Netflix app which uses it. I wanted to be able to use the laptop to watch Netflix (which works), Amazon Instant Video (Which I can't get to work) and Photoshop CS6, I will look in to getting this running in Ubuntu. Ideally I would like to have windows as my primary OS but also have Ubuntu on a small partition. I will get in touch with the manufacturer tomorrow to see if I can get my hands on an installation disk and my serial key since there is no sticker on the laptop.

Again, thanks for the reply.
 

My Computer

System One

  • OS
    Windows 8
    Computer type
    Laptop
Your Windows 8 product key is stored in the BIOS. You don't have to worry about that. The key does not go away.
 

My Computer

System One

  • OS
    Vista and Win7
    System Manufacturer/Model
    2xHP, 2xGateway, 1xDell, 1xSony
    Hard Drives
    5 SSDs and 12 HDs
See if you can get a recovery disc form the manufacturer?
 

My Computer

System One

  • OS
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Lenovo IdeaCenter K450
    CPU
    Intel Quad Core i7-4770 @ 3.4Ghz
    Motherboard
    Lenovo
    Memory
    16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
    Graphics Card(s)
    Intel Integrated HD Graphics
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    HP h2207
    Screen Resolution
    1680x1050@59Hz
    Hard Drives
    250GB Samsung EVO SATA-3 SSD;
    2TB Seagate ST2000DM001 SATA-2;
    1.5TB Seagate ST3150041AS SATA
    PSU
    500W
    Keyboard
    Wired USB
    Mouse
    Wired USB
    Internet Speed
    3GB Up, 30GB Down
    Browser
    SeaMonkey
    Antivirus
    Windows Defender; MBAM Pro
    Other Info
    UEFI/GPT
    PLDS DVD-RW DH16AERSH
What a rip off though, $50 ....
 

My Computer

System One

  • OS
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Lenovo IdeaCenter K450
    CPU
    Intel Quad Core i7-4770 @ 3.4Ghz
    Motherboard
    Lenovo
    Memory
    16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
    Graphics Card(s)
    Intel Integrated HD Graphics
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    HP h2207
    Screen Resolution
    1680x1050@59Hz
    Hard Drives
    250GB Samsung EVO SATA-3 SSD;
    2TB Seagate ST2000DM001 SATA-2;
    1.5TB Seagate ST3150041AS SATA
    PSU
    500W
    Keyboard
    Wired USB
    Mouse
    Wired USB
    Internet Speed
    3GB Up, 30GB Down
    Browser
    SeaMonkey
    Antivirus
    Windows Defender; MBAM Pro
    Other Info
    UEFI/GPT
    PLDS DVD-RW DH16AERSH

My Computer

System One

  • OS
    ME, XP,Vista,Win7,Win8,Win8.1
    Computer type
    PC/Desktop
    Other Info
    Notebooks x 3

    Desktops x 5

    Towers x 4
I got mine free from Lenovo after calling them about not being able to boot the Recovery flash drive I created with their software. Turned out to be my problem in not setting the BIOS (EFI) correctly but hey, I got the free DVD :)
 

My Computer

System One

  • OS
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Lenovo IdeaCenter K450
    CPU
    Intel Quad Core i7-4770 @ 3.4Ghz
    Motherboard
    Lenovo
    Memory
    16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
    Graphics Card(s)
    Intel Integrated HD Graphics
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    HP h2207
    Screen Resolution
    1680x1050@59Hz
    Hard Drives
    250GB Samsung EVO SATA-3 SSD;
    2TB Seagate ST2000DM001 SATA-2;
    1.5TB Seagate ST3150041AS SATA
    PSU
    500W
    Keyboard
    Wired USB
    Mouse
    Wired USB
    Internet Speed
    3GB Up, 30GB Down
    Browser
    SeaMonkey
    Antivirus
    Windows Defender; MBAM Pro
    Other Info
    UEFI/GPT
    PLDS DVD-RW DH16AERSH
I have contacted ASUS and they recommended that I purchase a recovery disk however the recovery disk for my product isn't available on their website so they instead want me to send my laptop off to be repaired which I will likely have to pay for anyway because technically it was my fault. I don't want to send it off for repair, is there any other way I can get windows back on my laptop? Like I said in the original post, I have a recovery drive that I made, surely I can do something with this?
 

My Computer

System One

  • OS
    Windows 8
    Computer type
    Laptop
NOTE: 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

NOTE: Here is info about reagentc /info -> link

How to install Windows 8 to a blank hard drive from the Windows 8 recovery USB flash drive.

If you have created a Windows 8 recovery USB flash drive by selecting the option "Copy the recovery partition from the PC to the recovery drive" (see screenshot below).

Create a recovery drive.png

Normally, you do not need to change the UEFI firmware (BIOS) settings. For example, you do not need to change the boot order of drives, or disable Secure Boot, or enable Legacy BIOS (aka CSM) boot mode. But on some computers, you may need to enable the boot menu before you can access it.

- Connect your Windows 8 recovery USB flash drive.
- Restart the computer.
- Press the correct key to enter the boot menu (see this link for help). Or, if you have a Lenovo computer, you can also press the NOVO button when the computer is turned off and then select "Boot Menu".
- Select your USB flash drive from the boot menu.
- Select your language and keyboard layout (if displayed).
- Select the "Troubleshoot" option.
- Select the Reset your PC option.

When you see the question "Do you want to repartition the drives on your PC? All your files will be removed." (see screenshot below), click on "Yes, repartition the drives".

Do you want to repartition the drives on your PC.png

But if you receive the following error message: "Unable to reset your PC. A required drive partition is missing." or "Unable to reset your PC. The system drive cannot be found.", then the Windows 8 recovery USB flash drive is not able to automatically install Windows 8 to a blank hard drive.

Unable to reset your PC. A required drive partition is missing.png

Unable to reset your PC. The system drive cannot be found.png

What should I do if the Reset your PC option not work?

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.

View at the link below "5.1 Create a DiskPart script" and "5.2 Create the deployment script".

Step-by-Step: Windows 8 Deployment for IT Professionals

This tutorial is only for Windows 8 64-bit (not for 32-bit).

NOTE: For some reason, the ApplyImage.bat (a batch file line: dism /Apply-Image...) is not working as it should on all Windows 8 OEM computers and that's when the installation fails.

Open the sources folder on the Windows 8 recovery USB flash drive, and you can see either the install.wim image file or the split image files: Install.swm, Install2.swm, Install3.swm, etc.

Why the Windows 8 recovery USB flash drive does not always contains 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.

Recovery USB flash drive 1.png

1.

The Windows RE tools partition size is 1000 MB. Do not decrease the Windows RE tools partition size or you will receive the error message "There is not enough space on the disk", when you run the ApplyImage.bat batch file.

The recovery image partition size is 20480 MB (20 GB). NOTE: You can decrease the recovery image partition size. For example, you can use 4000 instead of 20480 for the recovery image partition, if your Windows 8 recovery USB flash drive contains the install.wim image file.

Save the following code as CreatePartitions.txt

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
rem ================================================
list volume
exit

2.

> OPTION ONE <

The sources folder contains the split image files: Install.swm, Install2.swm, Install3.swm, etc.

Save the following code as ApplyImage.bat

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 == Example: D:\ApplyImage D:\sources\install.wim

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

rem == Apply the image to the Windows partition =============================
rem == OPTION 1. The split image files: Install.swm, Install2.swm, Install3.swm, etc.
dism /Apply-Image /ImageFile:R:\RecoveryImage\install.swm /SWMFile:R:\RecoveryImage\install*.swm /Index:1 /ApplyDir:W:\
rem == OPTION 2. The install.wim image file.
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
xcopy /h W:\Windows\System32\Recovery\Winre.wim T:\Recovery\WindowsRE\

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

> OPTION TWO <

The sources folder contains the install.wim image file.

Save the following code as ApplyImage.bat

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 == Example: D:\ApplyImage D:\sources\install.wim

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

rem == Apply the image to the Windows partition =============================
rem == OPTION 1. The split image files: Install.swm, Install2.swm, Install3.swm, etc.
rem == dism /Apply-Image /ImageFile:R:\RecoveryImage\install.swm /SWMFile:R:\RecoveryImage\install*.swm /Index:1 /ApplyDir:W:\
rem == OPTION 2. The install.wim image file.
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
xcopy /h W:\Windows\System32\Recovery\Winre.wim T:\Recovery\WindowsRE\

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 to the root directory of your recovery USB flash drive (see screenshot below).

Recovery USB flash drive 2.png

4.

Start the computer from the Windows 8 recovery USB flash drive and select Troubleshoot > Advanced options > Command Prompt (see screenshot below).

Command Prompt.png

5.

Warning: This will completely deletes all data contained on the primary hard drive.

Run the Diskpart script.

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

Run the Diskpart script.png

6.

Run the ApplyImage.bat batch file.

NOTE: If you receive the error message "File not found - Winre.wim" when you run the ApplyImage.bat batch file, then you should be able to install Windows 8, but refresh and reset does not work.

> OPTION ONE <

If the sources folder contains the split image files with a .swm extension, then run the following command.

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

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

ApplyImage.bat - The split image files.png

> OPTION TWO <

If the sources folder contains the install.wim image file, then run the following command.

D:\ApplyImage D:\sources\install.wim

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

ApplyImage.bat - The install.wim image file.png

7.

Once everything is done, remove your recovery USB flash drive, close the Command Prompt window and select Continue - Exit and continue to Windows 8 (see screenshot below). The installation of Windows 8 will begin.

Continue - Exit and continue to Windows 8.png

8.

Once you finished the Windows installation, you can verify the Windows RE information (see screenshot below).

In the elevated command prompt, type: reagentc /info

Windows RE info.png

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

Partition 1: Recovery 1000 MB - Windows recovery environment (Windows RE) tools
Partition 2: System 260 MB - EFI system. Boot loader program, drivers used by firmware at boot time, etc.
Partition 3: Reserved 128 MB - Microsoft Reserved (MSR)
Partition 4: Primary - Windows 8 installation partition. The partition size will depend on the size of your hard drive.
Partition 5: Recovery 20 GB - Recovery image

List partition.png

NOTE: The MSR (Reserved) 128 MB partition is not visible within Disk Management utility, but it is listed with command line utility (diskpart).

Disk Management.png

NOTE: Before upgrade to Windows 8.1 from the Windows Store, you do not need to install all Windows 8 updates from Windows Update. You only need to install KB2871389 update, then you’ll be able to install the Windows 8.1 update via the Windows Store. Download and install KB2871389 update from link or from Windows Update.

KB2871389 (direct download link)
- All supported x86-based versions of Windows 8: http://download.microsoft.com/downl...5E-794177982162/Windows8-RT-KB2871389-x86.msu
- All supported x64-based versions of Windows 8: http://download.microsoft.com/downl...49-140AB1CF7B5F/Windows8-RT-KB2871389-x64.msu

But if you've opened the Windows Store and you don't see the Windows 8.1 update, then you will need to also install KB2917499 update.
 
Last edited:

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.
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"
 

My Computer

System One

  • OS
    Windows 8
    Computer type
    Laptop
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?

I don't know what is wrong with it. I didn't get any error messages when I run the script and batch file.

But if you got an error message "There is not enough space on the disk" (when you run the batch file), then the Windows RE tools partition size (1000 MB) is too small.

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

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

This only mean that you can't refresh/reset your computer, but everything else is fine.
 

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.
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?

I don't know what is wrong with it. I didn't get any error messages when I run the script and batch file.

But if you got an error message "There is not enough space on the disk" (when you run the batch file), then the Windows RE tools partition size (1000 MB) is too small.

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

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

This only mean that you can't refresh/reset your computer, but everything else is fine.

I both of the files untouched, I left that value at 1000 MB. When I look in disk management it shows exactly the same as the last 2 screenshots in your guide. Do you think this is something I should worry about or is it okay?

I'm going to start updating to 8.1 etc and get all of my programs installed.

Thanks again for your help, I greatly appreciate it!
 

My Computer

System One

  • OS
    Windows 8
    Computer type
    Laptop
Do you think this is something I should worry about or is it okay?

This only mean that you can't refresh/reset your computer, but don't worry about that, because the computer otherwise works correctly.
 

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.
How do you install Windows 8 to a blank hard disk from the Windows 8 recovery USB flash drive?

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.

View at the link below "5.1 Create a DiskPart script" and "5.2 Create the deployment script".

Step-by-Step: Windows 8 Deployment for IT Professionals

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 Windows 8 recovery USB 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.

Save the following code as CreatePartitions.txt

- In this example, the recovery image partition size is 20480 MB (20 GB). You can decrease or increase the partition size.
- In this example, the Windows RE tools partition size is 1000 MB. Do not decrease the partition size or you will receive error message "There is not enough space on the disk", when you run the ApplyImage.bat 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.

Save the following code as ApplyImage.bat

- In this example, the image file is *.swm (install.swm, install2.swm, install3.swm, etc.)

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
xcopy /h W:\Windows\System32\Recovery\Winre.wim T:\Recovery\WindowsRE\

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 verify the Windows RE information (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).

Partition 1: Recovery 1000 MB - Windows recovery environment (Windows RE) tools
Partition 2: System 260 MB - EFI system. Boot loader program, drivers used by firmware at boot time, etc.
Partition 3: Reserved 128 MB - Microsoft Reserved (MSR)
Partition 4: Primary - Windows 8 installation partition. The partition size will depend on the size of your hard disk.
Partition 5: Recovery 20 GB - Recovery image

View attachment 41326

Note: The Reserved (128 MB) partition is not visible within Windows Disk Management GUI-control utility, but it is listed with command line utility (diskpart).

View attachment 41327

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! :)
 

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
By the way, ingenious workaround.
 

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
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.
 

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.
Back
Top