MULTI-DRIVER REMOTE BOOT PXE/NBI FLOPPY/CD/HD/COM Author: Paolo Salvan (psalvan AT users.sourceforge.net) Company: XVision, Italy - www.xvision.it Last update: 2005/04/05 Based upon: Etherboot 5.4.0 - www.etherboot.org Licence: GPL ______________________________________________________________________________ * What is this package useful for? You can use it to get a PC make a remote boot (ie for building disk-less thinclient... look at http://thinstation.sf.net for an example). The remote-boot loader is supplied to you in many formats: - a bootable floppy (eb-net.dsk) - a bootable CD (eb-net.iso) - a HD-installable lilo/syslinux/grub image (eb-net.lil) - a DOS .COM executable (eb-net.com) Choose the media that best fits your needs. It can autodetect and handle about 30 PCI and ISA NICs (nearly all the NIC supported by the Etherboot project), and can boot both PXE second-stage loaders (like pxelinux.0 or Microsoft RIS) and .NBI (network boot image) file. ______________________________________________________________________________ * How do I create and use the remote boot floppy? Insert in the floppy drive a blank, just-formatted disk, and: - Under Windows: double-click on BuildFloppy.bat - Under Linux: cp eb-net.dsk /dev/fd0 Now simply set your BIOS to boot from floppy, insert the floppy and reboot. If during floppy boot you get strange errors like "0220 ax:0224 bx:0000 cx:0001 dx:0000", throw the floppy in the trash: it's broken; retry with a new, just formatted floppy. (Note: floppy disks are poorly reliable. I strongly recommend to use, when possible, the CD version) ______________________________________________________________________________ * How do I create and use the remote boot CD? Use a CD mastering sw to burn the boot CD from the supplied eb-net.iso file Now simply set your BIOS to boot from CD, insert the CD and reboot. ______________________________________________________________________________ * How do I prepare an HD for remote booting? Format the first partition of the HD with a FAT or FAT32 file system, and set it as "active". Launch - DOS/Win95/Win98/WinME: syslinux.com -ma X: mbr.bin (replacing X: with the unit refering the just formatted partition) - Win2000/WinXP: syslinux.exe -ma X: mbr.bin (replacing "X:" with the unit refering the just formatted partition) - Linux: cat mbr.bin > /dev/hdX (replacing "hdX" with the HD you are preparing, ie /dev/hda) syslinux /dev/hdXX (replacing "hdXX" with the just formatted partition, ie /dev/hda0) DOUBLE CHECK YOU ARE WORKING ON THE RIGHT HD/PARTITION Now copy in this partition the eb-net.lil file, renaming it "linux" (the default syslinux boot file; I'm too lazy to prepare a syslinux.cfg file) You should now be able to boot from this HD and it will start a remote boot. There are a lot of other ways to boot the eb-net.lil file, with other bootloaders, this simply seems to me the easiest. ______________________________________________________________________________ * How do I use the remote boot DOS executable? Simply copy eb-net.com on a bootable DOS floppy or HD, and launch it from a clean DOS environment (so don't launch it from Windows DOS sessions). Note that, due to the 64Kb size limitation of DOS .com executable, this version of the image include less drivers than the other versions. ______________________________________________________________________________ * How can I rebuild this boot image? This boot image has been created thanks to Etherboot 5.4.0 Follow these steps: - download etherboot-5.4.0.tar.gz from http://www.etherboot.org/distribution.html - tar zxvf etherboot-5.4.0.tar.gz - cd etherboot-5.4.0/src - edit Makefile.main and replace: --- # Housekeeping --- with: ---- # Rule for the multi-NIC image. (by Paolo Salvan) NETOBJS:= # Note: the 3c90x.o driver should be linked BEFORE the 3c595.o # otherwise 3c905b cards will be (badly) handled by the 3c595 driver as 3c900b cards NETOBJS+= $(BIN)/3c90x.o # PCI cards... NETOBJS+= $(BIN)/3c595.o $(BIN)/davicom.o $(BIN)/eepro100.o $(BIN)/ns8390.o $(BIN)/pcnet32.o $(BIN)/prism2_plx.o $(BIN)/rtl8139.o $(BIN)/sis900.o $(BIN)/tulip.o $(BIN)/via-rhine.o $(BIN)/r8169.o $(BIN)/forcedeth.o $(BIN)/ns83820.o $(BIN)/eepro.o $(BIN)/e1000.o # ISA cards... NETOBJS+= $(BIN)/3c503.o $(BIN)/ne.o $(BIN)/wd.o $(BIN)/3c529.o $(BIN)/3c509.o # Exclude these drivers + the belows to create the .COM image, max 65280 byte... NETOBJS+= $(BIN)/sk_g16.o $(BIN)/depca.o $(BIN)/cs89x0.o $(BIN)/prism2_pci.o $(BIN)/smc9000.o $(BIN)/natsemi.o $(BIN)/epic100.o $(BIN)/sundance.o $(BIN)/w89c840.o $(BIN)/tlan.o # Try excluding this big and rarely-used driver if you get "ERROR: code size exceeds limit!" at build-time # or system resets/hungs-up during image decompression at run-time # (uncompressed image could have exceeded low-memory...) NETOBJS+= $(BIN)/tg3.o # This driver has slow autoprobing and is rarely used, so it is better to exclude it... #NETOBJS+= $(BIN)/3c515.o $(BIN)/etherboot-net.o: $(NETOBJS) $(LD) -r $(NETOBJS) -o $@ # Housekeeping --- - edit core/main.c, and replace: --- ip.s_addr = arptable[ARP_SERVER].ipaddr.s_addr; --- with: --- char *name_tmp = fname; while ( *name_tmp != 0 ) { if ( memcmp(name_tmp, ".zpxe", 6 ) == 0 ) {*name_tmp=0;} else {++name_tmp;} } ip.s_addr = arptable[ARP_SERVER].ipaddr.s_addr; --- (with this patch the loader will cut away the trailing ".zpxe" from the filename the DHCP say it to download...in this way, it will download, for example, "thinstation.nbi" instead of "thinstation.nbi.zpxe"; this patch has been taken from http://wiki.etherboot.org -> "HackForPXEFilename" and is useful when you need to have an etherboot ".zpxe" second-stage loader because in your network there are some PXE-boot PCs and you need them to load your ".nbi" image. As our loader can directly load the ".nbi" image, it is a good thing to skip the ".zpxe" loader as it is sometime cause of slowness or unreliability. Look at the "Etherboot PXE loader" you can find in the "Contribs" section of http://thinstation.sourceforge.net/download.html for more informations) - make bin/etherboot-net.zdsk - make bin/etherboot-net.iso - make bin/etherboot-net.zlilo - make bin/etherboot-net.com - rename them in a 8+3 fashion for better compatibility with old filesystems ______________________________________________________________________________ * Useful links - Etherboot - what made this possible http://etherboot.sourceforge.net/ http://www.rom-o-matic.net/ - Syslinux - used inside the .ISO and by the HD installer http://syslinux.zytor.com/ - ThinStation - a light, full featured linux based thin-client OS http://thinstation.sourceforge.net/