Gnork
26 Feb 2010, 23:58
I've been freaking around a bit with some shizzle, and keeping a doc here for reference backup and to share the knowledge...
Applies to: http://www.filefactory.com/file/b194824/n/tftpboot.rar mirror: http://www.megafileupload.com/en/file/199501/tftpboot-rar.html another mirror: http://rapidshare.com/files/356366599/tftpboot.rar.html (6Mb rar, source files and links included, and I think it's legal since it's share/freeware used, so no worries)
PXE QUICK SETUP GUIDE
This file contains a pxe environment with some basic files needed to boot clients from the network. Network clients are currently able to: run Boot & Nuke, run GParted, run Panda Antivirus with today's signatures file, run (unattended) custom XP or Win7 setup (both x86 or x64), run a NT Password Recovery tool, or boot in MsDOS with network support.
Unpack, create shortcuts for the files in tftpboot\run on the desktop & setup network:
Your machine: 192.168.9.3 – gateway 192.168.9.1 – mask 255.255.255.0
Or edit your own in the DHCP tab when TFTPD is running from a batchfile, OR manually edit the three tftpd32 ini files in tftpboot\init folder.
DO NOT have windows explorer open when starting a batchfile (isocmd will bug about permission denied to mount images) You can open explorer while the batch window is running, but before you close HFS and/or TFTPD (which ends the batchfile), you MUST have explorer closed again.
In batches where both HFS and TFTPD are opened by the batchfile: when done, first close HFS and then TFTPD to terminate the batchfile properly (otherwise symlinks are not deleted on exit).
The package comes with 3 ini files for TFPTD, which get linked during a batchfile in order to configure the TFTPD server. Included are win, lin and dos files: the tftpd32-win.ini loads a WinPE from Windows 7 with a custom winpe.wim file which you make yourself. The tftpd-dos.ini loads Bart network boot disk, an older tool for older machines. You will end up on a command prompt with network access to a mounted iso or cdrom for instance, from which you can launch a windows setup or whatever. The tftpd32-lin.ini configures the TFTPD server to use pxelinux.0 and boot linux iso images. Have a look through the various batchfiles to get an understanding on when which things are linked, and it will be quite easy to add any other tools yourself with new batches!
Iso files: can either be dropped directly into the tftpboot\iso folder, or linked from their original location. See tftp\run\Makelinks.bat and edit the iso paths in there for your own use before running it. My original drive setup is below and is recommended if you want to run the files as is:
N:\tftpboot (or any folder of your choice) (partition must be 200+ Mb, depending on your setup)
V:\ (virtual cdrom drive where images are mounted with ultraiso)
I:\ISO Files\BootNuke\dban-beta.2006042900_i386.iso (Darik's Boot & Nuke)
I:\ISO Files\GParted\gparted-live-0.5.1-1.iso (GParted)
I:\ISO Files\PandaLive\PandaSafecd.3.4.3.5.iso (Antivirus, updates with current signature file)
I:\ISO Files\XP Professional\Microsoft Windows XP Professional x64 SP2 UK.iso
I:\ISO Files\XP Professional\Microsoft Windows XP Professional SP2 UK.iso
I:\ISO Files\XP Professional\Microsoft Windows XP Professional SP2 NL.iso
I:\ISO Files\Password Recovery bootCD\cd080802.iso
I:\ISO Files\Windows 7\7100.0.090421-1700_x86fre_client_en-us_retail_ultimate-grc1culfrer_en_dvd.iso
I:\ISO Files\Windows 7\7100.0.090421-1700_x64fre_client_en-us_Retail_Ultimate-GRC1CULXFRER_EN_DVD.iso
Edit "Boot Antivirus.bat" and replace USERNAME and PASSWORD with your own panda antivirus registration details. If the mksquashfs command fails on a ZLIB error, extract the squashfs-root folder onto another partition or drive at the unsquashfs command – that usually does the job.
Folder tftpboot\wim should contain manually added wim files for specialized boot, for example: winpe-XP-x86.wim, winpe-XP-x64.wim, winpe-W7-x86.wim, winpe-W7-x64.wim and so on.
Batchfiles currently work with only 2 basic wim filenames: winpe-x86.wim and winpe-x64.wim
Howto make a wim:
Download http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&displaylang=en
^^ (genuine windows validation needed)
Mount/burn and run the installer. From StartMenu, choose Deployment Tools Command Prompt. Only 4 commands (in bold) in order to make a wim with simple network share:
copype x86 c:\PEBuild
OR
copype amd64 c:\PEBuild
(c:\PEBuild can be any folder you like, x86 is for creating 32 bit, amd64 is for 64 bit winPE)
you get a prompt C:\PEBuild, type:
imagex /mountrw winpe.wim 1 mount
notepad mount\windows\system32\startnet.cmd
Here you can add any commands you like on a new line below "winpeinit"
for example:
net use y: \\servername\cdrom /user:username password (will mount a network drive)
y:\i386\winnt32 /unattend:unattend.txt /s:y:\i386 (will launch a ris install from xp cdrom)
This can be a shared windows or smb folder, servername is the computer name or ip, there MUST be a username and password set on the computer hosting this stuff! Blank passwords don't work.)
When done, close notepad, save on exit and type:
imagex /unmount /commit /c:\pebuild\mount
...then move the c:\pebuild\winpe.wim to the tftpboot\wim folder, rename it properly and delete the pebuild folder b4 making another wim file for x64. I used names winpe-x86.wim and winpe-x64.wim etc for a start. The batch files included are looking for those names, and since they are linked on demand, you can eventually use many custom wim files as you like – Done!
For mounting linux iso's using pxe there can be many methods. I used several methods, check out the *.pxe.ini files in tftpboot\init Those files get linked on demand to pxelinux.cfg\default Sometimes linking isolinux.cfg from an iso (like boot&nuke) already works.
The *HFS and *VFS files are used by HFS fileserver and should be renamed/linked for new iso's to maintain consistency. If your tftpboot folder is not in N:\tftpboot then you might have to re-add the filesystem.squashfs file used by Panda antivirus to the HFS server. Run the batchfile, and in the HFS window go to Menu|Add Files...Browse to your tftpboot folder. When done press Ctrl-S. Save to tftpboot\PandaLive.vfs (you'll notice it with a shortcut arrow icon) and overwrite. Changes will be written to tftpboot\init\PandaLive.vfs automatically, due to the symbolic link.
Download links for the stuff used:
Handy blabla - http://blog.ryantadams.com/2008/02/01/how-to-boot-from-the-network-pxe-boot-with-tftp-and-windows-pe/
^^ DOWNLOADLINK TO TFTPBOOT.ZIP on page = nice for initial setup. Later I replaced almost all files in tftpboot\boot with win7 versions of those files (can be found after mounting the winpe.wim in folder mount\windows\boot\pxe. Replacing is safe EXCEPT for files bootmgr.exe boot.sdi and BCD, probably need to edit it b4 using the default ones provided, and i didn't bother)
TFTPD server - http://tftpd32.jounin.net/download/Tftpd32-3.35-setup.exe
HTTP fileserver - http://www.rejetto.com/hfs/?f=dl
WGET for windows - http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe
(used everything from the bin folder)
WGET dependencies - http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip (not needed on my system it seems)
SYSLINUX bootloader - http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.84.zip (extracted core/pxelinux.0 for usage in the tftpboot folder)
ye olde unzip - ftp://ftp.th-soft.com/UNZIP.EXE
Tools for editing Squashfs filesystems - ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/
or
http://download.nicksoft.info/linux/backuplivecd/squashfs-tools.zip
WinPE for Windows7 - http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&displaylang=en
UltraISO – http://www.ezbsystems.com/ultraiso/download.htm
(using Isocmd for mounting the iso files to a virutal drive, use any tool you like tho)
Panda SafeCD – http://research.pandasecurity.com/panda-safecd-3-4-3-5-released/
note: edit the antivirus batch file and put in your USERNAME and PASSWORD for signature file!
Darik's Boot&Nuke – http://sourceforge.net/projects/dban/files/dban-beta/dban-beta.2007042900/dban-beta.2007042900_i386.zip/download
Gparted – http://sourceforge.net/projects/gparted/files/gparted-live-stable/0.5.1-1/gparted-live-0.5.1-1.iso/download
Password recovery bootcd iso http://pogostick.net/~pnh/ntpasswd/ http://pogostick.net/~pnh/ntpasswd/cd080802.zip
NFS server (not used here but might be handy) - http://www.hanewin.net/nfs-e.htm
http://flimflan.com/blog/DeployAWinPE20ImageUsingPXEAndTheWAIK.aspx
hmmm something more to look into ^^ it's about editing the BCD file..
Some may ask 'what the heck is this all about?'
- Well... at the end, with a setup like this, many cups of coffee, some proper hardware and a lot more freaking, it SHOULD be possible to boot a diskless station from your network, and either load some small linux distro, or WinPE with added Worms game, and play! xD xD Why? Just cuz of the fun of it, lol!
edit: just turn off UAC in win7 if you get annoyed by 'no privilege' error from mklink even while being administrator :s
Applies to: http://www.filefactory.com/file/b194824/n/tftpboot.rar mirror: http://www.megafileupload.com/en/file/199501/tftpboot-rar.html another mirror: http://rapidshare.com/files/356366599/tftpboot.rar.html (6Mb rar, source files and links included, and I think it's legal since it's share/freeware used, so no worries)
PXE QUICK SETUP GUIDE
This file contains a pxe environment with some basic files needed to boot clients from the network. Network clients are currently able to: run Boot & Nuke, run GParted, run Panda Antivirus with today's signatures file, run (unattended) custom XP or Win7 setup (both x86 or x64), run a NT Password Recovery tool, or boot in MsDOS with network support.
Unpack, create shortcuts for the files in tftpboot\run on the desktop & setup network:
Your machine: 192.168.9.3 – gateway 192.168.9.1 – mask 255.255.255.0
Or edit your own in the DHCP tab when TFTPD is running from a batchfile, OR manually edit the three tftpd32 ini files in tftpboot\init folder.
DO NOT have windows explorer open when starting a batchfile (isocmd will bug about permission denied to mount images) You can open explorer while the batch window is running, but before you close HFS and/or TFTPD (which ends the batchfile), you MUST have explorer closed again.
In batches where both HFS and TFTPD are opened by the batchfile: when done, first close HFS and then TFTPD to terminate the batchfile properly (otherwise symlinks are not deleted on exit).
The package comes with 3 ini files for TFPTD, which get linked during a batchfile in order to configure the TFTPD server. Included are win, lin and dos files: the tftpd32-win.ini loads a WinPE from Windows 7 with a custom winpe.wim file which you make yourself. The tftpd-dos.ini loads Bart network boot disk, an older tool for older machines. You will end up on a command prompt with network access to a mounted iso or cdrom for instance, from which you can launch a windows setup or whatever. The tftpd32-lin.ini configures the TFTPD server to use pxelinux.0 and boot linux iso images. Have a look through the various batchfiles to get an understanding on when which things are linked, and it will be quite easy to add any other tools yourself with new batches!
Iso files: can either be dropped directly into the tftpboot\iso folder, or linked from their original location. See tftp\run\Makelinks.bat and edit the iso paths in there for your own use before running it. My original drive setup is below and is recommended if you want to run the files as is:
N:\tftpboot (or any folder of your choice) (partition must be 200+ Mb, depending on your setup)
V:\ (virtual cdrom drive where images are mounted with ultraiso)
I:\ISO Files\BootNuke\dban-beta.2006042900_i386.iso (Darik's Boot & Nuke)
I:\ISO Files\GParted\gparted-live-0.5.1-1.iso (GParted)
I:\ISO Files\PandaLive\PandaSafecd.3.4.3.5.iso (Antivirus, updates with current signature file)
I:\ISO Files\XP Professional\Microsoft Windows XP Professional x64 SP2 UK.iso
I:\ISO Files\XP Professional\Microsoft Windows XP Professional SP2 UK.iso
I:\ISO Files\XP Professional\Microsoft Windows XP Professional SP2 NL.iso
I:\ISO Files\Password Recovery bootCD\cd080802.iso
I:\ISO Files\Windows 7\7100.0.090421-1700_x86fre_client_en-us_retail_ultimate-grc1culfrer_en_dvd.iso
I:\ISO Files\Windows 7\7100.0.090421-1700_x64fre_client_en-us_Retail_Ultimate-GRC1CULXFRER_EN_DVD.iso
Edit "Boot Antivirus.bat" and replace USERNAME and PASSWORD with your own panda antivirus registration details. If the mksquashfs command fails on a ZLIB error, extract the squashfs-root folder onto another partition or drive at the unsquashfs command – that usually does the job.
Folder tftpboot\wim should contain manually added wim files for specialized boot, for example: winpe-XP-x86.wim, winpe-XP-x64.wim, winpe-W7-x86.wim, winpe-W7-x64.wim and so on.
Batchfiles currently work with only 2 basic wim filenames: winpe-x86.wim and winpe-x64.wim
Howto make a wim:
Download http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&displaylang=en
^^ (genuine windows validation needed)
Mount/burn and run the installer. From StartMenu, choose Deployment Tools Command Prompt. Only 4 commands (in bold) in order to make a wim with simple network share:
copype x86 c:\PEBuild
OR
copype amd64 c:\PEBuild
(c:\PEBuild can be any folder you like, x86 is for creating 32 bit, amd64 is for 64 bit winPE)
you get a prompt C:\PEBuild, type:
imagex /mountrw winpe.wim 1 mount
notepad mount\windows\system32\startnet.cmd
Here you can add any commands you like on a new line below "winpeinit"
for example:
net use y: \\servername\cdrom /user:username password (will mount a network drive)
y:\i386\winnt32 /unattend:unattend.txt /s:y:\i386 (will launch a ris install from xp cdrom)
This can be a shared windows or smb folder, servername is the computer name or ip, there MUST be a username and password set on the computer hosting this stuff! Blank passwords don't work.)
When done, close notepad, save on exit and type:
imagex /unmount /commit /c:\pebuild\mount
...then move the c:\pebuild\winpe.wim to the tftpboot\wim folder, rename it properly and delete the pebuild folder b4 making another wim file for x64. I used names winpe-x86.wim and winpe-x64.wim etc for a start. The batch files included are looking for those names, and since they are linked on demand, you can eventually use many custom wim files as you like – Done!
For mounting linux iso's using pxe there can be many methods. I used several methods, check out the *.pxe.ini files in tftpboot\init Those files get linked on demand to pxelinux.cfg\default Sometimes linking isolinux.cfg from an iso (like boot&nuke) already works.
The *HFS and *VFS files are used by HFS fileserver and should be renamed/linked for new iso's to maintain consistency. If your tftpboot folder is not in N:\tftpboot then you might have to re-add the filesystem.squashfs file used by Panda antivirus to the HFS server. Run the batchfile, and in the HFS window go to Menu|Add Files...Browse to your tftpboot folder. When done press Ctrl-S. Save to tftpboot\PandaLive.vfs (you'll notice it with a shortcut arrow icon) and overwrite. Changes will be written to tftpboot\init\PandaLive.vfs automatically, due to the symbolic link.
Download links for the stuff used:
Handy blabla - http://blog.ryantadams.com/2008/02/01/how-to-boot-from-the-network-pxe-boot-with-tftp-and-windows-pe/
^^ DOWNLOADLINK TO TFTPBOOT.ZIP on page = nice for initial setup. Later I replaced almost all files in tftpboot\boot with win7 versions of those files (can be found after mounting the winpe.wim in folder mount\windows\boot\pxe. Replacing is safe EXCEPT for files bootmgr.exe boot.sdi and BCD, probably need to edit it b4 using the default ones provided, and i didn't bother)
TFTPD server - http://tftpd32.jounin.net/download/Tftpd32-3.35-setup.exe
HTTP fileserver - http://www.rejetto.com/hfs/?f=dl
WGET for windows - http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe
(used everything from the bin folder)
WGET dependencies - http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip (not needed on my system it seems)
SYSLINUX bootloader - http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.84.zip (extracted core/pxelinux.0 for usage in the tftpboot folder)
ye olde unzip - ftp://ftp.th-soft.com/UNZIP.EXE
Tools for editing Squashfs filesystems - ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/
or
http://download.nicksoft.info/linux/backuplivecd/squashfs-tools.zip
WinPE for Windows7 - http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&displaylang=en
UltraISO – http://www.ezbsystems.com/ultraiso/download.htm
(using Isocmd for mounting the iso files to a virutal drive, use any tool you like tho)
Panda SafeCD – http://research.pandasecurity.com/panda-safecd-3-4-3-5-released/
note: edit the antivirus batch file and put in your USERNAME and PASSWORD for signature file!
Darik's Boot&Nuke – http://sourceforge.net/projects/dban/files/dban-beta/dban-beta.2007042900/dban-beta.2007042900_i386.zip/download
Gparted – http://sourceforge.net/projects/gparted/files/gparted-live-stable/0.5.1-1/gparted-live-0.5.1-1.iso/download
Password recovery bootcd iso http://pogostick.net/~pnh/ntpasswd/ http://pogostick.net/~pnh/ntpasswd/cd080802.zip
NFS server (not used here but might be handy) - http://www.hanewin.net/nfs-e.htm
http://flimflan.com/blog/DeployAWinPE20ImageUsingPXEAndTheWAIK.aspx
hmmm something more to look into ^^ it's about editing the BCD file..
Some may ask 'what the heck is this all about?'
- Well... at the end, with a setup like this, many cups of coffee, some proper hardware and a lot more freaking, it SHOULD be possible to boot a diskless station from your network, and either load some small linux distro, or WinPE with added Worms game, and play! xD xD Why? Just cuz of the fun of it, lol!
edit: just turn off UAC in win7 if you get annoyed by 'no privilege' error from mklink even while being administrator :s