Jump to content

Combining WinPE and Unattended?


deaconf19

Recommended Posts

I have a unattended DVD that works great. the only problem is I need to setup different partitions, from what I read I need to use diskpart to do this before the system starts to load. I haven't messed around with a windowPE before so I am not too sure on what I should do to achieve this.

How do I get the WindowsPE to load first then create the partitions then have the unattended portion kick off next?

Thanks for any help in advance.

Link to comment
Share on other sites


I think you'll need a wrapper to detect the hardware configuration and launch the appropriate setup. Or instead of detection you could have a choice option. So basically have the winpeshl.ini set to launch your app or script. Select which option, say like this:

Option 1: setup.exe /unattend:autounattend1.xml

Option 2: setup.exe /unattend:autounattend2.xml

etc.

Link to comment
Share on other sites

Here is my current problem.

I needed to create 4 partitions on a server ( C: D: E: I:) I have an unattended DVD that I used for other setups in the past that did not require 4 partitions. I tried to use different commands in the winnt.sif file but came to realize/told/read that you can’t set the partition size or create different partitions using that method. So I did the following in order to achieve this

1. Used windows AIK and created a windows PE 3.0 image.

2. Mounted the boot.wim and in the Windows/system32 area I modified the startnet.cmd to have formatbat.cmd. Then I added the following files formatbat.cmd and delpart.txt

3. The formatbat.cmd contains the following

 diskpart /s delpart.txt
echo Y | format c: /v:Syspart /fs:ntfs /q
echo Y | format d: /v:Sysdata /fs:ntfs /q
echo Y | format e: /v:Sysdata /fs:ntfs /q
echo Y | format i: /v:Sysdata /fs:ntfs /q
"D:\i386\winnt32.exe /syspart:c: /unattend:D:\i386\winnt.sif /s:D:\i386"
Exit

4. Next the delpart.txt has the following

 Select disk 0
clean
create partition primary size 36864
assign letter c
Active
create partition extended
create partition logical size 10240
assign letter d
create partition extended
create partition logical size 25600
assign letter e
create partition logical
assign letter=i
Exit

5. Then I unmount and commit the image.

6. Then I created an .iso and named it tester.iso

7. Once the .iso is completed I open the iso with magic iso

8. I added the following files/folder in the root of the tester.iso, these are the exact files I used in my unattended DVD install in which i copied from OEM W2K3 R2 SP2 CD's

$OEM$ ADMIN CMPNENTS I386 PRINTERS SUPPORT AUTORUN.INF R2AUTO.EXE SETUP.EXE SLIPSTREAM.INF WIN51 WIN51IA WIN51IA.SP2 WIN52IA.R2

9. I mount the .iso using the DRAC. The system loads winpe says it partitions the drives but with errors.

10. First I have the directory for the unattended install in the formatbat.cmd statically set to d:\ since that is what I first noticed when winpe boots up it set it to that. This causes a problem since I am trying to format a d:\ and it errors out. How do I change this to a different letter?

11. Once that completes it appears that windows is going to load but then it stop and reboots without any warnings. I am not sure why this is happening

Any help would be great in my problem.

12. I do not have any problems with the below winnt.sif when I boot it from my original dvd so I am not sure if I need to modify anything in here.

13. Any help would be greatly appreciated, if there is a more precise answer in the forums besides what I found please point me there. Once this is done I will gladly post an entire thread on what I have done and my end goal in hopes that others can utilize my help the same way I used it here.

http://support.microsoft.com/kb/303906

Here is my winnt.sif file


[Data]
MsDosInitiated="0"
InstallDir="\WINNT"
winntupgrade="no"
win9xupgrade="no"

[Unattended]
OverwriteOemFilesOnUpgrade=no
NtUpgrade=no
Unattendmode = FullUnattended
UnattendSwitch = YES
OemPreinstall = YES
OemSkipEULA = YES
TargetPath = WINDOWS
Filesystem = ConvertNTFS
DUDisable = YES
Hibernation = NO
WaitForReboot = NO
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore

[Display]
Xresolution=1024
Yresolution=768
BitsPerPel=16
Vrefresh=75

[GuiUnattended]
AdminPassword="XXXXXXXXXXXX"
TimeZone=235
OEMSkipRegional=1
OemSkipWelcome=1

[LicenseFilePrintData]
AutoMode=PerSeat

[Components]
Iis_common=Off
Iis_ftp=Off
Iis_inetmgr=Off
Iis_internetdataconnector=Off
Iis_nntp=Off
Iis_serversideincludes=Off
Iis_smtp=Off
Iis_webadmin=Off
Iis_webdav=Off
Iis_www=Off
Iis_www_vdir_scripts=Off
Iis_asp=Off
SCW=Off

[UserData]
ProductKey="XXXXX-XXXXXX-XXXXXX-XXXX"
ComputerName=CHANGEME
FullName="xDEV"
OrgName="DEV"

[RegionalSettings]
LanguageGroup=1
Language= "0409"

[Networking]
InstallDefaultComponents="Yes"

[Identification]
JoinWorkgroup="Workgroup"

Link to comment
Share on other sites

10. First I have the directory for the unattended install in the formatbat.cmd statically set to d:\ since that is what I first noticed when winpe boots up it set it to that. This causes a problem since I am trying to format a d:\ and it errors out. How do I change this to a different letter?

Add this to your diskpart script:

sel vol d
assign letter=v

Change the assigned letter to what you want it to be.

11. Once that completes it appears that windows is going to load but then it stop and reboots without any warnings. I am not sure why this is happening

Any help would be great in my problem.

When the system is booting up, go into the F8 menu and choose the "Disable automatic restart on system failure" so that you can see the STOP error you are getting.

Link to comment
Share on other sites

I got the drive letter change to work just fine thanks.

The problem is when I boot up I push F8 and select "Disable automatic restart on system failure"

the systems runs diskpart then it goes into the windows setup and then it says it copies over the files then afterwards it still reboots and the system is not installed.

here is the line that I have in my formatbat.cmd after it finishes the formatting of the drives


f:
cd \i386
winnt32 /syspart:c: /dudisable /makelocalsource /s:f:\i386 /unattend:f:\i386\winnt.sif

everything is in the right places as for the winnt.sif and the i386 directory

any suggestions ?

Edited by deaconf19
Link to comment
Share on other sites

I used part of another install that I saw on this forum


md c:\install
md c:\distro
xcopy x:\install\*.* c:\install /e /y
xcopy x:\distro\*.* c:\distro /e /y
cd\xppro\i386
winnt32 /syspart:c: /dudisable /makelocalsource /s:x:\xppro\i386 /unattend:x:\i386\winnt.sif

I assumed that the install and distro had his custom files so I removed that from mine, the cd portion I did not understand sicne he did not specify which drive so I add the f: to mine the cd into the i386. the the last part I subsititued my dirve letters with the ones in the file and removed the xppro directory.

I am not sure if I am doing this correctly

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...