How to create Network Bootable Images under Windows
Copyright © 2003 Herbert Hanewinkel, Neuried
Many people mailed me questions about network booting a PC using my haneWIN DHCP Server. This short guide should give you starting point and an example.
You can not create a copy of your preferred OS in a file and hope that the BOOT-ROM in a client can download and understand it. As in the real world both parties must speak the same language (protocol) to understand each other.
But there is no common standard for remote booting a PC over a network. It exists a least a commercial proposal called PXE and a public proposal called Netboot.
The PXE specification was setup by Intel but is no longer supported by them. PXE implementations sometimes use non standard DHCP options and protocols (Some PXE BOOT ROMs seem to require a special PXE server, a DHCP server running on another port).
There are two projects based on the Netboot specification: Etherboot and Netboot itself.
Etherboot and Netboot differ only in the way a BOOT-ROM is created.
Because the remote boot solutions are targeted for creating diskless Unix clients, the solutions require an Unix OS for creating the boot images. This makes sense for remote booting Linux, FreeBSD, ... but not for remote booting a DOS client from Windows.
This step-by-step guide is an example of how to create a network bootable DOS image using the Etherboot solution. It does not require an unix system for creating the boot image. For details about the Etherboot/Netboot specification and the mknbi tools please read the documentation of the mknbi software and visit the Etherboot web site.
Remote booting Windows is NOT as easy because there is no network file system that can be easily used during the booting process for accessing and loading further files from a network file server.
Qualystem LiteNET PC offered a solution to boot a Windows 9x diskless client from a Windows server. It is based on loading a realmode NDIS2 driver, making networking available before Windows is loaded. The client needs a PXE BOOT ROM or floppy.
If you find some interesting links about remote booting solutions let me know.
If you have an ethernet card supporting PXE you can make use of Etherboot as well. With the Etherboot BOOT-ROM code available from ROM-O-MATIC as PXE download image, you can setup a two stage boot loader.
The boot file is selected by the DHCP server based on a vendor class identifier. The PXE ROM code includes the vendor class identifier "PXEClient" and the Etherboot code includes the vendor class identifier "Etherboot".
- The PXE code in ROM downloads the Etherboot ROM code for your network card in PXE format.
- The Etherboot code is executed in RAM and downloads the desired Etherboot OS image.
The Etherboot/Netboot solution normally uses Linux for preparing the images, but with a few modifications mknbi can run under Windows as well. You need:
- a PC with a network card that has a BOOT-ROM socket.
For testing the ROM code, BOOT-ROM emulations on a floppy disk are available.
- a DHCP and TFTP server for Windows. The haneWIN DHCP Server for Windows has a built-in TFTP server. No extra TFTP server is required
- to generate the Etherboot image you need Perl for Windows. I use ActivePerl build 517 from ActiveState under Windows 98 and Windows XP.
- the modified Etherboot mknbi tools and fdimage.exe from this zip archive for creating Etherboot images under Windows.
Creating bootable images
Etherboot and Netboot use the same specification for remote booting. They differ only in the way a BOOT-ROM is created.
More or less all ethernet cards are delivered with a DOS PacketDriver.
Netboot uses this PacketDriver to give you a chance to create a BOOT-ROM even for an exotic network card. While it sounds fine in the first moment, at a closer look a problem shows up. PacketDrivers of modern network cards are really huge and even using data compression it is hard to get the size of the ROM code including the PacketDriver below the standard BOOT-ROM size of 32K.
Therefore I prefer Etherboot.
Etherboot uses ethernet drivers available for Linux and because of ROM-O-MATIC it is very easy to get a BOOT-ROM for an ethernet card. Exotic networks cards may be not supported, but it is easier, faster and cheaper to replace the network card than to build your own BOOT-ROM.
- Step 1: The BOOT-ROM code
For testing the ROM code with your network card ROM-O-MATIC provides a BOOT-ROM emulation on floppy disk. I recommend to use this feature for testing your configuration.
Go to the ROM-O-MATIC web site to generate and download the floppy disk emulation of a BOOT-ROM for your network card. (Extension: zdsk)
For the following DOS example you don't need to set any ROM options offered by ROM-O-MATIC. But if you want to boot e.g. FreeBSD later using the same BOOT-ROM goto the options page and set the appropriate option. Setting options will increase the size of the BOOT-ROM, therefore make sure the resulting ROM code fits in a supported ROM size of your ethernet card.
If you start with the floppy disk emulation copy the BOOT-ROM image to a floppy disk:
fdimage -f 1.44M xyz.zdsk a:
Test the ROM code with your network card. e.g. try to boot the floppy with the ROM code.
Loading ROM image... should appear on the top of screen and the PC should start sending out DHCP requests. If the computer fails to execute the ROM code, the ROM image is not appropriate for your network card.
- Step 2: Create a bootable DOS image
- Create a bootable DOS or FreeDOS floppy disk.
- As long as you have space you can add any program you like to the disk.
- Copy the whole floppy disk to an image file:
fdimage -f 1.44M a: image.a
This requires my modified fdimage.exe or you can use the enhanced diskcopy.exe from FreeDOS.
- Step 3: Create an Etherboot image
The perl script mknbi.pl converts the disk image into a bootable etherboot image. mknbi-1.4.1-win is a modified version of mknbi-1.4.1 to get it running under ActivePerl on Windows. There is no need to recompile the mknbi software. If you want to recompile the sources of the header files you must install the mknbi software under Linux or FreeBSD.
This step differs for MSDOS and FreeDOS:
copy a:kernel.sysfor MSDOS:
mknbi.pl --format=nbi --target=fdos ..\kernel.sys ..\image.a >..\dos.bin
mknbi.pl --format=nbi --target=dos ..\image.dos >..\dos.bin
I created mkimage.bat for the command sequence.
- Step 4: Setup of DHCP Server
- Install and start the haneWIN DHCP server.
- Copy the created Etherboot image dos.bin to the TFTP servers root directory and enable the TFTP server.
- Set up a configuration profile for your client(s). You must at least specify an IP address range for the clients or use a static entry for the client.
- In the Boot tab of the configuration profile specify the name dos.bin as the boot file name for your client.
- Step 5: Boot the client
The client should remote boot by downloading the image in a RAM disk and start DOS from the RAM disk.
- Step 6: For PXE clients, get the PXE code
Go to the ROM-O-MATIC web site to generate and download a PXE image of the BOOT-ROM for your network card. (Extension: zpxe)
- Copy the downloaded image xyz.zpxe to the TFTP servers root directory.
- In the Boot tab of the configuration profile specify the name xyz.zpxe as the alternate boot file name if the Vendor Class Id matches "PXEClient"
- Step 7: For non PXE clients, create a BOOT-ROM:
Go to the ROM-O-MATIC web site to generate and download the binary BOOT-ROM code for your network card. Copy it on a EPROM or EEPROM for your network card.