//d
UPDATED 2008-05-01
My Experiences.
  • Microsoft loves to mix case. i.e. BOOTVID.dl_
  • Packet Sniffing is a life saver.
  • UNIX Lovers, hug yourself. (PE is no where near as nice as the Linux boot process)
  • TRUE RIS, isn't supported. That means no OSChooser the "Microsoft way," however this can be done with PXELinux, PXEGrub, or some other pxe menu-based system.
  • slashes, backslashes... you must use a tftp remap file.
  • Diagnostics and Error messages... I spent hours on this error:

  • See Changelog

THE HOW TO
This howto was done using:
knoppix 5.1.1 boot cd
Windows XP and or Server 2003 CD
Step 1:
Setup the environment, and create the directories
#!/bin/bash
export RISVER = "ris-linux-0.3"
export RISROOT = "/home/ris"
export TFTPROOT = "${RISROOT}/tftproot/"
mkdir -p ${TFTPROOT}/cdrom
mkdir -p ${TFTPROOT}/drivers
Step 2:
Mount the CDROM:
mount /dev/cdrom ${TFTPROOT}/cdrom
Step 3:
Install boot files required for tftp boot:
cabextract ${TFTPROOT}/cdrom/i386/startrom.n1_ -d ${TFTPROOT}/.
cp ${TFTPROOT}/cdrom/i386/setupldr.bin ${TFTPROOT}/ntldr
cp ${TFTPROOT}/cdrom/i386/ntdetect.com ${TFTPROOT}/ntdetect.com
Step 4:
Download BINL Server
tar xvzf ${RISROOT}/${RISVER}.tar.gz -C ${RISROOT}
mv ${RISROOT}/${RISVER}/* ${RISROOT}/.
Download the BINL Service at http://oss.netfarm.it/guides/pxe.php
Thanks to Gianluigi Tiesi for coding this application.
Step 5:
fix ntldr
cd ${RISROOT}
./fixloader.py ${TFTPROOT}/ntldr
Step 6:
Build the BINL drivers database:
mkdir -p ${TFTPROOT}/drivers
cabextract ${TFTPROOT}/cdrom/i386/*.in_ -d ${TFTPROOT}/drivers
cabextract ${TFTPROOT}/cdrom/i386/driver.cab -d ${TFTPROOT}/drivers
cd ${RISROOT} && ./infparser.py {TFTPROOT}/drivers
Step 7:
Change the basepath in binlsrvc.py
cp ${RISROOT}/binlsrvc.py ${RISROOT}/binlsrvc.py.orig
sed "s/\/mnt\/disk\/ris\/OSChooser\/English\//${TFTPROOT}\/cdrom\/i386\//" \
${RISROOT}/binlsrvc.py.orig > ${RISROOT}/binlsrvc.py
Step 8:
Setup TFTP Remap File
vi ${RISROOT}/tftpdremap
See file contents below
Step 9:
Setup DHCP:
vi /etc/dhcp3/dhcpd.conf
See file contents below
Step 10:
Setup SAMBA:
vi /etc/samba/smb.conf
See file contents below
Step 11:
Setup winnt.sif
vi ${TFTPROOT}/winnt.sif
See file contents below
Step 12:
Setup PORTMAP:
echo "ALL : ALL" > /etc/hosts.allow
echo "" > /etc/hosts.deny
Step 13:
Set IP Address:
ifconfig eth0 192.168.0.2
Step 14:
Start Services:
sh /etc/init.d/portmap start
sh /etc/init.d/samba start
sh /etc/init.d/dhcp3-server start
in.tftpd -l -s ${TFTPROOT} -m ${RISROOT}/tftpdremap
cd ${RISROOT}
./binlsrv.py

FILES
tftpdremap
r ^\\cdrom\\i386\\pcntpci5.sys pcntpci5.sys
r ^\\\\i386 i386
rg \\ /
r KDCOM.DL_ kdcom.dl_
r KDCOM.DLL kdcom.dll
r BOOTVID.dl_ bootvid.dl_
r BOOTVID.dll bootvid.dll
r SETUPREG.HIV setupreg.hiv
r SPDDLANG.SY_ spddlang.sy_
r SPDDLANG.SYS spddlang.sys
r WMILIB.SY_ wmilib.sy_
r WMILIB.SYS wmilib.sys
r 1394BUS.SY_ 1394bus.sy_
r 1394BUS.SYS 1394bus.sys
r PCIIDEX.SY_ pciidex.sy_
r PCIIDEX.SYS pciidex.sys
r USBPORT.SY_ usbport.sy_
r USBPORT.SYS usbport.sys
r USBD.SY_ usbd.sy_
r USBD.SYS usbd.sys
r HIDCLASS.SY_ hidclass.sy_
r HIDCLASS.SYS hidclass.sys
r HIDPARSE.SY_ hidparse.sy_
r HIDPARSE.SYS hidparse.sys
r SCSIPORT.SY_ scsiport.sy_
r SCSIPORT.SYS scsiport.sys
r CLASSPNP.SY_ classpnp.sy_
r CLASSPNP.SYS classpnp.sys
r TDI.SY_ tdi.sy_
r TDI.SYS tdi.sys
r OPRGHDLR.SY_ oprghdlr.sy_
r OPRGHDLR.SYS oprghdlr.sys
r VIDEOPRT.SY_ videoprt.sy_
r VIDEOPRT.SYS videoprt.sys
r HALAACPI.DL_ halaacpi.dl_
r HALAACPI.DLL halaacpi.dll
r iaStor iastor
r Fasttx2k fasttx2k
r S150sx8 s150sx8
r QL2300 ql2300
r Si3112 si3112
r SiSRaid sisraid
r RTL8139.SY_ rtl8139.sy_
r RTL8139.SYS rtl8139.sys
hosts.allow
ALL : ALL
hosts.deny
#empty file
winnt.sif
[data]
floppyless = "1"
msdosinitiated = "1"
OriSrc = "\\192.168.0.2\RemInst\cdrom\i386"
OriTyp = "4"
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1
[SetupData]
OsLoadOptions = "/fastdetect /noguiboot /nodebug"
SetupSourceDevice = "\Device\LanmanRedirector\192.168.0.2\RemInst\cdrom"
[Unattended]
UnattendMode=FullUnattended
UnattendSwitch="Yes"
OemPreinstall="Yes"
OemSkipEula="Yes"
FileSystem=*
WaitForReboot="No"
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore
Hibernation="No"
TargetPath = \WINDOWS
InstallFilesPath = "\\192.168.0.2\RemInst\cdrom\i386"
LegacyNIC = 1
[SystemRestore]
[GuiUnattended]
EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*
OEMSkipRegional=1
TimeZone=004
OemSkipWelcome=1
[Components]
msmsgs=off
msnexplr=off
OEAccess=off
media_clips=off
media_utopia=off
Accessopt=off
AutoUpdate=off
templates=off
fax=off
Clipbook=off
charmap=off
calc=off
hypertrm=off
rec=off
vol=off
pinball=off
freecell=off
minesweeper=off
solitaire=off
spider=off
hearts=off
zonegames=off

[UserData]
FullName = "name"
OrgName = "organization"
ComputerName = *
ProductKey="YOUR-INSTA-LLATI-ONKEY"

[RegionalSettings]
Language= "0409"
[WindowsFirewall]
Profiles=WindowsFirewall.TurnOffFirewall
[WindowsFirewall.TurnOffFirewall]
Mode=0

[Display]
BitsPerPel = 16
XResolution = 800
YResolution = 600
VRefresh = 60
[NetServices]
MS_Server=params.MS_PSched
[RemoteInstall]
Repartition = Yes
UseWholeDisk = Yes
[Shell]
DefaultStartPanelOff=Yes
DefaultThemesOff=Yes
dhcpd.conf
allow booting;
allow bootp;
default-lease-time 600;
max-lease-time 7200;

subnet 192.168.0.0 netmask 255.255.255.0 {
# Never send DHCPNAK
not authoritative;
next-server 192.168.0.2;
filename "startrom.n12";
option subnet-mask 255.255.255.0;
option domain-name "knoppix";
server-name "knoppix";
range 192.168.0.201 192.168.0.250;
}
smb.conf
[global]

panic action = /usr/share/samba/panic-action %d
guest account = root
null passwords = true
security = share
workgroup = workgroup
server string = RIS Server
syslog only = no
syslog = 0;
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
encrypt passwords = true
wins support = no
name resolve order = lmhosts host wins bcast
dns proxy = no
unix password sync = false
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
max log size = 1000
unix charset = iso-8859-15
display charset = iso-8859-15
dos charset = 850

[REMINST]
browseable = yes
read only = no
path = /home/ris/tftproot
guest ok = yes

Change Log
2008-05-01:
* Updates as Thanks to R.K. @ Cisco

* If you need to apply customizations to your install (via the *.sif file), the $oem$ folder should exist at the ROOT of the distribution point - not under the \i386 directory.
Per MS's tech pages, folders like $oem$\$1 (for 3rd party drivers, etc) should exist under the \i386 directory when doing a net install. However, our mode of installation is considered a CD-based install (even though we are doing it via the net). Thus, CD-based installs use the \$oem$ distribution point instead of \i386\$oem$. If you do a google search for "Designing a Distribution Share", you will see MS's reference articles for this. I spent the greater part of this afternoon finding this one...

* As mentioned earlier, if the driver found by binlsvr.py does not exist, put it in the \i386 and \$oem$\$1\Drivers\Nic directories instead of adding it to the /etc/tftpdremap file

* Step 6 on your web page says to "cd ${RISROOT} && ./infparser.py {TFTPROOT}/cdrom/drivers". This is incorrect because (earlier) you mention extracting the drivers to "{TFTPROOT}/drivers". If you run the infparser.py script on {TFTPROOT}/cdrom/drivers, nothing would be found because the directory does not exist (the drivers directory was created in {TFTPROOT}/cdrom/drivers. The correct statement should read, "cd ${RISROOT} && ./infparser.py {TFTPROOT}/drivers"

* In your FILES section for the tftpdremap info, the last line should have an "r" at the beginning

* In your smb.conf file, you have the statement, "guest account = root". In many cases, this is a big security breach. I removed this setting from my smb.conf file and everything worked properly.

* If you reference Sherpya's web page on making multiple installs (WXP, W2K3, W2K, etc), you will notice a few sections about setting up the source directories. These sections give commands to extract the files named startrom.n1_, setupldr.ex_, etc. The important thing to remember (again, thru trial-and-error) is the sed commands work on binary files. As a result, the replacement string (ie NTLDR --> new_file) must match in length. If the primary string is 5chars long, the new string MUST be 5chars long. Otherwise, the new binary files will become corrupt. I will send an email to Sherpya as well so he can include this in his page.

2007-06-08:
* Few typos & Scripting fixes. Thanks Ali Ustek.
* BINL Update to v0.3
2007-05-10:
Ahhhh!, the mysterious crashing!? You will need to know the "name" of the driver that the client is asking for.
Don't worry, this is easy.
The first time you boot the client system, you will notice similar output from binlsrvc.py calling for a *.sys file
[S] drv: pcntpci5.sys - Len 0xc (12)
See pcntpci5.sys?
This is the driver information that was requested by the Client Installation Environment to the server BINL daemon.
BINL had responded by matching the PCI string to the appropriate driver.
This database of drivers was from infparser.py and parsing the *.inf files.
Example:
Checking PCI\VEN_1022&DEV_2000&SUBSYS_20001002
It didn't find a match, so it drops the subsystem hoping there is a more generic match.
Checking PCI\VEN_1022&DEV_2000
Found PCI\VEN_1022&DEV_200 in netadm2.inf


Ah HA!,
The match is there and that is the file pcntpci5.sys.
So, you will need to do a cabextract for your driver
OR
cabextract all drivers.
example:
cabextract ${TFTPROOT}/cdrom/i386/driver.cab -F yourdriver_from_watching_binl_output.sys -d ${TFTPROOT}
LASTLY, you will need to change your tftpdremap file for this driver.
So, instead of this:
r ^\\cdrom\\i386\\pcntpci5.sys pcntpci5.sys
it would be the name of your driver. If you get stuck here, feel free to email

2007-05-09:
Quick note on running infparser, see below.
I have run into the scenario where RTL8139.SYS wouldn't load... the .inf file was there, but the sys file was not on the CD... weird.
I got the file from the net and did a redirect on the tftpdremap, it worked.

Troubleshooting
There are a few stages of troubleshooting to determine the error.
The first stage you require the following setup to be done correctly.
STAGE 1
  • Two systems, either physical or virtual
  • A network segment among those two systems, one is the Server, the other is the Client
    • IP Address Set on the Server, the interface is UP.
  • The server must have the following daemons:
    • TFTP
      • tftp remap file otherwise you will get errors
    • DHCP
  • The client must be network bootable
    • The first time this system is turned on, the first boot must be done by the network
    • This system must be on the same network segment as the server
  • If this stage is setup correctly the client system will boot and behave as the video shown below.
    Once completed Stage 2 will begin


All of these errors are related to TFTP. Check your remap file!



The videos are not that great, but it will give you an idea what to expect.
STAGE 2
  • This stage requires the server to be running a BINL daemon.
    • infparser.py must be ran
    • binlsrvc.py must be running (check by running ps a | grep binlsrv.py
      do you see python ./binlsrv.py ?)
  • Once the Client has contacted the BINL Service on the server BINL will output the following:
  • Recv NCQ len = 48
    NCQ Driver request
    [R] Vid: 0x1022
    [R] Pid: 0x2000
    [R] rev_u1 = 0x2
    [R] rev_u2 = 0x0
    [R] rev_u3 = 0x0
    [R] rev = 0x10
    [R] rev2 = 0x88
    [R] subsys = 0x20001022
    Checking PCI\VEN_1022&DEV_2000&SUB_20001022
    Checking PCI\VEN_1022&DEV_2000
    Found PCI\VEN_1022&DEV_2000 in netamd2.inf
    [S] Packet len = 0xc4 (196)
    [S] Result code: 0x0
    [S] type: 0x2
    [S] base offset = 0x24 (36)
    [S] drv_off = 0x50 (80)
    [S] srv_off: 0x6a (106) -> 98 from start
    [S] plen: 0x56 (86)
    [S] p_off: 0x76 (118) -> 110 from start
    [S] hid: PCI\VEN_1022&DEV_2000 - Len 0x15 (21)
    [S] drv: pcntpci5.sys - Len 0xc (12)
    [S] srv: PCnet - Len 0x5 (5)
    [S] Len data now -2 = 0x54 (84)
    [S] Description (REG_EXPAND_SZ [2]) = Scheda Ethernet PCI AMD PCNET Family
    [S] Characteristics (REG_SZ [1]) = 132
    [S] BusType (REG_SZ [1]) = 5
    [S] Total Params: 3
  • Once this information has been passed, the Client will continue to copy files via TFTP.
  • If this Stage is successful you will see the following as shown in the video below. Once completed The system will continue to Stage 3 automatically.
The videos are not that great, but it will give you an idea what to expect.
STAGE 3
  • At this stage, the PE (Pre installation Environment) has been copied to a ram drive.
  • The PE system will connect to the samba share. This is the "Setup is starting Windows" as soon as that message has cleared it has successfully connected to the samba share.
  • The Server must have the proper SAMBA configuration, and the SAMBA daemon must be running.
  • By running smbstatus on the server, you will notice the Client has connected.
  • If this stage is set up properly, you will see the following as shown in the video below:
The videos are not that great, but it will give you an idea what to expect.
STAGE 4
  • Windows Unattended without user intervention
  • If this process interrupts and prompts the user, check your winnt.sif
The videos are not that great, but it will give you an idea what to expect.
STAGE 5
The Desktop
The videos are not that great, but it will give you an idea what to expect.