{"version":"1.0","provider_name":"Jui-Nan Lin&#039;s Blog","provider_url":"https:\/\/jnlin.org","author_name":"jnlin","author_url":"https:\/\/jnlin.org\/author\/jnlin\/","title":"Remote Install WinXP from a FreeBSD box","html":"1. Install tftp-hpa (\/usr\/ports\/ftp\/tftp-hpa)\r\n  Install samba3, perl, python\r\n\r\n2. Set pxeboot environment\r\n  Ref: <a href=\" http:\/\/jnlin.org\/2006\/10\/29\/141\/\"> http:\/\/jnlin.org\/2006\/10\/29\/141\/<\/a>\r\n\r\n3. Change tftpd server to tftp-hpa\r\n  \/usr\/local\/libexec\/in.tftpd in.tftpd -v -m \/tftpboot\/rules -s \/tftpboot\r\n\r\n4. Write rules\r\n (Warning! If you apply my rule, all filenames in tftproot must be lowercase)\r\n  # cat > \/tftpboot\/rules\r\nri      ^[a-z]:                         # Remove \"drive letters\"\r\nrg      \\\\              \/               # Convert backslashes to slashes\r\nrg      \\#              @               # Convert hash marks to @ signs\r\nrg      \/..\/            \/..no..\/        # Convert \/..\/ to \/..no..\/\r\nrg      A       a\r\nrg      B       b\r\nrg      C       c\r\nrg      D       d\r\nrg      E       e\r\nrg      F       f\r\nrg      G       g\r\nrg      H       h\r\nrg      I       i\r\nrg      J       j\r\nrg      K       k\r\nrg      L       l\r\nrg      M       m\r\nrg      N       n\r\nrg      O       o\r\nrg      P       p\r\nrg      Q       q\r\nrg      R       r\r\nrg      S       s\r\nrg      T       t\r\nrg      U       u\r\nrg      V       v\r\nrg      W       w\r\nrg      X       x\r\nrg      Y       y\r\nrg      Z       z\r\nr       ^\/(.*)          \\1\r\n\r\n5. extract I386 files from Windows XP installation CD\r\n\r\n(Ref: <a href=\"http:\/\/oss.netfarm.it\/guides\/ris-linux.php\">http:\/\/oss.netfarm.it\/guides\/ris-linux.php<\/a>)\r\n\r\n- Copy i386 directory from the installation media to a subdir called winxp\r\n in the ris working directory\r\n\r\n- Extract the pxe loader:\r\n cabextract <source dir>\/i386\/STARTROM.N1_\r\n\r\n- Modify the name of the loader from NTLDR to XPLDR:\r\n sed -i -e 's\/NTLDR\/XPLDR\/gi' startrom.n12\r\n\r\n- Move the modified pxe loader to tftpd root, and call it winxp.0\r\n\r\n- Extract the setuploader, using cabextract:\r\n cabextract <\/source><source dir>\/i386\/SETUPLDR.EX_\r\n\r\n- Modify the name of the response file from winnt.sif to winxp.sif\r\n sed -i -e 's\/winnt\\.sif\/winxp\\.sif\/gi' setupldr.exe\r\n\r\n- Modify the name of ntdetect from ntdetect.com to ntdetect.wxp\r\n sed -i -e 's\/ntdetect\\.com\/ntdetect\\.wxp\/gi' setupldr.exe\r\n\r\n- Move the modified setuploader to tftpd root, and call it xpldr\r\n\r\n- Copy <\/source><source dir>\/i386\/NTDETECT.COM to tftpd root\r\n and call it ntdetect.wxp\r\n\r\n6. Create winxp.sif\r\n\r\n(Ref: <a href=\"http:\/\/oss.netfarm.it\/guides\/ris-linux.php\">http:\/\/oss.netfarm.it\/guides\/ris-linux.php<\/a>)\r\n\r\n==\r\n[data]\r\nfloppyless = \"1\"\r\nmsdosinitiated = \"1\"\r\n; Needed for second stage\r\nOriSrc = \"\\\\YOUR_SERVER_NAME\\YOUR_SHARE_NAME\\winxp\\i386\"\r\nOriTyp = \"4\"\r\nLocalSourceOnCD = 1\r\nDisableAdminAccountOnDomainJoin = 1\r\n\r\n[SetupData]\r\nOsLoadOptions = \"\/fastdetect\"\r\n; Needed for first stage\r\nSetupSourceDevice = \"\\Device\\LanmanRedirector\\YOUR_SERVER_NAME\\YOUR_SERVER_SHARE\\winxp\"\r\n\r\n[UserData]\r\nComputerName = *\r\n; if needed\r\n;ProductID=\r\n==\r\n\r\n *** Remember to set the share folder in the samba server ***\r\n\r\nRef: <a href=\"http:\/\/oss.netfarm.it\/guides\/pxe.php\">http:\/\/oss.netfarm.it\/guides\/pxe.php<\/a>\r\n\r\n[REMINST]\r\n    path = \/mnt\/disk\/ris\r\n    browsable = true\r\n    read only = No\r\n    guest ok = Yes\r\n\r\n7. Install NIC drivers to i386\/inf\r\n  cp nicdrivers\/* i386\/inf\r\n  ln i386\/inf\/* i386\/*\r\n\r\n8. Rename all files in winxp to lowercase\r\n<pre>\r\nfind .\/ -depth \\\r\n| perl -ne 'chomp;m&lt;\/[^\/]*$&gt;;$d=$`;$_=$f=$&;'\\\r\n's\/([\\x80-\\xFF].)|(\\w)\/$1\\l$2\/g;system \"echo\",$d.$f,$d.$_ if $f ne $_'\r\n<\/pre>\r\n9. Get Binl Server and extract it\r\n  fetch http:\/\/oss.netfarm.it\/guides\/ris-linux-0.2.tar.gz\r\n  tar zxf http:\/\/oss.netfarm.it\/guides\/ris-linux-0.2.tar.gz\r\n  cd ris-linux-0.2\r\n\r\n10. Run infparser.py\r\n  .\/infparser.py \/where\/is\/winxp\/i386\/inf\r\n\r\n11. Run .\/binlsrv.py\r\n\r\n12. Go to install Windows XP :)\r\n\r\n** Useful Ref **\r\n<a href=\"http:\/\/oss.netfarm.it\/guides\/pxe.php\">http:\/\/oss.netfarm.it\/guides\/pxe.php<\/a>\r\n<a href=\"http:\/\/oss.netfarm.it\/guides\/ris-linux.php\">http:\/\/oss.netfarm.it\/guides\/ris-linux.php<\/a>\r\n<a href=\"http:\/\/syslinux.zytor.com\/pxe.php\">http:\/\/syslinux.zytor.com\/pxe.php<\/a><\/source>","type":"rich"}