I have a Windows 7 USB bootup disk that I am using to write wim images to a standard Intel PC - a new PC.
The batch file applyimage.bat runs the following commands:
DISKPART /s WipeDisk.txt
ImageX /apply imagefile.wim 1 c:\
bcdedit /set {default} device partition=c:
bcdedit /set {default} osdevice partition=c:
bcdedit /set {bootmgr} device partition=c:
and the text file WipeDisk.txt contains:
SELECT DISK 0
CLEAN
CREATE PARTITION PRIMARY
FORMAT QUICK FS=NTFS LABEL="Windows"
ACTIVE
ASSIGN LETTER="C"
When I run the batch file I get this output:
E:\>applyimage.bat
E:\>DISKPART /s WipeDisk.txt
Microsoft DiskPart version 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: MININT-135E5ES
Disk 0 is now the selected disk.
DiskPart succeeded in cleaning the disk.
DiskPart succeeded in creating the specified partition.
100 percent completed
DiskPart successfully formatted the volume.
DiskPart marked the current partition as active.
DiskPart successfully assigned the drive letter or mount point.
E:\>ImageX /apply imagefile.wim 1 c:\
ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385
[ 100% ] Applying progress
Successfully applied image.
Total elapsed time: 8 min 22 sec
E:\>bcdedit /set {default} device partition=c:
The boot configuration data store could not be opened.
The system cannot find the file specified.
E:\>bcdedit /set {default} osdevice partition=c:
The boot configuration data store could not be opened.
The system cannot find the file specified.
E:\>bcdedit /set {bootmgr} device partition=c:
The boot configuration data store could not be opened.
The system cannot find the file specified.
E:\>
When I reboot the PC I get this error:
BOOTMGR is missing
Press Ctrl+Alt+Del to restart
How can I fix this?
And how do I fix the initial error in the applyimage.bat file?
UPDATE: If I remove the 3 bcdedit lines and replace with:
bcdboot C:\Windows
it does seem to work.
I am concerned though that I don't understand the implications of making that change. And why I suddenly need it for a new PC - which is just an upgrade from the old one.
The bcdedit lines worked on an Advantech UNO-2184G (probably 4-5 years old) but not on the new Advantech UNO-2484G.