ProLiant Deployment and Provisioning
1820644 Members
1855 Online
109626 Solutions
New Discussion юеВ

Re: Deploying Windows 2008 and unattend-post.cmd

 
SOLVED
Go to solution
dyane6
Advisor

Deploying Windows 2008 and unattend-post.cmd

Having an issue with RDP in our new SIM server 6.2.1 which we did not have in SIM 6.0.0. When I customize the unattend.xml so it creates three partititions on the hard disk, the RDP process just hangs on the unattend-post.cmd job. This is the part that installs the HP Software.

The three partions get created properly, the OS gets installed with no issues and there are no errors in RDP or on the server. However it just shows the time icon and goes no further.

Even if I just keep one partition on the hard disk, it does the same thing. Yet the clean unattend.xml works just fine.

Nothing in the unattend-post.xml seems to relate to partitions so not sure why its affecting it.

Thanks

24 REPLIES 24
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

Questions:
- Why do mention SIM?? What version of RDP are you using?

"The three partions get created properly, the OS gets installed with no issues and there are no errors in RDP or on the server. However it just shows the time icon and goes no further."

- Are you logging into the server to see this?

" Having an issue with RDP in our new SIM server 6.2.1 which we did not have in SIM 6.0.0. When I customize the unattend.xml so it creates three partititions on the hard disk, the RDP process just hangs on the unattend-post.cmd job. This is the part that installs the HP Software.

The three partions get created properly, the OS gets installed with no issues and there are no errors in RDP or on the server. However it just shows the time icon and goes no further.

Even if I just keep one partition on the hard disk, it does the same thing. Yet the clean unattend.xml works just fine.

- Can you post you xml?

Nothing in the unattend-post.xml seems to relate to partitions so not sure why its affecting it."
- I preseum you mean "unattend-post.cmd" here and if so, then yes, this only applies some drivers
If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Here is the unattend-std.xml for Windows 2008 Standard. I refer to SIM but specifically I refer to ICE 6.2 DVD and I updated to 6.2.1. RDP component is 6.9.4, hotfix 2, PSP 8.60.

dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Yes I log into the target server and see everything looks ok. The job freezing though to install HP software only shows in RDP console.
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

Ok, You may be having a problem with drive letters. You create 3 partitions whihc are probably getting C: D: E:. Is there a CD?DVD ROM on the box? if so, it will get F:. If this happens, you may have problems in the automation environment as if uses f: to mapt the the express share. If F is used then it doesnt have a mechanism to map to another drive as far as i remember.. Which step extacly is it failing on??
If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Yes the three partitions give me C D and E as you suspected. As these are blades there is no physical DVD but I will check the ILO does not have a mapped DVD that is taking F. I did find out that none of the four HP software gets installed (SSH, SNMP, Agent and one other) so thats why RDP hangs is that there is no DGent to report progress when in Windows. Thanks for your idea though. I will check on it. Any other ideas?
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

This a scripted install, right?. When you say 'hanging on unattend-post.cmd' i assume you mean that the status of the RDP job in the Altiris console shows that its is running that part of the job. Can you screen shot this?

If the actual OS has booted, then its up to the agent to check back in and run this part of the job. Have we verified that the agent is installed and running? The installation is confiured in the end of your .xml file in the section
%systemdrive%\$oem$\dagent_x64.msi /quiet settings=%systemdrive%\$oem$\aclient.inp

Ensure that the aclient.inp is configured correctly and screenshot the properties of the agent on the server if it is installed. If its not connecting back to the server well therein lies the problem. It looks like you are turning off the firewall as part of the answer file config but double check that also.

Post the contents of the aclient.inp form the server ;)
If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Screenshot of RDP Status is attached.

No the agent did not get installed. On version 6.21 this gets installed with the install.cmd script which is where it is getting stuck on. This may have been in version 6.0 that it was part of unattend.xml

On my script I turn off the firewall, but for troubleshooting I am basically using the clean unattend-std.xml that comes with the installation of RDP. The only difference is the partitions.

1. Unattend-post.cmd Script
***************************

:: ===========================================================================
:: Unattend Installation Post Script
:: ===========================================================================
cd /d "%~dp0"

set result=0

rem Cleanup
del /f /q %systemdrive%\rdpimage

rem Install Smart Components
if not exist components\install.cmd goto end2
call components\install.cmd
if errorlevel 1 set result=2
:end2

exit /b %result%

2. Install.cmd Script
*********************

Will attach that in next post

3. AClientInp
*************

; RDP default AClient configuration file
;
; Additional settings will be obtained from the Deployment Server (DS).
; In the DS Console, select Tools > Options > Agent Settings tab.
; Select Force new agents to take these default settings.
; Click on Change Default Settings.
;
InitialSettings=Yes
SettingsChanged=Yes
TcpAddr=172.24.21.133
TcpPort=402
InstallDir=%ProgramFiles%\Altiris\DAgent
SyncTimeWithServer=Yes

LogFile=%ProgramFiles%\Altiris\DAgent\DAgent.log
LogSize=512000
LogErrors=Yes
LogInformation=Yes
LogDebug=Yes
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Here is the Install.cmd script which is called by the unattend-post.cmd and installs the four HP components.

However unattend-post.cmd seems to absolutely nothing in the detailed status of this task.
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

I'm a little confused. If the agent is not installed as part of the 'Install OS' job then who will 'unattend-post.cmd' ever be invoked?

In the unattend.xml file you posted, the line to install the agent was included?
If my post was helpful please award me Kudos! or Points :)
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

Since unattend-post.cmd calls install.cmd, and unattend-post.cmd is invoked by the agent, how can install.cmd ever install the ageAre the agents file sin the oem folder on your c: drive?
If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

That has never made sense to me either. Therefore the agent must be installed somewhere else. I will look at the other scripts in the folders for a clue. Maybe its somewhere in the sysprep process?

I wish HP documented this stuff properly before making massive changes like they did with 6.0 and even 6.2.

Thanks for your help thus far.

shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

So this is not a scripted installation?? You are lating down a sysprep'd image? The answer fiel you provided wasn't an answer fiel for a sysprerp image and ehnce wont work with one! Is it a scripted installation or a sysprep image based one?

In a scripted instalaltion, the agent is installed as part of the firt logon commands when the OS boots. In a sysprep image, the agent is captured with the image fro the live OS and hence will be already ont he machine when the imaged machine boots.
If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

No its not an image but a scripted install. The reason I mentioned SysPrep is that there is as sysprep config file which matches the unattend file in the same ws6-x64-en_us folder in HP packages. However, looks like an unattend file when you open it up and there is no mention of agent there either. I think the capturing process uses this sysprep file whereas standard script does not. A red herring in the end.

I still have found no mention of where the agent gets installed in the new process as they definitely took it out of the unattend file now.

I thought about adding the install back into the unattend as a workaround, but have not found the right commands yet to add into the runonce section. Code samples I have seen so far relate to the pre 6.0 days of RDP.

I have contacted HP support but when they say 4 hour they mean 4 month, and when they do call you are speaking to someone who is no higher than Tier 1. You have been far more knowledgable and better at responding.
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

Hi, what .xml file have you pointed your job at? You are not using the xml posted when you posted

"Here is the unattend-std.xml for Windows 2008 Standard. I refer to SIM but specifically I refer to ICE 6.2 DVD and I updated to 6.2.1. RDP component is 6.9.4, hotfix 2, PSP 8.60."

If not, just add in the lines to install the agent and you're golden.

There are 2 .xml answer files in each directory as the scripted jobs use one and the sysprep jobs the other.

Can you find out which answer file your jobs is pointing at. This will be in the config of the job 'COnfigure answer file'.

Post the contents of that file

;)
If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Not entirely sure what two lines you mean. The ones for installing the Altiris agent? Anyway here is the unattend file that I am using. Can you add the two lines to that?

Many thanks
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

Well, this xml answer file does contain the lines to inmstall the agent:

"-
1
%systemdrive%\$oem$\dagent_x64.msi /quiet settings=%systemdrive%\$oem$\aclient.inp
Install Agent

"

I'll build a VM with it and see where it's failing for you ;)

The only other thing, are the network drivers installed at this stage? Have you verified you have network access back to the deployment server?

Is the altiris agent service present on the box when u logon?
If my post was helpful please award me Kudos! or Points :)
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

This may be of use to you also :)

The default scripted install job from RDP 6.2 for Windows 2008 x64 perfoms the named tasks as shown in Screenshot_001.png attached.

Basicall, the steps as as follows:

1) The server is rebooted into WinPE 2.1 x64 and the first disk found is wiped and an image of NTFS is dropped on it. This image contains a file called RDPIMAGE on the filesystem therein that the dagent can use to identify the correct drive for deployment.

2) Still in WinPE, a script is run. this script searches all hard drives/volumes for the RDPIMAGE file and when it finds it, sets this as the drive to use. The script then copies over the OEM folder from the deloyment server and also the agent. Here is the script contents


rem Copy OEM Files

set HD=c:
for %%i in (c d e f g h i j k l m) do if exist %%i:\rdpimage set HD=%%i:

set featuredir=%ALTIRIS_SHARE%\hpfeatures\ws6-x64-en_us
set oemdir=%HD%\$oem$

xcopy "%featuredir%\oem\*.*" %oemdir% /s /e /i /y
copy /y %ALTIRIS_SHARE%\agents\aclient\dagent_x64.msi %oemdir%

3) Now a script runs to configure the answer file used for deployment. It looks lik this

rem Configure Answer File

set featuredir=%ALTIRIS_SHARE%\hpfeatures\ws6-x64-en_us

copy /y "%featuredir%\unattend-std.xml" "%featuredir%\%ID%.xml"

set compname=%#*"select right(replace([name],' ',''),15) from computer where computer_id={ID}"%
set productkey=%ws6-x64-std-en_us-productkey%
set driverpath=%featuredir%\oem\drivers
"%featuredir%\bin\hptoken.exe" "%featuredir%\%ID%.xml"


It sets the compter name to use for the server, the product key and the driver path to look for drivers and the answer file to use as a base answer file. It then parses this answer file and substitutes in the tokens as specified.

Basically, the drivers specified here will be injected into your build so if you have the lastets drivers loaded into the correct location on the deployment server, the server will have access ot the disk/network at build time.

4) This script runs to install the OS from WINPE

rem Install OS
rem scripted-install

set featuredir=%ALTIRIS_SHARE%\hpfeatures\ws6-x64-en_us

"%featuredir%\dist\setup.exe" "/unattend:%featuredir%\%ID%.xml"

It basically uses the answer fiel created in the last script to answer all the questions the installer asks you.

This answer file should specify where to get drivers and also to install the dagent form the files copied over locally to the c:\oem folder.
If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

I dont see the attached screenshot. Can you try again pls?

The install script will fail because its refering the $oem $ folder which is not being created for some reason, although I have seen it on the other builds that do work. So looks like its the oem process that you detail in your last email that is not working. I would hazard a guess that the parition process kills the FOR %%i in statement.

If you can build a vm and try it out that would be great. Is it just my environment that is having issues? That is the question I would like answering.

Nothing HP related gets created on the server although Windows looks fine. That includes any altiris or hp folders.

Thanks for the install process explanation.
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

Here is that screenshot
If my post was helpful please award me Kudos! or Points :)
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

Can you do a 'dir /s' of this directory on your deployment server:

hpfeatures\ws6-x64-en_us
If my post was helpful please award me Kudos! or Points :)
shocko
Honored Contributor

Re: Deploying Windows 2008 and unattend-post.cmd

You could also export your entire job from the deployment console tio a .bin file and post here so i can check it ;)
If my post was helpful please award me Kudos! or Points :)
shocko
Honored Contributor
Solution

Re: Deploying Windows 2008 and unattend-post.cmd

Ok,
Yep, the problem is, you are overwriting your c:\ partition by specifiying the c: parittion again in the answer file. RDP lays down an image that is used as the c: drive and the OEM folder is copied down there. Now, when the Windows installer runs setup.exe and looks into the answer file, it sees to use Disk 1 Partition 1 as the system disk but also to partion disk 1 into 3 partitions and hence re-formats the c drive and wipes the OEM folder from it!


There are 2 ways around this:

1) Remove this additional partitioning info from the answer file. The initial task drops an NTFS image onto the first drive found and expands the filesystem therein to fill the drive. this can eb modified to an exect size i.e 40GB. This will leave the rest of the drive free. You can then run a script at the end to add the additional partitions.

2) remove the option "WillWipeDisk" form the answer file. WillWipeDisk specifies whether to erase all partitions on the hard disk before adding additional configurations to the disk. Again, set the initial NTFS image to only occupy a specif amount of disk spce and then setup your additional paritions via the answer file.


I've tested this and it works fine.


If my post was helpful please award me Kudos! or Points :)
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Thanks for all your help. You made a big difference to us getting this done. The first option worked for us in the end. It was tough getting the rest of the drives partitioned. For some reason the partitions could be done easily enough using diskpart but getting formatting working was a real pain. In the end we ran the diskpart in Windows PE before the unattend script job runs. Everything now runs great. Best wishes.
dyane6
Advisor

Re: Deploying Windows 2008 and unattend-post.cmd

Just to add, I added the following job to run as the third task. After the OEM file copy but before the unattend.

Here is the job

rem * Partitions and Formats the Disk *

set FtireDir=C:\$oem$\Ftire

diskpart.exe /s %FtireDir%\Ftire-Partitions.txt >Part-Log.txt

and here is the * Partition.txt File*

select disk 0
CREATE PARTITION PRIMARY SIZE=30720
assign letter=Q
FORMAT FS=NTFS LABEL="Backup" QUICK
select disk 0
CREATE PARTITION PRIMARY
assign letter=R
FORMAT FS=NTFS LABEL="Data" QUICK
EXIT