Jump to content

Automatic Bart PE Ghost Client


kilimats

Recommended Posts

Ghost allows you to create a boot disk which will connect to the server. If you have 300 machines - I presume they are identical - why would you want to boot WinPE at all and go trough the hassle of creating fancy scripts? You can simply boot the ghost client cd with dhcp support & specific ndis driver for the network card. You can then restore the images from the server to your heart's content.

pmshah has it exactly right... Why wait for WinPE to bootup, although it can be done just like Kilimats had said by using penetcfg. You will add the line indicated below to the bottom of the penetcfg.ini file. But, I think you are wasting time waiting on WinPE to bootup. I have the universal bootdisk on cd that loads the bootfiles into a RAMdrive then ejects the cd (so you can move to the next PC) and finishes the bootup on Ramdrive. You can also use a floppy, but it is not nearly as fast.

[NetDrive1]

; Drive = * (to use the first available drive letter)

Drive = Y:

NetworkPath = \\servername\share

UserName = add username here

; Password = (leave it empty to be prompted for a password)

Password = add password here

[PostNetAutoRun]

; StarupFlag = CommandLine

; StartupFlag is a bit field that can take the following values:

; 0 = run hidden and wait (00 00 00 00)

; 1 = run normal and wait (00 00 00 01)

; 2 = run hidden and don't wait (00 00 00 10)

; 3 = run normal and don't wait (00 00 00 11)

1 = Z:\Ghost\Ghost32.exe

The nice thing about the Universal bootdisk (www.netbootdisk.com) is that it autodetects every network card I have in my environment by default (which is around 15 counting laptops). They also have provided a way to add protocol.ini settings to get 100/Full if neccessary. This disk will autolog onto a network (which is not neccessary w/mulitcast) or prompt users each time for credentials. Since you are using multicast you will just provide the sever session name in the command line when you autolaunch ghost.

GHOST.EXE -buffersize=32 -sure -rb -clone,mode=restore,src=@mc"session",dst=1

FYI.. we saw a dramatic imporvement when we added the -buffersize=32 line

Good Luck,

Cliff

Link to comment
Share on other sites

  • 1 month later...

Let me know if there is an interest in me posting the XPE PXE or W2K3 PXE setup instructions, but beware: you need to know what you are dealing with, this is not for the beginners! I will not be able to provide any support or straighten out newbie questions, it is up to the implementor to understand what PXE, DHCP, TFTP, Windows service, directory structure, .ISO file, BartPE, RAMDisk and slipstreaming drivers means! :yes:

Yes.

Using PXE, DHCP, TFTP, Windows service, directory structure, .ISO file, BartPE, RAMDisk and slipstreaming drivers are usual tasks i perform with RIS under W2K3

Please post your XPE PXE instructions.

Link to comment
Share on other sites

Why do I have a feeling that people like to make life more difficult than it can be. I have another suggestion. This of course is assuming that the 300 machines are identical.

Prepare 1 machine exactly as you would like with the network configured as DHCP client. Next put change owner utility in the startup folder. Configure the bios on each machine to boot from HDD as the first option & CD rom as the second. Next create a ghost image of the partition. Create a dos boot cd that will start ghost & restore the image from command line automatically and reboot the machine when finished. You couls use 4dos 7.5 (now free) for any fancy script you want to run under dos.You could also use a conditional command to use gdisk to partition the hard drive if the need be. You would want to create multiple copies of this CD if you do not want to wait at all. Once having started the process you can move to the next machine & get it started. The whole process might take about 15 to 20 minutes.

So what you have now is a situation that wil boot the cd on a fresh mahine. Partition the drive if the need be. Reboot if required. Restore the ghost image to the HDD. Reboot from the freshly restored / installed & hardware configured winxp. A prompt will await your input for changing the user. You will have to do some tweaking at each machine for changing the password but essentially you are all done. Once you have setup the machine properly you can delete the ChangeUser utility from the startup folder & remove the CD.

If for some reason you want to use assigned IP in stead of DHCP you can disconnect the ethernet cable until you are done & then reconnect once the machines are configured.

I don't think there is any faster method of achieving your goal.

Link to comment
Share on other sites

I am not familiar with the features of PXE bios or its boot features. I do use magic packets & vnc server/ clients to make changes to normally configured machines. On a fresh machine with no OS how do you gather the mac addresses of each individual machine & identify them for setup. If the PXE bios is smart enough to communicate & take commands as to what image to boot & where to look for it.

Secondly I don't thing any enterprise is going to commission 300 machines at one go in fresh condition & then hope the admin group will be able to finish their job remotely without disturbing the normal productivity of the end users, even over the weekend. Would make better sense to line up the new CPUs on a bench using KVM switches & set them up without disturbing anyone else. One would not need to run around in case of some hardware problem with any of the new machines.

Edited by pmshah
Link to comment
Share on other sites

Ghost allows you to create a boot disk which will connect to the server. If you have 300 machines - I presume they are identical - why would you want to boot WinPE at all and go trough the hassle of creating fancy scripts? You can simply boot the ghost client cd with dhcp support & specific ndis driver for the network card. You can then restore the images from the server to your heart's content.

pmshah has it exactly right... Why wait for WinPE to bootup, although it can be done just like Kilimats had said by using penetcfg. You will add the line indicated below to the bottom of the penetcfg.ini file. But, I think you are wasting time waiting on WinPE to bootup. I have the universal bootdisk on cd that loads the bootfiles into a RAMdrive then ejects the cd (so you can move to the next PC) and finishes the bootup on Ramdrive. You can also use a floppy, but it is not nearly as fast.

[NetDrive1]

; Drive = * (to use the first available drive letter)

Drive = Y:

NetworkPath = \\servername\share

UserName = add username here

; Password = (leave it empty to be prompted for a password)

Password = add password here

[PostNetAutoRun]

; StarupFlag = CommandLine

; StartupFlag is a bit field that can take the following values:

; 0 = run hidden and wait (00 00 00 00)

; 1 = run normal and wait (00 00 00 01)

; 2 = run hidden and don't wait (00 00 00 10)

; 3 = run normal and don't wait (00 00 00 11)

1 = Z:\Ghost\Ghost32.exe

The nice thing about the Universal bootdisk (www.netbootdisk.com) is that it autodetects every network card I have in my environment by default (which is around 15 counting laptops). They also have provided a way to add protocol.ini settings to get 100/Full if neccessary. This disk will autolog onto a network (which is not neccessary w/mulitcast) or prompt users each time for credentials. Since you are using multicast you will just provide the sever session name in the command line when you autolaunch ghost.

GHOST.EXE -buffersize=32 -sure -rb -clone,mode=restore,src=@mc"session",dst=1

FYI.. we saw a dramatic imporvement when we added the -buffersize=32 line

Good Luck,

Cliff

This is addressed to cliff620.

How did you create or where did you download the boot image which will eject & complete the boot process from ramdrive? I am really interested in it.

Would appreciate any link or details.

Thanks.

Link to comment
Share on other sites

I am not familiar with the features of PXE bios or its boot features. I do use magic packets & vnc server/ clients to make changes to normally configured machines. On a fresh machine with no OS how do you gather the mac addresses of each individual machine & identify them for setup. If the PXE bios is smart enough to communicate & take commands as to what image to boot & where to look for it.

Secondly I don't thing any enterprise is going to commission 300 machines at one go in fresh condition & then hope the admin group will be able to finish their job remotely without disturbing the normal productivity of the end users, even over the weekend. Would make better sense to line up the new CPUs on a bench using KVM switches & set them up without disturbing anyone else. One would not need to run around in case of some hardware problem with any of the new machines.

On the new Fujitsu-Siemens Business Line of computers, the BIOS option is set in Power >> LAN >> Wake On LAN boot: Force LAN boot after Wake On Lan

mac address is printed on label near the RJ45 Network Connector.

I have currently a Win2003 Server with TFTP service set and PXELinux. From the server, i can change the default image to boot in PXELinux configuration: Universal Network DOS boot disk or WinPE image.

With some minors changes, i may be able to get the mac address sent by one util from DOS booting and output to text file on a network share. When i get all the mac address of computers, i can then switch PXELinux default to load the winPE image.

Not sure it would be faster than my current solution but want to try different ways.

Actually, i need to plug a keyboard, power on each new box, hit F12 key to PXE Boot Universal Network DOS boot disk, connect to samba share to load ghost.exe and launch script to load image to disk and then shutdown box.

Edited by Bilou_Gateux
Link to comment
Share on other sites

Let me know if there is an interest in me posting the XPE PXE or W2K3 PXE setup instructions, but beware: you need to know what you are dealing with, this is not for the beginners! I will not be able to provide any support or straighten out newbie questions, it is up to the implementor to understand what PXE, DHCP, TFTP, Windows service, directory structure, .ISO file, BartPE, RAMDisk and slipstreaming drivers means! :yes:

Yes.

Using PXE, DHCP, TFTP, Windows service, directory structure, .ISO file, BartPE, RAMDisk and slipstreaming drivers are usual tasks i perform with RIS under W2K3

Please post your XPE PXE instructions.

OK, here it comes, it has made wonders for my LAN setup. Beware though that I will not be able to answer any support questions!

How to install a TFTP server on W2K3

NOTE! You need to have W2K3 with SP1, both for hosting TFTPD / DHCP as well as for building the BartPE .ISO image!

TFTP service:

1. Expand TFTPD.EX_ (server part) och TFTP.EX_ (client part) from the CD-ROM's i386 directory to the %SystemRoot%\system32\ directory

2. Run INSTSRV TFTPD c:\windows\system32\tftpd.exe to install TFTPD.EXE as a service on the computer that will host the TFTP services

3. Create the file TFTPD.REG and edit it to contain the following registry. Import it once you are done.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD]
@=""
"DependOnService"=hex(7) : 74,00,63,00,70,00,69,00,70,00,00,00,61,00,66,00,64,00,\
00,00,00,00
"DependOnGroup"=hex(7) : 00,00
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2) : 63,00,3a,00,5c,00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,\
5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,74,00,66,00,74,\
00,70,00,64,00,2e,00,65,00,78,00,65,00,00,00
"DisplayName"="TFTP Server"
"ObjectName"="LocalSystem"
"Description"="Trivial File Transfer Protocol Server"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD\Enum]
"0"="Root\\LEGACY_TFTPD\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD\Parameters]
"Clients"="*.*.*.*"
"Masters"=""
"Readable"="*"
"Writeable"=""
"Directory"="d:\\tftpdroot"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD\Security]
"Security" = hex : 01,00,14,80,b8,00,00,00,c4,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,88,00,06,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,04,00,00,00,00,\
00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,06,00,00,00,00,00,14,00,00,01,\
00,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,\
00,00,00,00,05,20,00,00,00,25,02,00,00,01,01,00,00,00,00,00,05,12,00,00,00,\
01,01,00,00,00,00,00,05,12,00,00,00

4. Create the directory D:\TFTPDRoot (as per the line stating "Directory"="d:\\tftpdroot" in the .REG file above!)

5. Copy NTDETECT.COM from the CD-ROM's i386 directory to the newly created D:\TFTPDRoot directory.

6. Expand SETUPLDR.EX_ from the CD-ROM's i386 directory to file D:\TFTPDRoot\NTLDR (NOTE! The file must be renamed to NTLDR WITHOUT any extension!). Expand STARTROM.CO_ from the CD-ROM's i386 directory to file D:\TFTPDRoot\startrom.com. Expand STARTROM.N1_ from the CD-ROM's i386 directory to file D:\TFTPDRoot\startrom.n12

7: Create the file WINNT.SIF in the D:\TFTPDRoot directory and edit it to contain the following:

[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=pebuilder.iso"

8. Now open a CMD command prompt and start the TFTP service:

C:\WINDOWS\SYSTEM32>NET START TFTPD

9. Test the TFTP service with the help from the client application, if all goes well then the file WINNT.SIF should be retreived to the C:\WINDOWS\SYSTEM32 folder when you execute the following command:

C:\WINDOWS\SYSTEM32>TFTP -i localhost get winnt.sif

PEBuilder:

1. Create an .ISO file with PEBuilder 3.1.4 (or newer) containing the RAMDisk component!

2. Copy the imagefile BartPE.ISO to D:\TFTPDRoot\pebuilder.iso (as per the "/rdpath=pebuilder.iso" in the .SIF file above!)

DHCP service configuration:

1. The DHCP service must be installed and configures and have an active scope up and running

2. Configurera the DHCP service with the following Server Options:

043 Vendor Specific Info: 01 04 00 00 00 00 FF
066 Boot Server Host Name: srvname (substitute "srvname" with whatever your server is named;-)
067 Boot File Name: startrom.com (or startrom.n12 if you do not want to press F12 on the client upon PXE boot)

3. Open a CMD command prompt and create Server Option 060 in the DHCP service with help from the NETSH command:

C:\WINDOWS\system32>netsh
netsh>dhcp
netsh dhcp>server \\<server name> (or IP addres!)
netsh dhcp server>add optiondef 60 PXEClient String 0 comment=PXE support
netsh dhcp server>set optionvalue 60 STRING PXEClient
netsh dhcp server>exit

4. Restart the DHCP service in order to force it to reload the new settings:

C:\WINDOWS\SYSTEM32>NET STOP DHCPSERVER
C:\WINDOWS\SYSTEM32>NET START DHCPSERVER

5. Now you should be able to PXE Boot BartPE from an PXE enabled client computer attached to the same LAN as the TFTPD server!

NOTE! Every time a DHCP Server Option is changed you need to restart the DHCP service in order to force it to use the new settings!

A *much better* alternative TFTP service from Microsoft(!):

1. Download the PXE/TFTP service that belongs to Windows XP Embedded from Microsoft's site. Unfortunately it is stated that one should not give out the exact URL, so I will not give it out here, but search for the name of the .MSI file ("Windows XP Embedded Remote Boot Server.msi") and it might pop up somewhere ;-)

2. Run the setup and let it install all services into their preferred installation directories.

3. When the setup finishes, copy the files NTDETECT.COM, NTLDR and WINNT.SIF that you create as per step 5 in the setup of the TFTP service above and replace the ones created by the setup program in the C:\PROGRAM FILES\WINDOWS EMBEDDED\REMOTE BOOT SERVICE\DOWNLOADS directory. This directory is the equivalent for the D:\TFTPDRoot directory described in step 4 in the setup of the TFTP service above.

4. Remove Server Option 043, 066 och 067 (leaving Server Option 060!) in case they exist on the DHCP server.

5. The setting for BOOT IMAGE and BOOT PARAMETERS in the TFTP GUI are not used since we replaced the NTDETECT.COM / NTLDR to newer ones not made for these XP Embedded specific settings!

The advantage of this PXE / TFTPD service is that you can specify PXE actions per MAC-address, i.e. whether to force just a specific server to boot into PXE upon next reboot. The "standard" TFTPD server is not this flexible since all rebooting PXE clients will be handled the same way. Also, there is no need to restart the DHCP service when you change a boot setting for a specific server since this is handled automagically by this much improved (but not 110% slick) PXE / TFTPD service.

And for all of us GUI friends, there is this cool GUI where you can line up all of your servers and manage them with a souple of mouseclicks ;-)

Good luck and please do not forget where you saw this first! :w00t:

Edited by Krokodox
Link to comment
Share on other sites

  • 2 weeks later...

Thanks Krokodox :thumbup

Here a link with small VB scripts to install (or remove) and configure TFTPd service

The Windows 2000 Standalone TFTP Daemon

The 2000 binary in the archive could be replaced by the 2003 binary (using Krokodox instructions for extraction from i386 source)

It works with a WinPE image stored in a SDI file as described here :hello:

i have just changed rdpath to my SDI file in WINNT.SIF

[setupData]BootDevice = "ramdisk(0)"

BootPath = "\i386\System32\"

OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=WINPE.SDI"

Edited by Bilou_Gateux
Link to comment
Share on other sites

  • 2 weeks later...

Ahhh, SDI image! I have not messed around with those since I gave up on MS ADS (Automatic System Deployment) for being crude, unintuitive, uninformative, unmanagable, uncooperative and slooooow.

I never found the SDI to be of any good, perhaps someone could tell me what the advantage of using an SDI imag would be?

BTW, MS designed ADS to be installed on W2K3 EE *only*, but I can tell you all that tinkering with the .MSI file makes it installable on anything from XP to W2K3 Web ;-) And it runs just fine, so this barrier is more of an administrative nature than of a technical nature :whistle:

Link to comment
Share on other sites

  • 2 months later...

Using *much better* alternative TFTP service method, i have one timeout issue.

In fact, TFTPD.exe (Microsoft Trivial FTP Daemon) service included in the "Windows XP Embedded Remote Boot Server.msi" installer is exactly the same as the one you can extract from i386 source and manually configure.

Does Microsoft Windows XP TFTPD fully implements all RFC?

tftpd -?

Abstract:

This implements an RFC 783 tftp daemon.

It listens on port 69 for requests

and spawns a thread to process each request.

TFTPD USAGE and Installation:

md d:/tftpd (the StartDirectory).

copy //MohsinA_p90/test/tftpd.exe .

sc create tftpd binPath= d:/tftpd/tftpd.exe (give full path).

sc query tftpd (check if installed).

Start:

sc start tftpd -f (creates a log file).

or sc start tftpd

or net start tftpd

or sc start tftpd [-dStartDirectory][-e] [-f]

Options: -e use event log.

-f log to file.

-dStartDirectory

Info:

sc interrogate tftpd (logs will be updated).

sc query tftpd Check whether running.

Stop:

sc stop tftpd

net stop tftpd

Variables that control what files can be read/written and by whom:

StartDirectory - only files there will be accessible.

LogFile is created here.

ValidClients - Clients matching this ip address can read files.

eg. you can set it to "157.55.8?.*"

ValidMasters - clients matching this can write and read files.

eg. you can set it to "" and no one can write.

ValidReadFiles - only matching files will be served out, eg. "r*.t?t"

ValidWriteFiles- only matching files will be accepted, eg. "w*.txt"

Client:

tftp [-i] servername {get|put} src_file dest_file

-i from binary mode, else ascii mode is used.

the timeout issue when downloading image from Boot Server to local host is due to slow performance on some parts of my LAN. I have the same issue using the very basic tftp.exe command line client shipped with XP trying to get a file from server.

It's not related to your method which works fine using a commercial product:

WinAgents TFTP Server: Fast and secure TFTP Server workking as native Windows Service.

WinAgents Software Group has developed freeware replacement for standard TFTP client application that supports all necessary features: 'tsize', 'blocksize' and 'timeout' TFTP options.

Unattended Setup

Edited by Bilou_Gateux
Link to comment
Share on other sites

  • 1 year later...

Did anyone experience a client timeout after the WINNT.SIF is downloaded? I've tried TFTP with both Microsoft & WinAgent's services and my clients go into an infinite pause once this file is downloaded. Thanks for any advice you might be able to provide!

-Woody

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