Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#267058 - 12/10/2005 18:28 PXE Boot to install Windows
jondle
new poster

Registered: 19/08/2005
Posts: 38
Loc: San Diego, CA, USA
I set up an unattended WindowsXP installation CD that has SP's and updated all integrated. It also installs Office and other basic every-computer apps. It works perfect. Now what I would like to do is put that CD on a server and have clients boot via PXE and run the installer.

So far, I have a RHEL machine running dhcpd and tftp-hpa. The server is an oscar primary node, which was set up to install the os on the clients (and it worked). Now I'm trying to adjust that configuration to install Windows.

Here is the dhcp.conf file oscar set up:
Code:

deny unknown-clients;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name "";
option routers 192.168.0.1;
ddns-update-style none; # For dhpcd version 3

#set up eth1
subnet 192.168.0.0 netmask 255.255.255.0 {
group {
host oscarnode1{
hardware ethernet 00:04:76:17:DD:A2;
fixed-address 192.168.0.100;
filename "pxelinux.0";
option routers 192.168.0.1;
option domain-name "oscardomain";
}
host oscarnode2{
hardware ethernet 00:04:76:17:BC:4D;
fixed-address 192.168.0.101;
filename "pxelinux.0";
option routers 192.168.0.1;
option domain-name "oscardomain";
}
host oscarnode3{
hardware ethernet 00:04:75:85:04:BB;
fixed-address 192.168.0.102;
filename "pxelinux.0";
option routers 192.168.0.1;
option domain-name "oscardomain";
}
}
}

# This entry ignores requests on eth0...
subnet 161.130.224.0 netmask 255.255.224.0 {
not authoritative;
}



I want all requests made to eth1 (192.168.0.1) to be allowed, so I edited the file to the following:
Code:

allow booting;
allow bootp;

ddns-update-style ad-hoc; #Get an error without this, not sure what it does

option domain-name "winsetup.com";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name-servers 192.168.0.1;
option routers 192.168.0.1;

group {
next-server 192.168.0.1;
filename "/tftpboot/pxelinux.0";

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
}
}

# This entry ignores requests on eth0...
subnet 161.130.224.0 netmask 255.255.224.0 {
not authoritative;
}


That should be okay, right? My clients are getting an IP, so I think that is working.

In the /tftpboot/pxelinux.cfg directory, the config file used is just "default". oscar created this config file:
Code:

DEFAULT systemimager

LABEL systemimager
DISPLAY message.txt
PROMPT 1
TIMEOUT 50
KERNEL kernel
APPEND vga=extended initrd=initrd.img root=/dev/ram


I changed the file to this:
Code:

DEFAULT winboot

LABEL systemimager
DISPLAY message.txt
PROMPT 1
TIMEOUT 70
KERNEL kernel
APPEND vga=extended initrd=initrd.img root=/dev/ram

LABEL winboot
DISPLAY winboot-msg.txt
PROMPT 1
TIMEOUT 70
KERNEL
APPEND


I'm not sure what to put in the KERNEL and APPEND parts of the winboot section. Either way, my clients get an ip from dhcp but tftp times out. Shouldn't tftp work like this, just give an error?
_________________________
Mark IIa -- #30103119 -- 70 gig w/ ext3 fs-- Eutronix Light Kit -- Greenlight buttons

Top
#267059 - 12/10/2005 18:40 Re: PXE Boot to install Windows [Re: jondle]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528

Top
#267060 - 12/10/2005 19:14 Re: PXE Boot to install Windows [Re: tman]
jondle
new poster

Registered: 19/08/2005
Posts: 38
Loc: San Diego, CA, USA
I saw that, but the network boot section doesn't give a lot of detail. It basically says you need a dhcp server and a tftp server. It doesn't really tell you how to set them up. I looked at a bunch of other sites too and I think I've got it pretty close, but it still isn't working. I know the way I have it set up isn't complete, but I don't think tftp should be timing out. I think I should get an error.
_________________________
Mark IIa -- #30103119 -- 70 gig w/ ext3 fs-- Eutronix Light Kit -- Greenlight buttons

Top
#267061 - 12/10/2005 19:47 Re: PXE Boot to install Windows [Re: jondle]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
You've not followed the steps properly. For one you've not specified the TFTP server address in the DHCP config. If you're using the ISC DHCP daemon then you need 'option tftp-server-name "the_ip_goes_here";'

Is the TFTP daemon enabled and running as well?

Top
#267062 - 12/10/2005 20:19 Re: PXE Boot to install Windows [Re: tman]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
_________________________
-- roger

Top
#267063 - 12/10/2005 20:21 Re: PXE Boot to install Windows [Re: tman]
jondle
new poster

Registered: 19/08/2005
Posts: 38
Loc: San Diego, CA, USA
I feel dumb, but I can't find anywhere in the installation instruction where it tell you how to set up dhcp. The only thing I see is a link telling you that network boot is an advanced topic. When I click the link, it doesn't really tell me how to do it. It just tells me what I want to use to do it.

tftp-hpa is started with xinitd, I think. I assumed it was. If I put the files back the way oscar made them and restart dhcpd and xinitd, it will network boot and install RHEL.

I'll try and add 'option tftp-server-name "192.168.0.1";' and report back in a second.
_________________________
Mark IIa -- #30103119 -- 70 gig w/ ext3 fs-- Eutronix Light Kit -- Greenlight buttons

Top
#267064 - 12/10/2005 20:35 Re: PXE Boot to install Windows [Re: jondle]
jondle
new poster

Registered: 19/08/2005
Posts: 38
Loc: San Diego, CA, USA
I added the option and took tftp out if xinet and started it manually because the site Roger linked mentioned that starting it in inet didn't work. I'll finish reading that site and see what I come up with, but as of now, now change.
_________________________
Mark IIa -- #30103119 -- 70 gig w/ ext3 fs-- Eutronix Light Kit -- Greenlight buttons

Top
#267065 - 13/10/2005 13:30 Re: PXE Boot to install Windows [Re: jondle]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I haven't really read much of the stuff linked here, but your initial problem of "what do I specify as the KERNEL" implies that you aren't even remotely there yet. Think about the way Linux boots over the network. It gets an IP address via DHCP, and the DHCP packet tells it where its kernel is, which it boots. IIRC, the DHCP packet also tells it where its root filesystem is, which it mounts. All you have is a CD image, or maybe a full Windows filesystem. You certainly can't tell it to boot the image, unless you think that downloading an entire CD every time you boot sounds like a good idea. (I'm pretty sure that that wouldn't work anyway, even if you had 700MB of RAM and the network card could actually access all of it.)

Doing a little research leads me to the fact that MS wants you to have an "Embedded Image" to boot. Regardless, you have a lot more work to do than just having a bootable CD. Hopefully that's a good step towards the next part of the process, but you definitely have more to do than just figuring out what file to boot; you need to create it first.
_________________________
Bitt Faulk

Top
#267066 - 13/10/2005 14:11 Re: PXE Boot to install Windows [Re: wfaulk]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
Quote:
Regardless, you have a lot more work to do than just having a bootable CD.


Right, here's how you get it to work. If you want to do an unattended install of Windows, via a network boot, you will need to:

  • Create a Windows PE image. You'll need to register with MS as a Gold Partner, or as an OEM system builder. Alternatively, look at BartsPE. Either way, you'll need to build a Windows PE image using Windows 2003 SP1, so that you can boot it into a RAM disk.
  • Configure the DHCP/TFTP servers as documented at that link I gave earlier. This will cause the machine to network boot into Windows PE.
  • On a file server somewhere, install a copy of Microsoft Automated Deployment Toolkit (ADT). You can find a copy at http://www.microsoft.com/technet/itsolutions/branch/default.mspx.
  • Configure your newly-created WinPE image to run ADT's Build-Baseline.cmd file, causing the machine to do an unattended installation of Windows. It will also configure the machine to do an unattended installation of other stuff, using an ADT script. You can configure this, or turn it off.
_________________________
-- roger

Top
#267067 - 13/10/2005 18:27 Re: PXE Boot to install Windows [Re: Roger]
jondle
new poster

Registered: 19/08/2005
Posts: 38
Loc: San Diego, CA, USA
Thanks for the help and info. I'm going to read around some more and mess with it over the next couple of *business* days.

I was wanting to have pxelinux just start the Windows installer on the CD, like the image in the boot sector of the CD would. I was hoping it would be able to run just like it was a local CD, but instead be a copy of the CD stored on a file server. I guess that train of thought isn't correct, so I'm going to spend a couple days starting my ideas from scratch. I got the oem preinstall kit, which includes WinPE. Thanks again for the info and I'll post back in a couple days with results or (more likely) woes.
_________________________
Mark IIa -- #30103119 -- 70 gig w/ ext3 fs-- Eutronix Light Kit -- Greenlight buttons

Top
#267068 - 13/10/2005 19:35 Re: PXE Boot to install Windows [Re: jondle]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
OK. Let me lay the whole process out.

The PC starts up. If it's got network boot enabled, it will contact a PXE-enabled DHCP server. It asks for the normal stuff: IP address, gateway, etc., but in addition to this, it also wants DHCP options #66 and #67 filled in. One of these is the IP address of a boot-image server. The other is the name of a boot file.

You can see how to configure these options for ISC dhcpd (which is probably what you're running on Linux) at my page, here.

Note that, so far, PXE booting is no different from how diskless Unix workstations have always booted up (except that, as Bitt says, these also ask for a root filesystem location).

So, to recap: the client has now got its IP address, the IP address of a boot server, and the name of a file on that server.

The PXE-enabled BIOS on the PC (we're still nowhere near an operating system at this point) uses something called TFTP (see RFC 1350 for the gory details) to download that named file into memory.

If you're attempting to network boot Linux, this file is generally called pxelinux.0, which is actually the syslinux menu system, rather than the actual kernel.

If you're network booting Windows, it's called startrom.com, and you can find it in the I386 directory of your Windows CD. There are two versions -- one requires you to press F12 to continue the network boot. One doesn't. See http://oss.netfarm.it/guides/pxe.php, for more information.

Once this file is loaded into RAM, the BIOS passes control over to it, and it then it uses TFTP to grab hold of some other files: NTLDR, NTDETECT.COM and WINNT.SIF. The first two files are on your Windows CD. The WINNT.SIF file is a text file describing how the rest of the boot process works.

The NTLDR file is finally kicked off, and it's responsible for starting up the rest of Windows.

Now, here's where it diverges. If you've built your own Windows bootable image (as laid out at http://oss.netfarm.it/guides/pxe.php, or as Microsoft RIS would do it), you'll need something called a BINL service, and your Windows files will need to be accessible over CIFS/SMB (which is where Samba comes in).

As the machine comes up, the BINL service is responsible for telling NTLDR/NTDETECT.COM which driver files it needs for the various things that it found in the PC. These files are downloaded using SMB.

The other option is, if you've got a copy of Windows 2003 SP1 and the OEM Preinstallation Kit (OPK) available, you can build Windows PE 2005. This supports running from a RAM disk.

So, rather than load everything over SMB, NTLDR grabs an ISO file using TFTP, loads it into RAM, and then mounts it as a RAM disk. This is slower (because it grabs all 170Mb or so of Windows, rather than just the drivers that it needs), but it requires less configuration.

Either way, once it's finished booting, this will leave you in what Microsoft calls Windows PE (for Preinstallation Environment), with X: mapped to either the SMB share or the RAM disk.

At this point, you can use whatever imaging/installation technology you want in order to install Windows. For example, the Ghost command-line tools work fine under Windows PE, and will grab a disk image from a server.

Alternatively, you can partition/format the disk from inside Windows PE, copy the I386 directory to the disk, and several other steps. Then, if you provide an unattend.txt file, when the machine next boots up (from the hard disk), it'll do an unattended installation of Windows.
_________________________
-- roger

Top
#267069 - 13/10/2005 19:42 Re: PXE Boot to install Windows [Re: Roger]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
Quote:
...it'll do an unattended installation of Windows...


On the other hand, if you go to http://www.microsoft.com/technet/itsolutions/branch/default.mspx and download the Branch Office Infrastructure Solution ZIP file, it contains something called ADT, which is the Automated Deployment Toolkit. This is a bunch of VBScript and XML which allows you to do completely unattended installations of Windows and applications.

It has instructions for building a Windows PE boot CD, which is one step short of what you want to do to build a network-capable RAM disk. Fortunately, instructions for that are in the Windows OPK documentation.

It also has a bunch of scripts, suitable for running from Windows PE that set up your machine to do an unattended installation. If you do this, and let it complete, it will also SYSPREP the machine properly, so that you can capture the image and deploy it to your other machines.

If you don't want to do that, you can probably hack on the XML definitions so that it stops after the unattended installation. How to do this is beyond the scope of this discussion.

This is also probably complete overkill for what you're trying to do, but it is very cool.
_________________________
-- roger

Top
#267070 - 13/10/2005 19:46 Re: PXE Boot to install Windows [Re: jondle]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
Quote:
I was hoping it would be able to run just like it was a local CD, but instead be a copy of the CD stored on a file server.


It will.

If you look in the OPK, you'll find instructions for building a network-bootable RAM disk image of Windows PE. But you will need to build it using a slipstreamed copy of Windows 2003 SP1 -- earlier Windows versions don't support mounting the ISO as a RAM disk.

Once you're in Windows PE, you can set the machine up to do the unattended installation.
_________________________
-- roger

Top
#267071 - 13/10/2005 19:49 Re: PXE Boot to install Windows [Re: jondle]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
Quote:
I set up an unattended WindowsXP installation CD that has SP's and updated all integrated. It also installs Office...


I just read this bit. If you create the network-bootable Windows PE image, you'll need to leave this lot installed in a normal SMB share on the server, and copy it down from there.

Hope all of this helps, and that I didn't overwhelm you with information.
_________________________
-- roger

Top
#267072 - 14/10/2005 11:43 Re: PXE Boot to install Windows [Re: Roger]
jondle
new poster

Registered: 19/08/2005
Posts: 38
Loc: San Diego, CA, USA
Thanks for all the info. I've spent 2 hours searching MS's site for the opk for Win2003, but have failed. All I can find is the one for XP and it won't let me build with the 2003 disk. I'm going to try and use BartPE instead since you mentioned it above. I have an MSDN subscription, you'd think it would be in the subscriber downloads. Damn Microsoft and their un-navigatable site.

Again, I really appreciate all the information.
_________________________
Mark IIa -- #30103119 -- 70 gig w/ ext3 fs-- Eutronix Light Kit -- Greenlight buttons

Top