Jump to content

Windows XP x64, WinPE and pxelinux


Preben Uhrskov

Recommended Posts

Hi guys

My setup is:

- DHCP and DNS running on a Linux server using isc-dhcpd and bind9

- DC running on a Windows 2003 Server Standard

- WDS running on another Windows 2003 Server Standard with the R2 package installed - not used ... yet?

I have 15 Dell 1950 servers with the exact same hardware configuration.

I want them to do this:

- The machine boots, I press F12 to boot from PXE, which is handled by the pxelinux manager

- I choose that I want to redeploy an image with Windows XP x64 to the local harddrive

- Windows PE with all the necessary drivers loads up and does the partitioning and reads an image from a network share

- It logs the computer onto our domain and places the computer in a default OU with an auto generated hostname

- All I need to do, is to press F12, and choose redeploy (of course drink coffee etc. etc.)

Is this possible? I have made a WindowsPE boot cd which does the partitioning and reads the image off of a SMB share. This works fine, but how do I make the rest of the setup unattended?

Thanks in advance

Happy sysadminday btw ... it's the last Friday of July today ;)

// preben

Link to comment
Share on other sites


the question is, what WinPE are you using? PE built from XP/2k3 files (1.X) or built from Vista's WAIK/Setup files (2.0).

The later one is easy to chainload from pxelinux since it's fairly good documented in the WAIK docs and requires only DHCP, DNS and TFTP services. The first one is a b***h to get booted by PXE from a non-windows server.

Link to comment
Share on other sites

the question is, what WinPE are you using? PE built from XP/2k3 files (1.X) or built from Vista's WAIK/Setup files (2.0).

The later one is easy to chainload from pxelinux since it's fairly good documented in the WAIK docs and requires only DHCP, DNS and TFTP services. The first one is a b***h to get booted by PXE from a non-windows server.

Hi kaiser, and thank you for your reply :)

I am using the Windows PE which comes with Windows Vista AIK, which can be downloaded from Microsoft's website. I assume that it might be version 2.0?

How do I make it work like RIS, so that I can decide the computer's name? This is my biggest issue at the moment.

Thank you in advance

// Preben

Link to comment
Share on other sites

the question is, what WinPE are you using? PE built from XP/2k3 files (1.X) or built from Vista's WAIK/Setup files (2.0).

The later one is easy to chainload from pxelinux since it's fairly good documented in the WAIK docs and requires only DHCP, DNS and TFTP services. The first one is a b***h to get booted by PXE from a non-windows server.

Hi kaiser, and thank you for your reply :)

I am using the Windows PE which comes with Windows Vista AIK, which can be downloaded from Microsoft's website. I assume that it might be version 2.0?

How do I make it work like RIS, so that I can decide the computer's name? This is my biggest issue at the moment.

Thank you in advance

// Preben

I would try to use some scripting language to modify $winnt$.inf (should be in the windows\system32 dir) after applying the image. Thats the place sysprep.inf gets copied to (IIRC, search the docs). Using a script language to modify that file would have the advantage that you dont have to wait for the reboot to be done, instead you can set the new computername directly from your WinPE session.

This is all based on having a sysprepped image.

Link to comment
Share on other sites

the question is, what WinPE are you using? PE built from XP/2k3 files (1.X) or built from Vista's WAIK/Setup files (2.0).

The later one is easy to chainload from pxelinux since it's fairly good documented in the WAIK docs and requires only DHCP, DNS and TFTP services. The first one is a b***h to get booted by PXE from a non-windows server.

Hi kaiser, and thank you for your reply :)

I am using the Windows PE which comes with Windows Vista AIK, which can be downloaded from Microsoft's website. I assume that it might be version 2.0?

How do I make it work like RIS, so that I can decide the computer's name? This is my biggest issue at the moment.

Thank you in advance

// Preben

I would try to use some scripting language to modify $winnt$.inf (should be in the windows\system32 dir) after applying the image. Thats the place sysprep.inf gets copied to (IIRC, search the docs). Using a script language to modify that file would have the advantage that you dont have to wait for the reboot to be done, instead you can set the new computername directly from your WinPE session.

This is all based on having a sysprepped image.

I don't think I got this one right.

I created the c:\sysprep-folder, and copied the windows xp deployment tools there. Then I created the sysprep.inf with the setup manager which was also placed in c:\sysprep

After that: sysprep -mini -quiet -reseal -reboot

Boot up the WinPE-image over PXE (wee, works fine now :))

Then I examined the c:\windows\system32\$winnt$.inf and realized that it did -not- contain any information about the computername? It took the computername from my sysprep.inf indstead. Should I just modify that file?

// preben

Link to comment
Share on other sites

I don't think I got this one right.

I created the c:\sysprep-folder, and copied the windows xp deployment tools there. Then I created the sysprep.inf with the setup manager which was also placed in c:\sysprep

After that: sysprep -mini -quiet -reseal -reboot

Boot up the WinPE-image over PXE (wee, works fine now :))

Then I examined the c:\windows\system32\$winnt$.inf and realized that it did -not- contain any information about the computername? It took the computername from my sysprep.inf indstead. Should I just modify that file?

// preben

hm, maybe i misread something in the docs. I supposed since Sysprep copies its Sysprep.inf to $winnt$.inf upon execution, it would use the later file for mini-setup. As you found out you seem to still be able to use sysprep.inf after running sysprep. Way to go i suppose.

Link to comment
Share on other sites

In one of your first posts, you mention that I can make use of "some scripting language" to modify the hostname. I made a PHP-script, which is able to change the file content, but the problem is that I can't get php.exe to run under WinPE. It is probably some x64-issue?

What scripting language do you prefer for WinPE tricks?

Link to comment
Share on other sites

In one of your first posts, you mention that I can make use of "some scripting language" to modify the hostname. I made a PHP-script, which is able to change the file content, but the problem is that I can't get php.exe to run under WinPE. It is probably some x64-issue?

What scripting language do you prefer for WinPE tricks?

I prefer AutoIt3 (beat me, was the first scripting language i stumbled upon). It should be easy to get a grasp of it since it's BASIC like and some stuff works similar to PHP. AND: All you need (if you dont use include files) is the 300KB autoit3.exe. I have that running within WinPE 2.0 without much tricks.

The next option is VBscript as zorphnog supposed. Has the advantage that it's from Microsoft and shipped with the OS so you won't get asked what weird stuff your autoit3.exe is (or get beaten upon if you have policies that forbid downloading executables ...).

One sidenote, I don't know if autoit3 runs on X64. Didn't have to try it yet. In case it doesn't just go with VBscript.

btw: they have a Beta version for X64

http://www.autoitscript.com/autoit3/files/beta/autoit/x64/

This is only the interpreter. You will still need the standard package for documentation and customized Scite editor.

http://www.autoitscript.com/autoit3/scite/downloads.php

Link to comment
Share on other sites

OK guys, i've managed to code my first VBScript \o/

What it does:

Run ipconfig -> tempfile

strip out ipaddress

Run nslookup on that result -> tempfile

strip out the hostname from fqdn

search sysprep.inf for "ComputerName=default" and replace it with "ComputerName=" & sHostname

It works like a charm ... in Windows XP because there is no f***** nslookup in WinPE ... ?

Dudes, how do you solve this one?

Anyone interested in a copy of the script?

// preben

Link to comment
Share on other sites

copy the nslookup.exe to your winpe build before it is finished building.

I just tested nslookup in WinPE v1.6, and it seemed to work. Didn't do full testing on it though.

Ok, the x86 version of nslookup.exe won't run under winpe x64, but i fixed it by adding a "copy c:\windows\system32\nslookup.exe x:\windows\system32\nslookup.exe /Y" after applying the image on the harddrive. Cool :)

Can I make a dynamic image that will fit all my x64 machines, or do I have to do some code to determine which image i should apply?

// preben

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