Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having an issue regarding a disk imaging process.

  • To get the machine into it's initial state, I first run a simple DISKPART CLEAN, and then restart the machine.

.

  Diskpart
  sel disk 0
  clean
  exit
  • I then boot the machine into a Win-PE image, and make 3 partitions. One of which is a boot partition

.

Diskpart /s script.txt

with the following script.

Select Disk 0
clean
Create Partition Primary size=2000
Select Partition 1
format fs=fat Label="Boot" quick
assign letter=c
... create other partitions
  • I then apply a .wim image to the boot partition.

.

imagex /apply bootimg.wim 1 c:
.... image the rest of the partitions
  • Finally I use DISKPART to set the boot partition as the active partition.

.

Diskpart /s script.txt

with the following script.

Select Disk 0
Select Partition 1
active

When I follow these steps, I get the following error:

remove disks or other media 
press any key to restart

If I follow the exact same process a second, third, or fourth time, the machine boots successfully, but I would very much like to get the process to work the first time.

Does anyone have any idea what's going wrong here? I'm quite stumped.

share|improve this question
    
What happens when you mark the partition as active before applying the .wim image? All of the scripts that I can find for examples have all DiskPart commands done in one step. For example, in this TechNet article it shows all the DiskPart commands in one script, prior to the image being applied (scroll most of the way down the article to see the script). Make sure all of the formatting and drive letter commands are also being done at the same time. Please let us know if this helps. If not, please share the entire commands you use. –  WinOutreach4 Dec 3 '12 at 20:22
    
@WinOutreach4 Considering that it works the second time, I'm not so sure, but I'll try it out anyway. I'll tell you the results in around 30 minutes. –  Sam I am Dec 3 '12 at 20:25
    
That's what makes me think something is not happening correctly the first time. I'll keep this page open to see your response. –  WinOutreach4 Dec 3 '12 at 20:31
    
@WinOutreach4 exact same behavior –  Sam I am Dec 3 '12 at 20:43
    
Can you please list the exact commands you use? In the OP, you say you do a simple DISKPART CLEAN, but with diskpart you have to select the disk before using the clean command. You probably know what you are doing, but I'm just trying to make sure. –  WinOutreach4 Dec 3 '12 at 20:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.