home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 August / PCWorld_1999-08_cd.bin / doc / HOWTO / mini / Remote-Boot < prev    next >
Text File  |  1999-03-02  |  131KB  |  3,499 lines

  1.   Linux Remote-Boot mini-HOWTO:      Configuring Remote-Boot
  2.   Workstations         with Linux, DOS, Windows 95/98 and Win¡
  3.   dows NT
  4.   Marc Vuilleumier Stⁿckelberg, David Clerc
  5.   v3.19, February 1999
  6.  
  7.   This document describes how to set up a very robust and secure server-
  8.   based configuration for a cluster of PCs, allowing each client to
  9.   choose at boot-time which operating system to run. The key of this
  10.   configuration is a bootprom based program, which let the user choose
  11.   at boot time one of several boot images. This configuration is appli¡
  12.   cable using InCom TCP/IP Bootprom (add-on for most network cards) or
  13.   any PXE-compliant Boot ROM (ready-to-use in most recent PC with built-
  14.   in network cards).  The most up-to-date version of this document, with
  15.   hypertext links to downloadable software and other related materials,
  16.   can be found at the address http://cuiwww.unige.ch/info/pc/remote-
  17.   boot/howto.html.  Linuxdoc-SGML, DVI and PostScript versions are
  18.   available in the same directory.  If you are interested in getting
  19.   info on further developpments, send an E-mail to
  20.   David.Clerc@cui.unige.ch.
  21.   ______________________________________________________________________
  22.  
  23.   Table of Contents
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.   1. Disclaimer and Copyrights
  68.  
  69.   2. What has changed...
  70.  
  71.      2.1 ...since version 2.x ?
  72.      2.2 ...since version 3.0 ?
  73.  
  74.   3. Introduction
  75.  
  76.      3.1 Boot ROM and Hard-disk
  77.      3.2 The Network
  78.      3.3 How it Works
  79.      3.4 Related non-commercial documentations
  80.  
  81.   4. The Configuration How-To
  82.  
  83.      4.1 Server-side configuration
  84.         4.1.1 Setting up DHCP
  85.         4.1.2 Setting up a Proxy DHCP
  86.         4.1.3 Setting up TFTP
  87.      4.2 Client-side configuration
  88.      4.3 Setting Up the Boot Process
  89.         4.3.1 Discovering BpBatch
  90.      4.4 Setting Up Linux
  91.         4.4.1 Configuring the Client
  92.         4.4.2 Testing the Configuration
  93.         4.4.3 Building the Disk Image
  94.         4.4.4 System Maintenance and Upgrades
  95.      4.5 Setting up DOS 6 and Windows 3.1
  96.         4.5.1 Building the Disk Image
  97.         4.5.2 Adapting the configuration for other machines
  98.         4.5.3 System Maintenance and Upgrades
  99.      4.6 Setting up Windows 95
  100.         4.6.1 Setting up a Stand-Alone Client
  101.         4.6.2 Building the Disk Image
  102.         4.6.3 Adapting the configuration for other Machines
  103.         4.6.4 System Maintenance and Upgrades
  104.      4.7 Setting up Windows NT
  105.         4.7.1 Building the Disk Image
  106.         4.7.2 System Maintenance and Upgrades
  107.      4.8 Troubleshooting (FAQ)
  108.  
  109.   5. Remote-Boot Tools Reference Manual
  110.  
  111.      5.1 BpBatch, MrBatch and MrZip
  112.         5.1.1 Command Line Arguments
  113.         5.1.2 Syntax rules
  114.         5.1.3 The Cache Filesystem
  115.         5.1.4 Special variables
  116.         5.1.5 Monitoring commands
  117.         5.1.6 Control commands
  118.         5.1.7 Keyboard-related commands
  119.         5.1.8 Text output commands
  120.         5.1.9 Graphics output commands
  121.         5.1.10 Security-related commands
  122.         5.1.11 Disk-related commands
  123.         5.1.12 Boot commands
  124.         5.1.13 National language support
  125.         5.1.14 Commands specific to MrZip
  126.      5.2 NoBreak.sys
  127.  
  128.   6. Special TFTP Servers
  129.  
  130.      6.1 Incom Enhanced TFTP Server
  131.      6.2 Linux Enhanced TFTP Server
  132.      6.3 The Security Gateway
  133.      6.4 The Broadcast TFTP Server
  134.  
  135.  
  136.   ______________________________________________________________________
  137.  
  138.   1.  Disclaimer and Copyrights
  139.  
  140.   This document and the related software are provided as is to the Linux
  141.   and Internet community, with no form of warranty. Please note that
  142.   some operations related in this document may destroy the content of
  143.   your hard-disk. We assume no liability for any use, correct or not, of
  144.   this document and of the related software.
  145.  
  146.   You are free to do anything you want with the remote-boot tools as
  147.   long as you do not make money by selling them or by distributing them
  148.   with a commercial product. If you want to commercialize a product
  149.   derived from these tools, please contact the authors first to make a
  150.   commercial agreement. These remote-boot tools will remain available
  151.   for free forever, but we may authorize derived commercial tools.
  152.  
  153.   These provisions shall be interpreted under and in accordance with the
  154.   laws of Switzerland, canton of Geneva. All disputes, defenses,
  155.   controversies or claims arrising in conncetion with this document and
  156.   the related software, shall be subject to the exclusive juridiction of
  157.   the courts of the canton of Geneva, Switzerland.
  158.  
  159.   If you like this program, you can send us a Postcard and/or make a
  160.   gift to the International Committee of the Red Cross (ICRC) or to the
  161.   UNICEF.
  162.  
  163.  
  164.   2.  What has changed...
  165.  
  166.  
  167.   2.1.  ...since version 2.x ?
  168.  
  169.   To say it frankly, almost everything. The underlying concepts are the
  170.   same, but the software part has been completly redesigned to overcome
  171.   the limitations of previous versions and to make it easier to use. An
  172.   highlight of the new features :
  173.  
  174.   ╖  All functions (bpmenu, bpclean, bpunzip) are encompassed in a
  175.      single program.
  176.  
  177.   ╖  The program can run not only from the boot rom, but also under DOS,
  178.      Windows 95 and Linux.
  179.  
  180.   ╖  The program can now restore images of FAT16, FAT32 and EXT2FS
  181.      partitions. If someone want to write NTFS support, let me know...
  182.      For now, NT users still have to stick to FAT16.
  183.  
  184.   ╖  The program can not only restore disk images but also add and patch
  185.      individual files in order to customize the client behaviour.
  186.  
  187.   ╖  Disk images are not any more bound to 87 MB. They are now file-
  188.      system independant archives.
  189.  
  190.   ╖  We provide a mean for automatically downloading a disk image to an
  191.      arbitrary big number of clients at the same time (broadcast).
  192.  
  193.   ╖  You can now write your own secure boot script, that will determine
  194.      the behaviour of the machine before the real boot.
  195.  
  196.   ╖  You can now boot any Linux kernel, without applying any patch. Its
  197.      is also possible to provide a command line and a ramdisk image.
  198.  
  199.   ╖  You can authenticate users at boot time using a Unix, NT or Radius
  200.      server and deny them any access to the machine.
  201.  
  202.   ╖  Full national language support is included.
  203.  
  204.   ╖  And many, many other new features...
  205.  
  206.  
  207.      Is there a program for converting old archives to the new format ?
  208.         No, because the internal format is radically different. But you
  209.         can easily do the conversion by yourself:
  210.  
  211.         1. Boot an old image (unzip it to your disk)
  212.  
  213.         2. Remove calls to the old unzipreg utility and replace them by
  214.            the adequate patch commands (it is very easy, see the
  215.            detailed instructions below)
  216.  
  217.         3. Run the new mrzip program to create a new-style disk image
  218.  
  219.   2.2.  ...since version 3.0 ?
  220.  
  221.   Version 3.0 was the beta-release. A dozen of sites around the world
  222.   have tested it during a month and given much of their time to help us
  223.   finding bugs and to suggest enhancements. Thanks to all of them for
  224.   their patience, and in particular to Maciek Uhlig, Dick Velders and
  225.   Jeff Teeters.
  226.  
  227.   A few minor features have been added since 3.01, such as support for
  228.   diskless Linux boot (by disabling the cache).
  229.  
  230.   Version 3.10 introduced compatibility with Intel's Wired for
  231.   Management 1.1a NetPC standard. The tools now work with any PXE-
  232.   compliant boot ROM (as are most on-board boot ROMs) available today.
  233.   Thanks to InCom GmbH for giving us the PXE bootprom that permitted
  234.   this developpment. We also succesfully tested the tools with the PXE
  235.   Boot ROM that I found incidentally in my Dell computer with onboard
  236.   network card (called LanDesk Service Agent).
  237.  
  238.   Version 3.11 to 3.12 added UNIX server-side tools (a PXE Proxy DHCP
  239.   server for Solaris and Linux, and an enhanced TFTP server for Linux),
  240.   as well as detailled informations on server-side setup and the PXE
  241.   booting process.
  242.  
  243.   Version 3.13 added Advanced Power Management support (PowerOff
  244.   command).
  245.  
  246.   Version 3.14 added minor enhancements and some corrections. We fixed a
  247.   problem with the terminal under RedHat 5.1, and another problem in the
  248.   syntax of the "if" command. We added some features suggested by the
  249.   Laboratori de Cαlcul de la Facultat d'Informαtica de Barcelona (LCFIB)
  250.   :
  251.  
  252.   ╖  A new APM variable let you know if your system support the Advanced
  253.      Power Management (i.e it supports the poweroff command).
  254.  
  255.   ╖  A "beep" command.
  256.  
  257.   ╖  A new parameter to DrawWindow, to include a title at the window
  258.      creation. You can now do DrawWindow 200 200 400 200 "Title".
  259.  
  260.   Version 3.15 added full VESA support. BpBatch now support several
  261.   video modes, to accomodate old computers not being able to display
  262.   800x600 graphics. A new parameter has been added to InitGraph to
  263.   specify the video mode, and a list of detected video mode can be
  264.   retrieved from the new VESA-Modes variable.
  265.   Version 3.16 fixes the following bugs:
  266.  
  267.   ╖  "Malloc failed" during the Fullunzip process of a multiple
  268.      fragments image.  Many thanks to Christian Meyer for his
  269.      collaboration.
  270.  
  271.   ╖  A bug which prevented the linux version of MrBatch to properly
  272.      fullunzip images. This bug was located in the low-level functions
  273.      of MrBatch, so it may fix other problems encountered in the linux
  274.      version of MrBatch.  Many thanks to Jeff Teeters for his
  275.      collaboration.
  276.  
  277.   ╖  An error in the codepage translation tables. This bug was found by
  278.      the Laboratori de Cαlcul de la Facultat d'Informαtica de Barcelona
  279.      (LCFIB).  You can find the bug report in the BpBatch forum.
  280.  
  281.   Version 3.17 adds some minor features and fixes bugs:
  282.  
  283.   ╖  Fullunzip was turning Extended Memory off
  284.  
  285.   ╖  Booting on the RedHat boot disk now works
  286.  
  287.   ╖  When extracting images with a large number of directories, the
  288.      resulting FAT file system was corrupted.
  289.  
  290.   ╖  We added retries to text TFTP transfers. BpBatch will now retry
  291.      three times before saying "Could not transfer the file".
  292.  
  293.   ╖  Timestamps are now correctly updated in FAT. (thank to Francis
  294.      Chan)
  295.  
  296.   Version 3.18 fixes a bug with the IncrUnzip function. Thanks to Gary
  297.   Pike for its collaboration.
  298.  
  299.   Version 3.19 fixed a bug in the error handling of the delete command
  300.   on ext2fs, as well as the inappropriate handling of names starting
  301.   with A: under Linux. The following new features were also added:
  302.  
  303.   ╖  A new if valid disk:partition syntax can be used to check if a
  304.      partition has been formatted
  305.  
  306.   ╖  FAT32 disk images are now fully functional (they now boot properly)
  307.  
  308.   ╖  Linux EXT2 partitions bigger than 2 GB are now supported
  309.  
  310.   ╖  Linux Swap partitions bigger than 128 MB are now supported (this
  311.      feature needs a recent kernel, at least 2.1.x)
  312.  
  313.   ╖  FullUnzip is now also possible without a cache partition, by
  314.      setting CacheNever to "ON". This might be usefull for a unique
  315.      installation, but is not recommended in general is it results in a
  316.      high network load.
  317.  
  318.      Thanks to Ruben Schattevoy for its help and contributions to this
  319.      release.
  320.  
  321.  
  322.   3.  Introduction
  323.  
  324.   The configuration described here was developped since Summer 1996 at
  325.   the CUI, University of Geneva. The Computer Science Department uses
  326.   several servers and a number of PCs, which fall into two classes:
  327.  
  328.   ╖  computers devoted to students
  329.  
  330.  
  331.   ╖  computers devoted to research and teaching assistants
  332.  
  333.      We developped the current configuration with the following aims:
  334.  
  335.   ╖  Every computer should be able to run under Linux, DOS, Windows 3.1,
  336.      Windows 95 or Windows NT. One should be able to choose the desired
  337.      operating system for each session.
  338.  
  339.   ╖  All softwares, including operating systems, should be take from the
  340.      server, in order to facilitate the installations and upgrades.
  341.  
  342.   ╖  Clients computers should be able to run without any write-access on
  343.      the server (for security reasons), except for their home directory.
  344.  
  345.   ╖  Client-side configuration should be reduced to its very minimum.
  346.      Clients should automatically get their IP configuration parameters
  347.      from the server, and this information should be located in a single
  348.      file, used for all operating systems.
  349.  
  350.   ╖  Since almost every computer now has a hard-disk, clients should be
  351.      able to take profit of it for reducing network load and as
  352.      temporary storage space for the user.
  353.  
  354.   ╖  Users must have a login to be able to use any of the computers.
  355.  
  356.   ╖  The login should be the same for all operating system and should
  357.      let the user access its unique home directory, common to all
  358.      operating systems.
  359.  
  360.   ╖  Student (and secretary :-) computers should be fully cleaned up at
  361.      each start. That is, the PC should always look like if it were just
  362.      installed.
  363.  
  364.   ╖  Every computer has to be protected from virus attacks.
  365.  
  366.      These constraints lead us to base our configuration on bootprom
  367.      tools. We first developped new tools for the excellent TCP/IP
  368.      Bootprom from InCom GmbH.  Now that a standard for preboot
  369.      execution environments as finally emerged, we ported the tools so
  370.      that it now also works for any PXE-compliant bootprom. PXE boot
  371.      roms, also called LanDesk Service Agent, are now distributed with
  372.      almost all on-board network adapter.  For more info on PXE and
  373.      Intel Wired for Management standard in general, read from
  374.      http://www.intel.com/managedpc.
  375.  
  376.  
  377.   3.1.  Boot ROM and Hard-disk
  378.  
  379.   Bootproms exist for quite a long time, but until recently, they were
  380.   solely used with diskless computers. Since 1996, this How-to has been
  381.   claiming that bootproms are even more interesting for computers which
  382.   have a local harddisk, since they allow to take profit of both sides:
  383.  
  384.   ╖  A boot rom make the configurations more robust, since it ensure
  385.      that the computer will always boot the same way, no matter any
  386.      virus or partition table crash. It can be used, as we did, to
  387.      cleanup the harddisk even before the operating system is loaded.
  388.  
  389.   ╖  A local harddisk make the configuration more efficient, since it
  390.      can reduce the network trafic through caching, and allows for
  391.      efficient swap.
  392.  
  393.      Today, we have the pleasure to see that all computer manufacturers
  394.      have come to the same point and provide boot roms as part of new
  395.      computer standards.
  396.  
  397.   Note that you can still use the tools described below in an old
  398.   fashioned way, that is as a simple kernel/ramdisk loader, even for
  399.   diskless computers. However, we do not encourage this use.
  400.  
  401.  
  402.   3.2.  The Network
  403.  
  404.   The University of Geneva owns a class B domain, subdivided into
  405.   several subnets. The CUI uses four subnets, among them one is
  406.   dedicated to students.
  407.  
  408.   Originally, our PCs were concerned about two network protocols: IPX
  409.   and IP.  On the IPX side, we used a single Novell Netware 3 server for
  410.   sharing software and users files for DOS and Windows. On the IP side,
  411.   we used a SUN server for sharing software and users partitions for
  412.   Linux, with NFS.
  413.  
  414.   In our latest configuration, we do not any more use IPX. There is a
  415.   single Unix server (which could be Linux as well as a SUN), sharing
  416.   software and user files using NFS for Linux clients and using SMB
  417.   (NetBIOS) over TCP/IP for Dos and Windows clients. In this way, we
  418.   have a single home directory used by all operating systems.
  419.  
  420.  
  421.   3.3.  How it Works
  422.  
  423.  
  424.   1. When a client PC is turned on, it first performs the traditional
  425.      system checks before the TCP/IP Bootprom or PXE Boot ROM takes the
  426.      control.
  427.  
  428.   2. The bootprom issues a BOOTP/DHCP request in order to get its IP
  429.      configuration parameters.
  430.  
  431.   3. If the server knows the PC issuing the request, it will send back a
  432.      BOOTP/DHCP reply with informations such as the client's IP address,
  433.      the default gateway, and which bootdisk image to use.
  434.  
  435.   4. In case of a PXE boot ROM, there might be some more exchanges
  436.      between the client and the server to determine installation
  437.      parameters.
  438.  
  439.   5. The bootprom then downloads the boot image from the server using
  440.      the TFTP protocol. The boot image happens to be a small program
  441.      called bpbatch, our boot-time batch file interpreter.
  442.  
  443.   6. The batch interpreter is started. At this time, it is almost alone
  444.      in the computer memory. There is no operating system loaded, except
  445.      the preboot execution environment (offered by the Boot ROM).
  446.  
  447.   7. The batch interpreter look in the BOOTP/DHCP reply for command-line
  448.      options, and in particular for the name of the batch to execute.
  449.  
  450.   8. According to the instructions in the batch file, it will for
  451.      instance:
  452.  
  453.      a. Load a national keyboard mapping
  454.  
  455.      b. Authenticate the user according to a remote server (Unix, Radius
  456.         or Windows NT)
  457.  
  458.      c. Let the user choose between the available operating systems
  459.  
  460.      d. According to the operating system choosen, repartition the hard-
  461.         disk and quick-format some partitions
  462.  
  463.      e. Check if an up-to-date compressed image of the selected OS is
  464.         present at the end of the disk. If not, it download it using
  465.         TFTP
  466.  
  467.      f. Uncompress the selected OS to the main partition
  468.  
  469.      g. If the selected OS is Linux, load a kernel and start it
  470.  
  471.      h. If the selected OS is DOS or Windows, simply let the computer
  472.         boot on its fresh new hard-disk
  473.  
  474.      For DOS and Windows 3.1, we use the freely available Microsoft Lan¡
  475.      Manager for DOS (search the network for the mirror nearest to you;
  476.      the distribution consists of three files named disk1 to disk4) as
  477.      SMB client. Microsoft LanManager supports dynamic configuration
  478.      using DHCP. After logging in, the user is faced to DOS, and can
  479.      start Windows 3.1 by typing the traditional win command. Note that
  480.      at this point, DOS and Windows 3.1 appear to be installed locally.
  481.  
  482.      For Windows 95 and Windows NT, we also use Microsoft SMB client
  483.      (called Client for the Microsoft Network), that supports dynamic
  484.      configuration using DHCP. We reduce network load using Shared LAN
  485.      Cache, a nice and powerful network-to-disk cache program.
  486.  
  487.      Students computers can be turned off the hard way at any time with¡
  488.      out risks, since the hard disk is reinitialized at each start.
  489.  
  490.   For "safe" computers (ie. for assistants computers), once the computer
  491.   has been booted once using the above described system, the boot script
  492.   simply redirect the boot to the local hard-disk, without cleaning it
  493.   again. This allow users to leave data on their local hard disk. But
  494.   whenever the configuration gets corrupted, the user can simply choose
  495.   from the boot menu in order to have a fresh installation.
  496.  
  497.  
  498.   3.4.  Related non-commercial documentations
  499.  
  500.   This configuration has been successfully reproduced at several places
  501.   around the world. A few people have written some hints and tricks that
  502.   complement this How-To. If you did so and that your page is not
  503.   already referenced in this documentation, please send an e-mail to
  504.   Marc.VuilleumierStuckelberg@cui.unige.ch.  And if you experience
  505.   problems while reproducing this configuration, have a look at these
  506.   pages !
  507.  
  508.   ╖  http://www.br.fgov.be/RESEARCH/INFORMATICS/info/bootp.html, by
  509.      Alain Empain of the Belgium National Botanic Garden.  Many useful
  510.      sample scripts, and a nice PERL program to automatically generate
  511.      graphic menus and corresponding HTML documentation from a higher
  512.      level description.
  513.  
  514.   ╖  http://www.katedral.se/system/elevsyst, by Johan Carlstedt of The
  515.      Cathedral School of Uppsala, Sweden.  At this day, the
  516.      configuration described at this place is still based on the
  517.      previous version of the remote-boot tools. However, almost
  518.      everything remains applicable, given a few changes.
  519.  
  520.   ╖  http://vitoria.upf.tche.br/~fred/, in portuguese, by Frederico
  521.      Goldschmidt of the Passo Fundo University, Brasil.
  522.  
  523.   ╖  http://www.etse.urv.es/~larinyo, in spanish, by  Lluis Arino, of
  524.      the Escola Tecnica Superio d'Enginyeria, Spain.
  525.  
  526.   You can also send me your BpBatch script if you want me to include it
  527.   in the sample scripts collection.
  528.  
  529.   4.  The Configuration How-To
  530.  
  531.   First, arrange to have the following two machines within arm's reach:
  532.  
  533.   ╖  the server, usually a Unix or Windows NT machine
  534.  
  535.   ╖  the client, a PC with a bootprom enabled, and nothing valuable on
  536.      the hard disk.
  537.  
  538.      If you want to test the configuration but you do not yet have a
  539.      bootprom, you can download the TCP/IP BootProm demo diskette from
  540.      InCom GmbH at http://www.incom.de.  This diskette will make your
  541.      computer behave like if it had a TCP/IP Bootprom plugged in.
  542.  
  543.   If you already have a Boot ROM, you need to enable it. If you are
  544.   using Incom TCP/IP Bootprom, you can do that using a special program
  545.   from your network card manufacturer. If you have a PXE Bootprom, you
  546.   can do it simply from BIOS setup, by changing the default boot device.
  547.  
  548.   For student computers, we configured the boot on network first, and
  549.   disabled hard-disk and floppy-disk boot. For assistant computers, we
  550.   also configured network-boot first, but we allow hard-disk and floppy-
  551.   disk boot.
  552.  
  553.  
  554.   4.1.  Server-side configuration
  555.  
  556.   On the server, you will need the following services:
  557.  
  558.   1. A BOOTP/DHCP server
  559.  
  560.   2. May be a Proxy DHCP server
  561.  
  562.   3. A TFTP server
  563.  
  564.      Note for PXE Boot ROM users: We found after severals hours of
  565.      tedious search that PXE Boot ROMs with version before 0.99 do not
  566.      follow the IP protocol and discard all packets that have the Don't
  567.      Fragment (DF) flag set.  That means, you will have to disable Path
  568.      MTU Discovery on the server, or the Boot ROM will not see any of
  569.      its packets. On Solaris, use ndd /dev/ip ip_path_mtu_discovery to
  570.      see if you have it enabled and ndd -set /dev/ip
  571.      ip_path_mtu_discovery 0 to disable it.  However, this fix only
  572.      works for non-broadcast packets (ask SUN why...).  That means, it
  573.      will work for TFTP but not for DHCP :-(. Intel has recently fixed
  574.      this bug, and if you bought your computer after June 1998, you
  575.      surely have a corrected PXE implementation.
  576.  
  577.  
  578.   4.1.1.  Setting up DHCP
  579.  
  580.   The role of the DHCP server is to give to the client an IP address and
  581.   to make it load the file named bpbatch.P from the TFTP server.  DHCP
  582.   is a superprotocol over BOOTP. If you are using InCom TCP/IP Bootprom,
  583.   you may live without DHCP (using an old BOOTP server).
  584.  
  585.   On Windows NT, you will probably use the native DHCP server.  If you
  586.   are using InCom TCP/IP Bootprom, you will have to use a special trick
  587.   to specify the boot file name (get more info from InCom WWW site). If
  588.   you are using a PXE Bootrom, you will need a Proxy DHCP server, but no
  589.   other trick is needed as the boot file name will be provided by the
  590.   Proxy DHCP server.
  591.  
  592.   On Linux, the best choice is the standard DHCP server from the
  593.   Internet Software Consortium. If you are using a PXE Bootrom, in
  594.   addition to the usual options, you will need to add the following
  595.   ones:
  596.  
  597.   ╖  option dhcp-class-identifier "PXEClient"
  598.  
  599.   ╖  option vendor-encapsulated-options ff;
  600.  
  601.   On Solaris, you can either use the Internet Software Consortium DHCP
  602.   server (available on the Web), or use Solaris DHCP server (available
  603.   since Solaris 2.5). However, as Solaris DHCP server does not seems to
  604.   be able to insert a client class identifier in its DHCP offer, you
  605.   must install a Proxy DHCP server. Morever, this Proxy DHCP server must
  606.   reside on another computer since Solaris DHCP server locks the DHCP
  607.   port.
  608.  
  609.   We suggest giving infinite lease time for remote-boot clients.  Don't
  610.   forget that BOOTP/DHCP requests are bounded by subnets. If the client
  611.   and the server do not reside on the same subnet, you should install a
  612.   BOOTP/DHCP Relay agent on any computer between the two.  For now, just
  613.   assume that both machines are on the same subnet.
  614.  
  615.  
  616.   4.1.2.  Setting up a Proxy DHCP
  617.  
  618.   The role of the Proxy DHCP server is to overcome limitions of some
  619.   DHCP servers and to provide PXE specific extensions. A proxy DHCP
  620.   server only makes sense for a PXE Boot rom.
  621.  
  622.   As BpBatch itself is quite powerfull, you wont need to use any PXE
  623.   specific DHCP extension (menus, etc.).  However, if your DHCP server
  624.   is not able to show minimal PXE compliance, you will need a Proxy DHCP
  625.   server or your PXE Boot ROM will not accept to go further.
  626.  
  627.   On Windows NT, you can try to use Intel WfM PDK (available from their
  628.   web site), but it is not very easy to use. We rather suggest having a
  629.   Linux machine on the subnet and using our small Proxy DHCP.  The major
  630.   advantage of our Proxy DHCP Server for BpBatch is that our server will
  631.   let you specify an option 155 vendor tag that will be interpreted by
  632.   BpBatch as a command line.
  633.  
  634.   On Linux and Solaris, you can run our Proxy DHCP program, that simply
  635.   takes as argument the TFTP server IP address, boot file name and
  636.   optional arguments, and does everything for you.  If the DHCP port on
  637.   the server is already requested by another daemon, the proxy DHCP
  638.   server will run on port 4011. In this case, it is necessary that the
  639.   other daemon on DHCP port answer a DHCP offer with client class
  640.   PXEClient so that the PXE client knows that it must try on port 4011.
  641.  
  642.   If you want to understand better PXE extensions to DHCP, there is an
  643.   extensive description available on Intel WWW site. However, be warned
  644.   that the documents are quite confusing, as the protocol has been
  645.   extended to a number of optional stages, in order to allow for a
  646.   maximal flexibility. The key to understand it is that all what a PXE
  647.   client needs is a complete enhanced DHCP answer. If it receives only a
  648.   standard DHCP offer, it will look further until it gets
  649.  
  650.   1. a client class (T60) set to PXEClient
  651.  
  652.   2. vendor encapsulated options (T43) (possibly empty, ie. hex ff)
  653.  
  654.   3. a non-empty boot filename
  655.  
  656.      The PXE specific negociation ends as soon as all these infos are
  657.      received, but can lead to a very complex process (install server
  658.      discovery, etc.)  if some are missing.
  659.  
  660.  
  661.   4.1.3.  Setting up TFTP
  662.  
  663.   The TFTP server is a very simple file server. In its basic version,
  664.   TFTP use 512 bytes data blocks, which are quite inefficients.  InCom
  665.   TCP/IP Bootprom and PXE Boot ROMs allow to use larger blocks (1408
  666.   bytes), which speeds up transfers a lot. However, this can only work
  667.   with an enhanced TFTP server.
  668.  
  669.   On Windows NT, we suggest using InCom enhanced TFTP server, available
  670.   on their web site.
  671.  
  672.   On Linux, you can use our enhanced TFTP server, available at
  673.   http://cuiwww.unige.ch/info/pc/remote-boot/soft/etftpd.tar.gz.
  674.  
  675.   On Solaris, you should use InCom enhanced TFTP serer, available on the
  676.   utility disk provided with the TCP/IP Bootprom.
  677.  
  678.   If you prefer using a standard TFTP daemon, remove the P in all boot
  679.   image name extensions, in order to tell the Bootprom to use only the
  680.   standard TFTP port (This trick was introduced by InCom GmbH for the
  681.   TCP/IP Bootprom. We still use it as an easy way to select the default
  682.   TFTP port with PXE bootproms).
  683.  
  684.  
  685.   4.2.  Client-side configuration
  686.  
  687.   First, we will do set up the part common to all operating systems, ie.
  688.   the batch-file interpreter.  Then, for each operating system, we will
  689.   go through the following steps:
  690.  
  691.   1. Setup a stand-alone client
  692.  
  693.   2. Save its configuration on the server
  694.  
  695.   3. Test it as a remote-boot client
  696.  
  697.   4. Adapt it so that it works for any similar client machine
  698.  
  699.      Once this is done, you will be able to setup any supplemental
  700.      client just by plugging a Boot ROM in it (or buying a Wired for
  701.      Management ready computer...) and adding one line in the DHCP
  702.      configuration file.
  703.  
  704.   Our examples assume that you have a hard disk of 1.4 Gb or more.  If
  705.   you have less, reduce the sizes of the partitions, but remember the
  706.   you need to leave a few hundreds megabytes unallocated (that is, the
  707.   last partition must not take up to the last cylinder) to leave free
  708.   room for the special cache partition. Moreover, as the cache always
  709.   starts at the cylinder following the last allocated cylinder, if you
  710.   do not use the same total size for all your tests, you will have to
  711.   download several times the same files (the cache will be automatically
  712.   cleared).
  713.  
  714.   Never despair. If you can't get it to work, first look in the
  715.   Troubleshooting section if your problem is not already solved (get the
  716.   latest version from the Web).  Then, take a look in the BpBatch forum.
  717.   Perhaps someone else had the same troubles as you have, and the answer
  718.   can be found in the forum.  Forum's URL :
  719.   http://cuiwww.unige.ch/info/pc/remote-boot/forum/.  If it still does
  720.   not work, think about monitoring network traffic for network related
  721.   problems (use tcpdump on Linux or snoop on Solaris). If you really
  722.   cannot get it to work, you can send an E-mail to
  723.   David.Clerc@cui.unige.ch or Marc.VuilleumierStuckelberg@cui.unige.ch.
  724.   If your problem is strictly related with the remote-boot configuration
  725.   and if we are not overflowed, we will try to solve your problem.
  726.  
  727.   4.3.  Setting Up the Boot Process
  728.  
  729.   Get the BpBatch software, either as .zip or as .tar.gz.  The
  730.   executables are available at
  731.  
  732.   ╖  http://cuiwww.unige.ch/info/pc/remote-boot/soft/bpb-exe.zip
  733.  
  734.   ╖  http://cuiwww.unige.ch/info/pc/remote-boot/soft/bpb-exe.tar.gz
  735.  
  736.      The source code (Assembler and C) is also available on request.
  737.  
  738.   In the server /tftpboot directory, put the following three special
  739.   boot images, which together make our pre-boot batch file interpreter:
  740.  
  741.   ╖  bpbatch.P, the dynamic loader (respect the uppercase !)
  742.  
  743.   ╖  bpbatch.ovl, the relocated interpreter
  744.  
  745.   ╖  bpbatch.hlp, the on-line help file
  746.  
  747.      Then add an entry in the DHCP configuration file for your client,
  748.      with the boot file set to "bpbatch.P". Define a vendor option tag
  749.      155 (decimal) with the value "-i" (on the standard DHCP server,
  750.      this is done by the following command: option option-155 "-i";). It
  751.      is interpreted by bpbatch as the command line, and -i stands for
  752.      "interactive".
  753.  
  754.   Boot the client computer. You might shortly see
  755.  
  756.   ╖  The Boot ROM copyright
  757.  
  758.   ╖  The string DHCP while the client waits for a DHCP reply
  759.  
  760.   ╖  The string TFTP while the client waits for the first TFTP packet
  761.  
  762.   ╖  The string Loading BpBatch while the loader download the
  763.      interpreter
  764.  
  765.   ╖  And finaly our banner, followed by a nice greather-than prompt
  766.  
  767.      Congratulations ! You have started the batch interpreter...  If you
  768.      are curious about what you can do with it, continue reading the
  769.      next section. If you are on a hurry, skip it and go directly
  770.      install the operating system of your choice. If you have any doubt
  771.      about a command within the interpreter, type help.
  772.  
  773.   Note that you can run the same interpreter within DOS and Linux by
  774.   running the MrBatch program. There are a only very few differences
  775.   (the Linux version do not have graphics support and the DOS version
  776.   can only send BOOTP and TFTP requests if the BootProm is not hidden by
  777.   the operating system).
  778.  
  779.   It may be a good idea to read now the section about the Syntax Rules
  780.   of BpBatch, and in particular the paragraphs on File References and on
  781.   The Cache Filesystem.  This will help you understand the examples.
  782.  
  783.   Once all operating systems will be set up, you will have to make a
  784.   menu to let the user choose the one he wants. You should be able to
  785.   discover by yourself how to make such a menu. All necessary commands
  786.   are documented at the end of this document.
  787.  
  788.  
  789.   4.3.1.  Discovering BpBatch
  790.  
  791.   Try to type LogVars. You should get about thirty variables listed.
  792.   Roughly, the first are BpBatch settings, then come all parameters
  793.   extracted from the BOOTP/DHCP reply, and the last variable is a list
  794.   of disks sizes, in Megabytes.
  795.  
  796.   Type GetPartitions part, then LogVars again. There should be one more
  797.   variable containing the list of defined partitions on your first hard-
  798.   drive. Assuming that the first partition is either BIGDOS, FAT32 or
  799.   LINUX-EXT2, try LogDir "{:1}" to get the content of the root
  800.   directory, then LogDir "{:1}/usr" if there is an usr directory. You
  801.   can even try LogTree "{:1}/etc" to get a directory tree.
  802.  
  803.   Put a GIF file (format GIF-87a, interlaced or not, but NOT GIF-89a) on
  804.   your TFTP server. We will suppose that the file is named image.gif.
  805.   You can copy it wherever you want with the following command: Copy
  806.   "image.gif" "{:1}/temp/image.gif". Or you can use it directly from the
  807.   server. Now type Logvars "V*" and look at the value of the VESA
  808.   variable. If it is On, which is most probable, that means you have a
  809.   VESA-compliant video adapter. You can list the available video modes
  810.   using Echo "$VESA-Modes". To display your image try the following
  811.   command: DrawGif "image.gif".  The image should be on the upper left
  812.   corner of the screen. You can draw it on another place by specifying X
  813.   and Y coordinates after the image name. You can also draw text with
  814.   DrawText 200 200 "Hello world" yellow. Or draw an empty window with
  815.   DrawWindow 200 200 300 150. To insert a title when you create a new
  816.   window, try DrawWindow 200 200 300 150 "My Window".  When you are
  817.   tired of graphic mode, simply type CloseGraph.
  818.  
  819.   Note on graphics : by default, all graphical routines work in the
  820.   800x600 VESA mode (with 256 colors), which is the first field of the
  821.   VESA-Modes variable. If you want to use a different video mode, change
  822.   the variable in order to have the requested video mode as the first
  823.   field of the list.
  824.  
  825.   Now take a text editor, and create a file named test.bpb in the
  826.   tftpboot directory with the following content:
  827.  
  828.  
  829.        ______________________________________________________________________
  830.        :again
  831.        DrawWindow 150 200 400 160 "Identity check"
  832.        TextAttr Black LightGray
  833.        At 15,20 Print "Username : "
  834.        Input username 8
  835.        At 17,20 Print "Password : "
  836.        Getpasswd userpass 8
  837.        if "$username" != "smith" goto again
  838.        if not "$userpass" match-passwd "BpR8oiIlRR9bo" goto again
  839.        #
  840.        clear
  841.        DrawWindow 200 200 150 100 green blue "Congratulations"
  842.        DrawText 220 250 "You got it !" yellow
  843.        WaitForKey 3
  844.        CloseGraph
  845.        interact
  846.        ______________________________________________________________________
  847.  
  848.  
  849.  
  850.  
  851.   In your BOOTP/DHCP configuration, change the option-155 from "-i" to
  852.   "test", and reboot the client computer. The small script should run
  853.   automatically, and ask you for a username and password.  If you do not
  854.   type smith and justdoit, you wont be able to boot the computer. Later
  855.   you will learn how to use a Unix, NT or Radius server to check valid
  856.   user names.
  857.  
  858.  
  859.   4.4.  Setting Up Linux
  860.  
  861.   In order to set up Linux, you will need to boot the floppy disk
  862.   provided with the RedHat Linux distribution. BpBatch includes a
  863.   command that can redirect the boot to the floppy: FloppyBoot.
  864.  
  865.   Set up RedHat Linux on your client, with network support, and any
  866.   packages you may want. You may want to recompile the kernel to better
  867.   fit your hardware, but it is not necessary.
  868.  
  869.  
  870.   4.4.1.  Configuring the Client
  871.  
  872.   It is probably a good idea to include BOOTP support to the kernel, so
  873.   that you do not have to customize the client IP address manually.
  874.  
  875.   In order to reduce network load, you might also want to setup the
  876.   filecache for caching on the hard disk files that are loaded by NFS.
  877.   Roughly, the principle of the filecache is that whenever a symbolic
  878.   link from the cache subdirectory is followed, it is replaced by its
  879.   target. If the target is itself a subdirectory, each entry of the
  880.   subdirectory becomes a symbolic link to the original entry of the
  881.   foreign filesystem.  The filecache has been written by Unifix GmbH,
  882.   and is part of Unifix Linux 2.0. It is freely distributable, and you
  883.   can get the necessary files from
  884.   http://cuiwww.unige.ch/info/pc/remote-boot/soft/filecache.tar.gz.  In
  885.   order to use the filecache, you have to
  886.  
  887.   ╖  apply a patch to the kernel (file patch-filecache), enable
  888.      filecache support through make config or whatever you prefer, and
  889.      recompile the kernel
  890.  
  891.   ╖  copy the filecache binary file to /sbin
  892.  
  893.   ╖  create a mount point called /mnt/nfs (using mkdir)
  894.  
  895.   ╖  copy filecache.conf to /etc. This file contains the following
  896.      lines:
  897.  
  898.      Max 100 MB 50 % #
  899.      Cache /mnt/nfs/usr /usr
  900.      Cache /mnt/nfs/opt /opt
  901.  
  902.  
  903.  
  904.   ╖  copy the content of /usr and /opt to the server, export them read-
  905.      only with anon=0 (for allowing root access) and mount them under
  906.      /mnt/nfs (add a line for that in /etc/fstab)
  907.  
  908.   ╖  rename /usr as /usr.orig
  909.  
  910.   ╖  link /usr to /mnt/nfs/usr
  911.  
  912.   ╖  rename /opt as /opt.orig
  913.  
  914.   ╖  link /opt to /mnt/nfs/opt
  915.  
  916.   ╖  ensure that /usr and /opt are not empty and contains the correct
  917.      directories
  918.  
  919.   ╖  recursively remove /usr.orig and /opt.orig
  920.  
  921.   ╖  copy filecache.init to /etc/rc.d/init.d
  922.  
  923.   ╖  And finally link /etc/rc.d/rc3.d/S35filecache to
  924.      /etc/rc.d/init.d/filecache.init
  925.      If you successfully followed each of these steps, you should have
  926.      the filecache working next time you boot, as long as you do not
  927.      forget to use your patched kernel.
  928.  
  929.  
  930.   4.4.2.  Testing the Configuration
  931.  
  932.   Copy your compressed kernel image (zImage, bzImage, vmlinuz or
  933.   whatever you call it) to the server /tftpboot directory as linux.krn.
  934.   If you had to unplug the bootprom from the PC, you can now plug it
  935.   again. When BpBatch starts, type LinuxBoot "linux.krn" "root=/dev/hda1
  936.   BOOT_IMAGE=linux" (assuming that the root ext2 filesystem is on the
  937.   first partition). Alternatively, if you did setup your configuration
  938.   on a computer without bootprom, just boot let it boot using the loader
  939.   you installed (lilo, ...). But in the later case, if you want the
  940.   filecache to work, you should have explicitely installed your kernel
  941.   with filecache support at the right place.
  942.  
  943.   Wait until the system comes up.  If you installed the filecache, you
  944.   can check that /usr has exploded into a directory with some symlinks
  945.   and some already-exploded directories. Now start the programs that the
  946.   end-users will use most of the time, in order to load them once for
  947.   all to the hard disk.
  948.  
  949.   You can still make adjustements to your configuration, like on any
  950.   stand-alone linux station.
  951.  
  952.  
  953.   4.4.3.  Building the Disk Image
  954.  
  955.   When you are happy with your configuration, login as root, go to the
  956.   /tmp directory and run our mrzip program.  MrZip is a command
  957.   interpreter like BpBatch, but it can understand more commands than
  958.   BpBatch does. In particular, it can understand the following commands:
  959.  
  960.  
  961.        ______________________________________________________________________
  962.        showlog
  963.        filter -"tmp/*"
  964.        filter -"var/log/*"
  965.        fullzip "/" "/tmp/linux.imz"
  966.        ______________________________________________________________________
  967.  
  968.  
  969.  
  970.  
  971.   This will create a disk image in /tmp/linux.imz. Move it to the server
  972.   /tftpboot directory. Then copy the following batch file to /tftp¡
  973.   boot/linux.bpb:
  974.  
  975.  
  976.        ______________________________________________________________________
  977.        hidelog
  978.        setpartitions "linux-ext2:992 linux-swap:32"
  979.        fullunzip "linux.imz" 1
  980.        clean 2
  981.        linuxboot "linux.krn" "root=/dev/hda1 BOOT_IMAGE=linux"
  982.        ______________________________________________________________________
  983.  
  984.  
  985.  
  986.  
  987.   The BOOT_IMAGE argument is to stay compatible with lilo for RedHat 5.1
  988.   and later rc.sysinit.
  989.  
  990.  
  991.   Your remote-boot linux configuration is ready ! You can now either set
  992.   the BOOTP-option-155 to "linux", or type include "linux.bpb" from
  993.   within BpBatch to test it.
  994.  
  995.  
  996.   4.4.4.  System Maintenance and Upgrades
  997.  
  998.   If you want later to upgrade software, install bug fixes and security
  999.   fixes, proceed as follow:
  1000.  
  1001.   ╖  Remote-boot a client computer to get a fresh linux install
  1002.  
  1003.   ╖  Make your changes
  1004.  
  1005.   ╖  Redo the disk image
  1006.  
  1007.   ╖  Copy the new image in place of the old one on the server
  1008.  
  1009.      That means, you can upgrade software on your server-based
  1010.      configuration as if it were a purely local install.
  1011.  
  1012.  
  1013.   4.5.  Setting up DOS 6 and Windows 3.1
  1014.  
  1015.   On the client computer, boot on your favorite dos floppy disk (either
  1016.   remove the bootprom or type FloppyBoot within BpBatch).  Format the
  1017.   dos partition of your hard-drive with the /S option, in order to put
  1018.   the operating system on it.  The size of the partition is not
  1019.   important, as disk archives created with MrZip Create a DOS
  1020.   subdirectory, copy DOS in it. Install your favorite network client
  1021.   (for instance Microsoft LanManager), Windows 3.1, and so on. If you
  1022.   use Microsoft LanManager, do not use DHCP for the IP configuration as
  1023.   it is a very poor implementation that will almost surely fail with
  1024.   reasonable network load. To do that, add the following lines in your
  1025.   protocol.ref file, in the section that loads tcptsr (of course,
  1026.   replaces the xxx by your true IP parameters):
  1027.  
  1028.           IPADDRESS0 = xxx xxx xxx xxx
  1029.           SUBNETMASK0 = 255 255 xxx xxx
  1030.           DEFAULTGATEWAY0 = xxx xxx xxx xxx
  1031.           DISABLEDHCP = 1
  1032.  
  1033.  
  1034.  
  1035.   Do not be afraid to use EMM386 to optimize the memory usage, and even
  1036.   to include the area where you put your network adapter ROM, since it
  1037.   is not used anymore at this time. But carefully exclude the network
  1038.   adapter RAM, or you will not be able to connect to your server. Use
  1039.   the NOEMS parameter.
  1040.  
  1041.   If you want to ensure that the client machine cannot be used without a
  1042.   valid login name, download our nobreak pseudo-device driver (available
  1043.   at http://cuiwww.unige.ch/info/pc/remote-boot/soft/nobreak.zip) and
  1044.   run it at the beginning of your config.sys. Then add something like
  1045.   this to your autoexec.bat:
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.   ______________________________________________________________________
  1058.   rem -- we use the dummy file c:\logged as a flag
  1059.   del c:\logged >nul
  1060.   :loginneeded
  1061.   cls
  1062.   echo Please type in your login name and password
  1063.   echo.
  1064.   net logon *
  1065.   rem -- the login script should have created c:\logged
  1066.   if not exist c:\logged goto loginneeded
  1067.   del c:\logged
  1068.   rem -- now enable break again
  1069.   echo Yes >NOBRK
  1070.   ______________________________________________________________________
  1071.  
  1072.  
  1073.  
  1074.  
  1075.   Ensure that your client boot well by rebooting the client and
  1076.   evaluating the following commands within BpBatch interactive mode:
  1077.  
  1078.           HideBootprom
  1079.           HdBoot
  1080.  
  1081.  
  1082.  
  1083.  
  1084.   4.5.1.  Building the Disk Image
  1085.  
  1086.   On the server, make a share called admin for instance, on which you
  1087.   will put some stuff for the system administrator.  If the server is a
  1088.   Unix machine, it is a good opportunity to put in admin a softlink to
  1089.   the /tftpboot subdirectory, so that you can put images in it directly
  1090.   from the client.  Within admin, create a /utils subdirectory and put
  1091.   the following files in it:
  1092.  
  1093.   ╖  mrbatch.exe, the DOS version of BpBatch
  1094.  
  1095.   ╖  mrzip.exe, the DOS version of the program for building disk images
  1096.  
  1097.   ╖  bpbatch.hlp, the on-line help file
  1098.  
  1099.      You might also like to put in the same directory a simple MrZip
  1100.      script named zipdos.mrz file that contains the commands needed for
  1101.      building a DOS image, like this one:
  1102.  
  1103.  
  1104.        ______________________________________________________________________
  1105.        showlog
  1106.        filter -"lanman.dos/lmuser.ini"
  1107.        filter -"temp/*"
  1108.        filter -"*.swp"
  1109.        fullzip "c:/" "L:/tftpboot/dos.imz"
  1110.        ______________________________________________________________________
  1111.  
  1112.  
  1113.  
  1114.  
  1115.   Now go back to your client, mount the admin volume on drive L:, go to
  1116.   your utils directory and type the following command:
  1117.  
  1118.           mrzip -b zipdos
  1119.  
  1120.  
  1121.  
  1122.  
  1123.   One minute later, you will have a new file in the server /tftpboot
  1124.   subdirectory called dos.imz, which is a compressed image of your hard
  1125.   disk. Copy the following batch file to /tftpboot/dos.bpb:
  1126.  
  1127.  
  1128.        ______________________________________________________________________
  1129.        hidelog
  1130.        setpartitions "bigdos:1024"
  1131.        setbootpart 1
  1132.        fullunzip "dos.imz" 1
  1133.        hidebootprom
  1134.        hdboot :1
  1135.        ______________________________________________________________________
  1136.  
  1137.  
  1138.  
  1139.  
  1140.   Your remote-boot DOS configuration is ready ! You can now either set
  1141.   the BOOTP-option-155 to "dos", or type include "dos.bpb" from within
  1142.   BpBatch to test it.
  1143.  
  1144.  
  1145.   4.5.2.  Adapting the configuration for other machines
  1146.  
  1147.   If you want to customize some settings according to the machine,
  1148.   typically the IP settings since Micro$oft DHCP is buggy, you can setup
  1149.   BpBatch to change some files before booting.  Firsti go to the
  1150.   lanman.dos directory and do
  1151.  
  1152.           copy *.ini *.ref
  1153.  
  1154.  
  1155.   Then edit the .ref files and replace all fixed parameters with BOOTP
  1156.   variable names as in the following examples:
  1157.  
  1158.           computername = ${BOOTP-Host-Name}
  1159.           ipaddress0 = ${MS-IPAddress}
  1160.           subnetmask0 = ${MS-IPSubnet}
  1161.           defaultgateway = ${MS-IPRouter}
  1162.  
  1163.  
  1164.   Then rebuild the disk image as previously.  Note that for IP parame¡
  1165.   ters, we do not use the BOOTP variables directly because LanManager
  1166.   needs then as space-separated numbers instead of dot-separated num¡
  1167.   bers. Change dos.bpb to the following:
  1168.  
  1169.  
  1170.        ______________________________________________________________________
  1171.        hidelog
  1172.        setpartitions "bigdos:1024"
  1173.        setbootpart 1
  1174.        fullunzip "dos.imz" 1
  1175.        set MS-IPAddress="$BOOTP-Your-IP"/.= /
  1176.        set MS-IPSubnet="$BOOTP-Subnet-Mask"/.= /
  1177.        set MS-IPRouter="$BOOTP-Routers"/.= /
  1178.        patch "{:1}lanman.dos/protocol.ref" "{:1}lanman.dos/protocol.ini"
  1179.        patch "{:1}lanman.dos/tcpputils.ref" "{:1}lanman.dos/tcputils.ini"
  1180.        patch "{:1}lanman.dos/lanman.ref" "{:1}lanman.dos/lanman.ini"
  1181.        hidebootprom
  1182.        hdboot :1
  1183.        ______________________________________________________________________
  1184.  
  1185.  
  1186.  
  1187.  
  1188.   If you prefer, you can also put the .ref files in the server /tftpboot
  1189.   directory instead of in the disk image.
  1190.  
  1191.   We like to be able to easily change the computers configuration
  1192.   without rebuilding the image. To do that, copy your autoexec.bat and
  1193.   config.sys as autoexec.ref and config.ref to the server /tftpboot and
  1194.   add the following two lines to the batch file above:
  1195.  
  1196.           patch "autoexec.ref" "{:1}autoexec.bat"
  1197.           patch "config.ref" "{:1}config.sys"
  1198.  
  1199.  
  1200.   You can then freely change the files and even customize them with
  1201.   machine-dependant values obtained from BOOTP.
  1202.  
  1203.   After making any change to the client machine configuration, do not
  1204.   forget to rebuild the disk image using mrzip if you want to preserve
  1205.   your changes.
  1206.  
  1207.  
  1208.   4.5.3.  System Maintenance and Upgrades
  1209.  
  1210.   If you want later to add new software or change anything else, proceed
  1211.   as follow:
  1212.  
  1213.   ╖  Remote-boot a client computer to get a fresh install
  1214.  
  1215.   ╖  Make your changes
  1216.  
  1217.   ╖  Redo the disk image
  1218.  
  1219.   ╖  Copy the new image in place of the old one on the server
  1220.  
  1221.      That means, you can upgrade software on your server-based
  1222.      configuration as if it were a purely local install.
  1223.  
  1224.  
  1225.   4.6.  Setting up Windows 95
  1226.  
  1227.   In previous versions of this document, we used the Microsoft server-
  1228.   based installation of Windows 95, but it was really too much pain and
  1229.   not much worth:
  1230.  
  1231.   ╖  It is very, very bogus
  1232.  
  1233.   ╖  Many software package do not support it and their install will
  1234.      fail.  Among them, Microsoft Internet Explorer, OnNet 32, Novell's
  1235.      Protected-mode client (which is MUCH more secure than Microsoft
  1236.      Client for Netware).
  1237.  
  1238.   ╖  It cannot be used with the Microsoft Network client over TCP/IP,
  1239.      since Microsoft provides no real-mode driver for TCP/IP compatibe
  1240.      with Windows 95. That means, it cannot be used with Samba
  1241.  
  1242.   ╖  It makes software upgrades almost impossible since every client
  1243.      turned on will lock many DLLs on the server, and thus produce
  1244.      sharing violations if you try to upgrade them.
  1245.  
  1246.      Consequently, we throwed away of this document all the informations
  1247.      and bug-workaround collected during months (you can still find them
  1248.      as a HTML document at http://cuiwww.unige.ch/info/pc/remote-
  1249.      boot/win95old/win95old.html) and turned to our new disk-based
  1250.      remote-boot concept.  Basically, the configuration for Windows 95
  1251.      is now almost as easy the configuration for DOS.
  1252.  
  1253.  
  1254.  
  1255.   4.6.1.  Setting up a Stand-Alone Client
  1256.  
  1257.   Setup a regular Windows 95 client, either starting from scratch as
  1258.   explained in the configuration of a DOS client, starting from the DOS
  1259.   client and installing over the network (that is what we did).  You can
  1260.   also start with a preconfigured Windows machine, but you will probably
  1261.   have less knowledge of what stuff is on the hard disk.
  1262.  
  1263.   Proceed as described above for a DOS client. It is usually NOT
  1264.   necessary to use EMM386 with Windows 95.  If you are using Windows 95
  1265.   OSR2 (alias MSWIN 4.1, alias Windows 95 service pack 1, alias Windows
  1266.   95 with Internet Explorer), you should add the following line in the
  1267.   [Options] section of MSDOS.SYS (yes, it is a text file):
  1268.  
  1269.  
  1270.        ______________________________________________________________________
  1271.        AUTOSCAN=0
  1272.        ______________________________________________________________________
  1273.  
  1274.  
  1275.  
  1276.  
  1277.   This will let Windows know that you do not want ScanDisk to be runned
  1278.   automatically at boot time.
  1279.  
  1280.   If you want to reduce network and server load (which will improve your
  1281.   system performances) while keeping all softwares on the server, you
  1282.   should consider installing the excellent Shared LAN Cache, from
  1283.   Measurement Techniques, Inc (see http://www.lancache.com).  This
  1284.   software runs on each client computer, and caches to the local hard
  1285.   disk every data obtained from the network. Even MS-Office starts much
  1286.   faster the second time you run it... You need one license per client
  1287.   computer, but it is not very expensive, and the firm make special
  1288.   prices for universities and colleges. The best thing to do is to go to
  1289.   their Web site and download the free evaluation copy.
  1290.  
  1291.  
  1292.   4.6.2.  Building the Disk Image
  1293.  
  1294.   Your MrZip script will be named zipwin95.mrz and contain:
  1295.  
  1296.  
  1297.        ______________________________________________________________________
  1298.        showlog
  1299.        filter -"temp/*"
  1300.        filter -"*.swp"
  1301.        fullzip "c:/" "L:/tftpboot/win95.imz"
  1302.        ______________________________________________________________________
  1303.  
  1304.  
  1305.  
  1306.  
  1307.   To build the image, mount the admin volume on drive L:, go to your
  1308.   utils directory and type the following command:
  1309.  
  1310.           mrzip -b zipwin95
  1311.  
  1312.  
  1313.  
  1314.   A few minutes later, you will have a new file if the server /tftpboot
  1315.   subdirectory called win95.imz, which is a compressed image of your
  1316.   hard disk. If your compressed image was bigger than 87 MB, it has
  1317.   probably been splitted in two or more fragments.  These fragments will
  1318.   automatically loaded one after the other when needed. Note that an
  1319.   image bigger than 87 MB will usually take More than one minute to
  1320.   uncompress and may irritate your users.  Our Windows 95 image is only
  1321.   70 MB big, because most software (except Office and Explorer)
  1322.   completely reside on the server. Only 45 seconds are needed to
  1323.   uncompress the image and restore the full disk.
  1324.  
  1325.   Copy the following batch file to /tftpboot/win95.bpb:
  1326.  
  1327.  
  1328.        ______________________________________________________________________
  1329.        hidelog
  1330.        setpartitions "bigdos:1024"
  1331.        setbootpart 1
  1332.        fullunzip "win95.imz" 1
  1333.        hidebootprom
  1334.        hdboot :1
  1335.        ______________________________________________________________________
  1336.  
  1337.  
  1338.  
  1339.  
  1340.   Your remote-boot Windows 95 configuration is ready ! You can now
  1341.   either set the BOOTP-option-155 to "win95", or type include
  1342.   "win95.bpb" from within BpBatch to test it.
  1343.  
  1344.  
  1345.   4.6.3.  Adapting the configuration for other Machines
  1346.  
  1347.   The big difference between Windows 3.1 and Windows 95 is that the
  1348.   later includes code for Plug-and-play , ie. automatic detection of
  1349.   your hardware. This not a bad thing in itself, but the trouble is that
  1350.   it is often too sensible, and that it sometimes fails.
  1351.  
  1352.   If you try to start another client with exactly the same boot image,
  1353.   you will probably get several messages during startup telling that
  1354.   Windows has detected new hardware: a new sound card, a new hard-disk,
  1355.   a new network card, and even a new mouse... There can be two reasons
  1356.   for that:
  1357.  
  1358.   ╖  the devices may not use the same ressources (for instance the mouse
  1359.      is not connected on the same port, or the sound card is not
  1360.      connected in the same slot - yes, that is detected)
  1361.  
  1362.   ╖  the devices may tell to Windows 95 their personal serial number
  1363.      (for instance, every Windows 95 differenciate every network card on
  1364.      the basis of its world-wide unique ethernet address)
  1365.  
  1366.      The fact that Windows 95 discover that the hardware has changed may
  1367.      not be a problem if the plug-and-play works as-is, but it become a
  1368.      problem when the plug-and-play does not work. For instance, Windows
  1369.      95 plug-and-play for our Logitech PS2/aux mouse does not work, and
  1370.      result in no mouse at all. To solve such kind of problems, arrange
  1371.      to have all computers as similar as possible, or make different
  1372.      images for different hardware. Later, you will discover that you
  1373.      can simply use the same image and just have several copies of the
  1374.      registery, that you can copy after having restoring the disk image
  1375.      but before booting.
  1376.  
  1377.   The thing you cannot avoid to differ between computers is the network
  1378.   card. PCI cards usually do not mind, but ISA Plug and Play do.  Bad
  1379.   luck for us, the plug-and-play code for our SMC EtherEZ card hangs the
  1380.   computer. The only solution is to let Windows 95 believe that it
  1381.   already know the network card, and that it is not necessary to trigger
  1382.   plug-and-play. The trick for doing that is to automatically insert an
  1383.   entry for the network card in Windows 95 registery, before starting
  1384.   it.  Note that this trick is not any more needed with most PCI cards.
  1385.  
  1386.  
  1387.   Move the autoexec.bat to the server as described above for DOS.  Edit
  1388.   it (on the server) and add the following lines:
  1389.  
  1390.   rem --- Patch Windows registery in order to avoid plug-and-play detection
  1391.   regedit /L:c:\windows\system.dat /R:c:\windows\user.dat c:\temp\patch.reg
  1392.  
  1393.  
  1394.   regedit is a standard Windows 95 program that let you browse the reg¡
  1395.   istery if you start it from within Windows 95, or do simple operations
  1396.   on the registery if you call it from DOS.  Run regedit under Windows
  1397.   95, search for your network card, usually under
  1398.  
  1399.           HKEY_LOCAL_MACHINE\Enum\ISAPNP
  1400.  
  1401.  
  1402.   and export the branch using the File menu. This will create a text
  1403.   file, that you should same as patch.ref in the server /tftpboot dire¡
  1404.   tory. Edit this file and find out where the card ethernet address is
  1405.   stored (do that on two different machines and compare the files if you
  1406.   can't find it by yourself). Replace it by a pettern in the form
  1407.   ${MACID}.  Then add lines to the win95.bpb script like this:
  1408.  
  1409.           set macid = "$BOOTP-Client-ID"
  1410.           patch "patch.ref" "{:1}temp/patch.reg"
  1411.  
  1412.  
  1413.   (do any necessary string manipulation for setting MACID if it is not
  1414.   exactly the client Ethernet address).  That's all, your clients should
  1415.   not any more try to autodect the network card.
  1416.  
  1417.   Once again, this whole trick is not necessary when using PCI network
  1418.   adapters.  Incidentally, we can use the same mechanism for
  1419.   automatically configuring the hostname, which Windows 95 does not seem
  1420.   to take into account when configuring through DHCP. We just add the
  1421.   following line to our patch.ref file:
  1422.  
  1423.  
  1424.        ______________________________________________________________________
  1425.        [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP]
  1426.        "ComputerName"="${BOOTP-Host-Name}"
  1427.  
  1428.        [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP]
  1429.        "HostName"="${BOOTP-Host-Name}"
  1430.  
  1431.        [HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\ComputerName\ComputerName]
  1432.        "ComputerName"="${BOOTP-Host-Name}"
  1433.        ______________________________________________________________________
  1434.  
  1435.  
  1436.  
  1437.  
  1438.   Using this small registery trick, your configuration should normally
  1439.   be portable for all machines with similar configurations. If you
  1440.   cannot avoid that Windows detect some hardware as new on one machine,
  1441.   try to rebuild the disk image from this machine. This will include the
  1442.   registery configuration specific to this machine into the image, and
  1443.   hopefully supress the problem.
  1444.  
  1445.  
  1446.   4.6.4.  System Maintenance and Upgrades
  1447.  
  1448.   If you want later to upgrade software, install bug fixes and security
  1449.   fixes, proceed as follow:
  1450.  
  1451.   ╖  Remote-boot a client computer to get a fresh install
  1452.  
  1453.   ╖  Make your changes
  1454.  
  1455.   ╖  Redo the disk image
  1456.  
  1457.   ╖  Copy the new image in place of the old one on the server
  1458.  
  1459.      That means, you can upgrade software on your server-based
  1460.      configuration as if it were a purely local install.
  1461.  
  1462.  
  1463.   4.7.  Setting up Windows NT
  1464.  
  1465.   We do not use Windows NT for remote-boot client computers but we have
  1466.   tested our system to ensure that it work as well. And it works.
  1467.  
  1468.   As our utilities currently have no support for NTFS (we neither have
  1469.   the documentation nor the time to do that, but I would be happy to
  1470.   help anyone who is interested in doing it), you will have to install
  1471.   NT on FAT16 (simply do not convert your partitions to NTFS during the
  1472.   setup).
  1473.  
  1474.   Copy your win95.bpb boot script to winnt.bpb.  Change the
  1475.   setpartitions line in winnt.bpb to the following:
  1476.  
  1477.           setpartitions "BIGDOS:512 BIGDOS:512"
  1478.  
  1479.  
  1480.   Then boot Windows 95 using this script, and install your NT client on
  1481.   drive C. Do not worry about the second partition for now.  Do not
  1482.   install too much stuff, or you will get a really large and slow-to-
  1483.   uncompress image.  Remove Windows 95 from the disk disk C, you do not
  1484.   need it in a Windows NT image (the boot menu is handled by the boot¡
  1485.   prom, not by NT boot loader).
  1486.  
  1487.   Reboot your computer in without overwriting the hard disk, ie. do not
  1488.   execute the winnt script but just
  1489.  
  1490.           hidebootprom
  1491.           hdboot
  1492.  
  1493.  
  1494.   Your NT station should start-up correctly. Make any necessary cus¡
  1495.   tomization.
  1496.  
  1497.  
  1498.   4.7.1.  Building the Disk Image
  1499.  
  1500.   The trouble with Windows NT is that direct disk access is prohibed by
  1501.   the kernel. That means, MrZip will not even be able to read the boot
  1502.   sectors. The best way to do an image is then to boot Windows 95 and to
  1503.   run MrZip from a DOS window. To do that, change the winnt.bpb script
  1504.   so that the Windows 95 image is not restored on the first but on the
  1505.   second partition:
  1506.  
  1507.  
  1508.        ______________________________________________________________________
  1509.        hidelog
  1510.        setpartitions "BIGDOS:512 BIGDOS:512"
  1511.        setbootpart 2
  1512.        fullunzip "win95.imz" 2
  1513.        hidebootprom
  1514.        hdboot :2
  1515.        ______________________________________________________________________
  1516.  
  1517.  
  1518.  
  1519.   (if you have any supplementary patch, change the "{:1}" to "{:2}").
  1520.   Boot with this script; you should have Windows 95 running, but a new
  1521.   drive D: should be available, with Windows NT inside.
  1522.  
  1523.   Make your disk image as usual (but on D:, of course), and save it as
  1524.   winnt.imz on the server /tftpboot directory.  Edit one last time the
  1525.   winnt.bpb script like this:
  1526.  
  1527.  
  1528.        ______________________________________________________________________
  1529.        hidelog
  1530.        setpartitions "BIGDOS:512 BIGDOS:512"
  1531.        setbootpart 1
  1532.        fullunzip "winnt.imz" 1
  1533.        clean 2
  1534.        #fullunzip "win95.imz" 2
  1535.        hidebootprom
  1536.        hdboot :1
  1537.        ______________________________________________________________________
  1538.  
  1539.  
  1540.  
  1541.  
  1542.   Your Windows NT remote-boot configuration is ready. Of course, if you
  1543.   do not like to have two partitions, you can setup a single partition
  1544.   instead. But when you have to rebuild the image, you will have to
  1545.   setup the second partition again for booting Windows 95.
  1546.  
  1547.  
  1548.   4.7.2.  System Maintenance and Upgrades
  1549.  
  1550.   If you want later to upgrade software, install bug fixes and security
  1551.   fixes, proceed as follow:
  1552.  
  1553.   ╖  Remote-boot a client computer to get a fresh install
  1554.  
  1555.   ╖  Make your changes
  1556.  
  1557.   ╖  Edit winnt.bpb: comment the clean and winnt fullunzip, uncomment
  1558.      win95 fullunzip
  1559.  
  1560.   ╖  Redo the disk image
  1561.  
  1562.   ╖  Copy the new image in place of the old one on the server
  1563.  
  1564.      That's all, folks !
  1565.  
  1566.  
  1567.   4.8.  Troubleshooting (FAQ)
  1568.  
  1569.   This section lists most frequently encountered problems.
  1570.  
  1571.      The image download never ends
  1572.         You are probably using a standard TFTP server, and it cannot
  1573.         handle more than 65535 packets of 512 bytes (or even 32767
  1574.         packets for the Solaris server). That is, your image must be
  1575.         fragmented in pieces of no more than 30 MB (or 15 MB for
  1576.         Solaris). See under CopyArchive for instructions on fragmenting
  1577.         an existing image. But you should seriously thing about using
  1578.         InCom's extended TFTP server, as it is much more efficient (it
  1579.         uses packets of 1408 bytes instead of 512 bytes).
  1580.  
  1581.      The archive decompression fails immediately
  1582.         There are three possibilities. Either the image is really
  1583.         corrupted on the server (try use MrZip to see if it is the
  1584.         case), or the file transfer has failed because of TFTP timeout,
  1585.         or because of incompatible protocol.
  1586.  
  1587.         TFTP timeout occurs when the network is too heavily loaded (for
  1588.         instance if you try to download a huge image with more than four
  1589.         clients at a time). In this case, BpBatch does not retry
  1590.         indefinitely because it would not help. Shut down a few
  1591.         computers and retry with no more than four computers (or maybe
  1592.         even three).  If you often need to download images for a lot of
  1593.         computers, you can try our special Broadcast TFTP server (see
  1594.         the section dedicated to it).
  1595.  
  1596.         Incompatible protocol is caused by using a standard TFTP server
  1597.         (typically the one built-in in your UNIX server) while asking
  1598.         BpBatch to work with enhanced TFTP. If you use a standard TFTP
  1599.         server, you should remove the .P extension (see the explanation
  1600.         in the next question).
  1601.  
  1602.  
  1603.      The computer hangs instead of downloading/unzipping (1)
  1604.         If you are using Incom's TFTP server, try to add -s 1408 59 to
  1605.         the command line. If you are not using an enhanced TFTP server,
  1606.         remove the .P extension from BpBatch filename on the server and
  1607.         in bootptab.
  1608.  
  1609.         Detailed explanation : this problem occurs if you did not setup
  1610.         an extended TFTP server but you used bpbatch.P as the
  1611.         bootfilename DHCP/BOOTP tag. BpBatch will indeed try to connect
  1612.         to an extended TFTP server when the bootfilename ends with a .P
  1613.         extension. To solve this problem, you can either remove the .P
  1614.         extension at the end of the bootfilename (it will tell BpBatch
  1615.         to use standard TFTP) or install an extended TFTP server.  The
  1616.         only supported extended TFTP server today is the one provided by
  1617.         Incom. You can find compiled binaries on their web site, or on
  1618.         our distribution directory. For Incom's TFTP server to properly
  1619.         work with the extended TFTP feature, you must add -s 1408 59 to
  1620.         the command line.
  1621.  
  1622.      The computer hangs instead of downloading/unzipping (2)
  1623.         May be your computer has a bad VESA support. Try giving the -v
  1624.         command-line argument or setting the VESA variable to "OFF".
  1625.  
  1626.      VESA scrolling is broken
  1627.         We use a VESA 1.1 function for scrolling. If your video adapter
  1628.         does not support VESA 1.1, forget it. If the scrolling works for
  1629.         one page, but then produces a strange strippled pattern, do not
  1630.         worry. This is a known bug, I will fix it as soon as I have time
  1631.         for it (VESA scrolling is not really essential...)
  1632.  
  1633.      There is a corrupted file in the cache
  1634.         When a file in the cache is corrupted by an external program, it
  1635.         is automatically removed from the cache. When a file in the
  1636.         cache is not fully written (because the computer is turned off
  1637.         during the file transfer), it is also automatically removed. But
  1638.         if the server transmits a corrupted file or if the transfer
  1639.         aborts from the server side, it is possible that this file stays
  1640.         in the cache. You can clean-up the cache simply by holding both
  1641.         shift down while BpBatch access it for the first time.
  1642.         Alternatively, you can evaluate clean -1 in interactive mode.
  1643.  
  1644.      The EXIT command does not work in a batch file
  1645.         This is not a bug. Exit is not a command.  There is no exit or
  1646.         quit command because it does not make any sense to exit from a
  1647.         boot script without booting. And MrBatch is really the same
  1648.         program as BpBatch.  What you can do instead is calling HdBoot.
  1649.         This makes sense, and the DOS version will cleanly exit instead
  1650.         of rebooting.  Note that you can exit from the DOS version at
  1651.         any time by pressing Ctrl-Break. This will restore all hooked
  1652.         interrupts before leaving.
  1653.  
  1654.      The Print command does not print
  1655.         If you try to print something and immediately enter interactive
  1656.         mode, you may not see your text. This is because your text was
  1657.         written on the runtime screen and the Interact command has
  1658.         switched the display to the Log screen. Just put a GetKey after
  1659.         the print commands and you will see the text output.
  1660.  
  1661.      MrZip says Malloc failed
  1662.         MrZip needs a lot of conventional memory to run.  If you
  1663.         encounter this problem, first ensure that you have unloaded the
  1664.         bootprom either using HideBootprom or using InCom's bputil.  If
  1665.         you run MrZip from bare MS-DOS (not within Windows 95 DOS box),
  1666.         you should use EMM386 to load the network drivers high in order
  1667.         to get as much conventional memory as possible. From a Windows
  1668.         95 DOS box, there is usually no problem (as long as you have not
  1669.         left your old 16-bit stuff in your autoexec.bat when you
  1670.         installed Windows 95).
  1671.  
  1672.      MrZip aborts while reading directories
  1673.         This bug has already been fixed once. Get the latest release of
  1674.         MrZip. If the problem persists, try to build your image with
  1675.         Trace set to "ON" (and usually PauseLog set to "OFF"); this will
  1676.         let you discover which file causes the problem. Send a detailled
  1677.         bug report.
  1678.  
  1679.      MrZip cannot access some file
  1680.         MrZip is probably trying to read a locked, open or special file,
  1681.         such as Windows swap file. Such files should usually not be
  1682.         included in the image and should be filtered out (using the
  1683.         filter command).  It is also possible that the operating system
  1684.         is playing you a trick.  If MrZip does not tell you what file
  1685.         causes the problem, try to build your image with Trace set to
  1686.         "ON" (and usually PauseLog set to "OFF").  You can also try to
  1687.         use direct disk access (that is, do not refer the source
  1688.         partition as "C:" or "/" but as "{:1}" or whatever partition it
  1689.         is). Using direct disk access is usually slower because we have
  1690.         less buffers than the operating system, but it may be sometimes
  1691.         more reliable.
  1692.  
  1693.      Disk images are always reloaded from the server
  1694.         Disk images are stored in the special cache area and should not
  1695.         be reloaded if they have not changed on the server. However, as
  1696.         the cache area always starts after the last used partition,
  1697.         changing the total size of partitions will move the location of
  1698.         the cache and thus destroy its content. Another possible reason
  1699.         for a file disappearing from the cache is that the previous file
  1700.         has grown more than one-and-an-half times its initial size. The
  1701.         file would then have been overwritten and need to be downloaded
  1702.         once again. This should almost never occurs.  A third possible
  1703.         reason is a too small cache area. If the free space left outside
  1704.         the partitions is less than one-and-an-half times the sum of all
  1705.         compressed image sizes, only the most recently used images will
  1706.         be present in the cache and the other will have to be reloaded
  1707.         on demand.
  1708.  
  1709.      Red Hat Linux 5.1 does not boot properly
  1710.         This distribution assumes Linux was booted using lilo and checks
  1711.         for the BOOT_IMAGE command line argument (in
  1712.         /etc/rc.d/rc.sysinit). Simply add it in the linuxboot call, or
  1713.         change your rc.sysinit.
  1714.  
  1715.      The broadcast TFTP ramdisk hangs (Got in bound state)
  1716.         Linux dhcp client is a program that dynamically changes the IP
  1717.         address of the client according to DHCP offers. If the address
  1718.         is offered forever (infinite lease time), the DHCP client just
  1719.         set the address and returns (this is what we expect).  However,
  1720.         if the lease time is limited, the DHCP client must remain loaded
  1721.         and ask for new addresses every few minutes. And if the DHCP
  1722.         client does not return, MrBatch will never be loaded...  The
  1723.         solution is to give an infinite lease time (sometimes encoded as
  1724.         -1).
  1725.  
  1726.      File access hangs under BpBatch, but not under MrBatch
  1727.         This problem occured on an AMI BIOS dated 94/07/25. We
  1728.         investigated a little bit, and found no solution. It seems that
  1729.         this problem is due to a bug in this BIOS (some register or
  1730.         memory location must be destroyed).
  1731.  
  1732.      Unzip of a fragmented archive fails (Malloc failed)
  1733.         This problem was introduced with PXE compatibility, but has now
  1734.         been fixed. Please get the latest version.
  1735.  
  1736.      MrBatch and MrZip complain about the terminal under RedHat 5.x
  1737.         This problem has been fixed in the 9th of August version of
  1738.         MrBatch/MrZip.  There was a problem with a new version of
  1739.         ncurses which has been released with RedHat 5.1.
  1740.  
  1741.         MrZip has been linked to the version 3.0 of libncurses. You can
  1742.         use other versions of libncurses only if they are newer than
  1743.         version 3.0. To use a newer libncurses, all you have to do is to
  1744.         create a soft link from libncurses.so.3.0 to your
  1745.         libncurses.so.xx file.  With RedHat 5.1, you can use the
  1746.         following command : cd /usr/lib ; ln -s libncurses.4.2
  1747.         libncurses.3.0 You can also download a version recent version of
  1748.         mrzip/mrbatch. Starting from the 10/25/98, mrbatch is now
  1749.         compiled under RedHat 5.1.
  1750.  
  1751.      MrBatch and MrZip do not start under Linux (file not found)
  1752.         This problem is the reverse of the previous one. Now that the
  1753.         distribution is libc6 ready, it cannot be used any more with
  1754.         libc5. If you encounter this problem, simply upgrade your Linux
  1755.         box (Well, if we hear too much complaints, we might try to keep
  1756.         two distributions...).
  1757.  
  1758.      I can not access other mode than the default 800x600 VESA mode
  1759.         You should first display the contents of the VESA-Modes
  1760.         variable, to see if your hardware support the mode you would
  1761.         like to use.  Then, try one of the two ways to select a special
  1762.         VESA mode :
  1763.  
  1764.      ╖  InitGraph "mode": Try InitGraph "1024x768", and then run the
  1765.         graphical primitive you are interested in (e.g DrawGif).
  1766.  
  1767.      ╖  VESA-Modes: The first field of the VESA-Modes variable is the
  1768.         name of the default mode. If you change the VESA-Modes variable,
  1769.         all graphical primitive will use the mode you specified.
  1770.  
  1771.      BpBatch prints a
  1772.         We corrected a bug in the memory allocation functions of
  1773.         BpBatch. You should make sure that you have a version of BpBatch
  1774.         which has been released after september the 22nd 1998.
  1775.  
  1776.      Fullunzip using the Linux version of MrBatch always fails
  1777.         We corrected this problem in the 09/22/1998 release.
  1778.  
  1779.      Scandisk says my disk is corrupted
  1780.         The 10/25/98 release did correct a problem with large images.
  1781.         Try to download a recent version of BpBatch.
  1782.  
  1783.      My RedHat boot floppydisk does not work with FloppyBoot
  1784.         This bug has been corrected in the 10/25/98 release.
  1785.  
  1786.      My FAT32 disk image does not boot properly
  1787.         This bug has been corrected in the 02/09/99 release.
  1788.  
  1789.  
  1790.   5.  Remote-Boot Tools Reference Manual
  1791.  
  1792.   This section provides detailled informations on the use of the tools
  1793.   we developped at the CUI, University of Geneva for this remote-boot
  1794.   configuration.
  1795.  
  1796.  
  1797.   5.1.  BpBatch, MrBatch and MrZip
  1798.  
  1799.   These three names stand for three variants of the same program, with
  1800.   the following characteristics:
  1801.  
  1802.   ╖  BpBatch is a special program that can be started from the BootProm
  1803.      before the operating system is loaded. It is made of two parts:
  1804.      bpbatch.P, the dynamic loader, and bpbatch.ovl, the program itself.
  1805.      BpBatch has full disk I/O capabilities through our own
  1806.      implementation of FAT16, FAT32 and Ext2fs, as well as remote
  1807.      network I/O capabilities through the BootProm TFTP API.  BpBatch
  1808.      was compiled under DOS using Borland C 5.0 and Turbo Assembler 3.2.
  1809.  
  1810.   ╖  MrBatch is the DOS/Linux version of BpBatch.  All commands
  1811.      recognized by BpBatch are recognized by MrBatch and vice versa.
  1812.      This is very usefull if you want to test your batch scripts from a
  1813.      DOS/Linux session.  Under DOS, MrBatch emulates remote I/O by OS-
  1814.      based file access if the bootprom is not available. Under Linux,
  1815.      the bootprom cannot be seen anymore but MrBatch can emulate it
  1816.      using Linux IP support, or use OS-based file access.  MrBatch was
  1817.      compiled under Linux using GCC 2.7.2.1 and under DOS using Borland
  1818.      C 5.0 and Turbo Assembler 3.2.
  1819.  
  1820.   ╖  MrZip is an interpreter that recognizes a superset of MrBatch
  1821.      language, and that serves to build disk images.  In MrZip, the
  1822.      limited remote file I/O is replaced by a full-featured OS-based
  1823.      file access. MrZip does not include VESA support.  MrZip was
  1824.      compiled under Linux using GCC 2.7.2.1 and under DOS using Borland
  1825.      C 5.0 and Turbo Assembler 3.2.
  1826.  
  1827.  
  1828.   5.1.1.  Command Line Arguments
  1829.  
  1830.   All programs accept the same syntax of arguments. MrBatch and MrZip
  1831.   take them from the command line, while BpBatch look for them in the
  1832.   BOOTP option 155 (decimal). Here is the syntax of the arguments:
  1833.  
  1834.           [-x] [-l] [-b] [-v] [-w] [-i] [script-basename]
  1835.  
  1836.  
  1837.   where:
  1838.  
  1839.   ╖  -x disable the use of extended memory
  1840.  
  1841.   ╖  -l disable the use of ISO-latin-8859-1 as default character set
  1842.  
  1843.   ╖  -b cancel the bootprom detection (which cause a floppy seek under
  1844.      DOS)
  1845.  
  1846.   ╖  -v cancel the VESA detection (which cause a switch to full screen
  1847.      under Windows 95)
  1848.  
  1849.   ╖  -w enable direct disk write access (disabled by default under DOS
  1850.      and Linux)
  1851.  
  1852.   ╖  -i enable interactive mode even if a script name is provided
  1853.  
  1854.      The script-basename is optional. If provided, MrBatch and BpBatch
  1855.      load the file with the .bpb extension, and MrZip loads the file
  1856.      with the .mrz extension. If not provided, MrBatch and MrZip run in
  1857.      interactive mode while BpBatch loads the file with the same
  1858.      basename as the BOOTP Boot file and a .bpb extension.
  1859.  
  1860.  
  1861.   5.1.2.  Syntax rules
  1862.  
  1863.   The following rules apply when BpBatch parses an input line.
  1864.  
  1865.   ╖  Commands are parsed line by line. Lines are separated by CR and/or
  1866.      LF.
  1867.  
  1868.   ╖  The maximal line length is currently 255 characters.
  1869.  
  1870.   ╖  Keywords and variable names are case-insensitive.
  1871.  
  1872.   ╖  " is interpreted as the special string delimiter
  1873.  
  1874.   ╖  When ${variable} or $variable is encountred, it is substituted by
  1875.      the value of the variable, or by an empty string if the variable is
  1876.      undefined.  The substitution also occurs within a string. Moreover,
  1877.      the resulting substituted value must be explicitely enclosed
  1878.      between double quotes if used as a string value (ie. one should
  1879.      merely speak of macro expansion than of a variables).
  1880.  
  1881.   ╖
  1882.  
  1883.   ╖  \a is substituted by the audible-bell character (ASCII 7)
  1884.  
  1885.   ╖  \b is substituted by the backspace character (ASCII 8)
  1886.  
  1887.   ╖  \n is substituted by the newline character (ASCII 10)
  1888.  
  1889.   ╖  \r is substituted by the return character (ASCII 13)
  1890.  
  1891.   ╖  \t is substituted by the tabulation character (ASCII 9)
  1892.  
  1893.   ╖  \v is substituted by the vertical-tab character (ASCII ...)
  1894.  
  1895.   ╖  \nnn where n is a 3-digit octal number between 000 and 377 is
  1896.      substituted by the character with ascii code specified
  1897.  
  1898.   ╖  \X where X is any other character not listed above is substituted
  1899.      by X itself. In particular,
  1900.  
  1901.   ╖  \" is substituted by a regular double-quote (not a string-
  1902.      delimiter)
  1903.  
  1904.   ╖  \$ is substituted by a regular dollar sign (not variable
  1905.      substitution)
  1906.  
  1907.   ╖  \\ is substituted by a regular backslash (not a special character)
  1908.  
  1909.   ╖  The character "end of string" (ASCII code 0) CANNOT be used
  1910.      anywhere as it is used internally as end-of-string delimiter
  1911.  
  1912.   ╖  The character "floating diaeresis" (ASCII code dec 249, hex F9,
  1913.      octal 371) CANNOT be used in any string as it is used internally as
  1914.      string delimiter in the input parsing routine.
  1915.   ╖  The character "block space" (ASCII code dec 255, hex FF, octal 377)
  1916.      CANNOT be used in any variable value as it is used internally as
  1917.      variable delimiter.
  1918.  
  1919.   Empty lines are ignored.  Lines starting with a sharp (#) are treated
  1920.   as comments and are not interpreted.  Lines starting with a column (:)
  1921.   are treated as labels and are not interpreted.
  1922.  
  1923.  
  1924.      String expressions
  1925.         Strings are delimited by opening and closing double-quotes:
  1926.  
  1927.                 "Hello world"
  1928.  
  1929.  
  1930.      To include double-quotes within a string, quote them using a back¡
  1931.      slash:
  1932.  
  1933.              "I said: \"Hello world\""
  1934.  
  1935.  
  1936.      Strings can be postfixed with a few operators.
  1937.  
  1938.      ╖  The character substitution operator:
  1939.  
  1940.                 "Hello world"/o=u/      ==      "Hellu wurld"
  1941.                 "198.76.54.32"/.= /     ==      "198 76 54 32"
  1942.  
  1943.  
  1944.  
  1945.      ╖  The word selection operator (zero-based):
  1946.  
  1947.                 "Hello world"{0}        ==      "Hello"
  1948.                 "198 76 54 32"{1-3}     ==      "76 54 32"
  1949.  
  1950.  
  1951.  
  1952.      ╖  The substring selection operator (zero-based):
  1953.  
  1954.                 "Hello world"[4]        ==      "o"
  1955.                 "Hello world"[4-7]      ==      "o wo"
  1956.  
  1957.  
  1958.  
  1959.      Operators can be chained by postfixing one after the other.  For
  1960.      informations about the string length and word count operators, see
  1961.      under "Numerical expressions".
  1962.  
  1963.  
  1964.      Numerical expressions
  1965.         Numerical expressions work on 32-bits integer numbers (from
  1966.         -2,147,483,646 to 2,147,483,647). Hexadecimal octal and binary
  1967.         numbers are not understood.  Whenever a numerical expression is
  1968.         expected, the following are recognized:
  1969.  
  1970.      ╖  A positive or negative integer number
  1971.  
  1972.      ╖  An expression in the form (expr1 op expr2) where op can be
  1973.         either +, -, * (multiply), / (divide) or % (modulo) and expr is
  1974.         a numerical expression.  Note that EACH operation MUST be
  1975.         enclosed between parenthesis :
  1976.  
  1977.                 ((3 * 5)+2)             == 17
  1978.  
  1979.  
  1980.  
  1981.      ╖  The string-length operator (@), followed by a string :
  1982.  
  1983.                 @"Hello world"          == 11
  1984.  
  1985.  
  1986.  
  1987.      ╖  The word-count operator (#) followed by a string :
  1988.  
  1989.                 #"Hello world"          == 2
  1990.  
  1991.  
  1992.  
  1993.  
  1994.      Durations
  1995.         A few commands expect durations as arguments. Durations are
  1996.         measured in seconds, with a precision of up to a tenth of
  1997.         second:
  1998.  
  1999.                 Delay 3                 waits for 3 seconds
  2000.                 Delay 0.3               waits for 3/10 seconds
  2001.  
  2002.  
  2003.  
  2004.  
  2005.      Colors
  2006.         Whenever a color is expected, you can either use the numeric
  2007.         value of the color or its symbolic name (case-insensitive).  The
  2008.         following colors are recognized
  2009.  
  2010.                 Black           0
  2011.                 Blue            1
  2012.                 Green           2
  2013.                 Cyan            3
  2014.                 Red             4
  2015.                 Magenta         5
  2016.                 Brown           6
  2017.                 LightGray       7
  2018.                 DarkGray        8
  2019.                 LightBlue       9
  2020.                 LightGreen     10
  2021.                 LightCyan      11
  2022.                 LightRed       12
  2023.                 LightMagenta   13
  2024.                 Yellow         14
  2025.                 White          15
  2026.  
  2027.  
  2028.  
  2029.  
  2030.      File References
  2031.         File names are strings. They must therefore always be enclosed
  2032.         between double-quotes. File names are case-sensitive on case-
  2033.         sensitive filesystems, case-insensitive on case-insensitive
  2034.         filesystems.  Slash and backslash can be freely used one in
  2035.         place of the other.  Do not forget to double backslash since a
  2036.         single backslash is an escape character.
  2037.  
  2038.         There are two kinds of file references:
  2039.  
  2040.      ╖  Direct disk files
  2041.  
  2042.      ╖  Foreign files
  2043.  
  2044.         Direct disk files are referenced using the following notation:
  2045.  
  2046.  
  2047.                 "{disk:partition}/absolute/filename"
  2048.  
  2049.  
  2050.      The disk number can be omitted and defaults to zero.  For instance,
  2051.      "{:1}/usr/bin" points to /usr/bin assuming there is such a direc¡
  2052.      tory on the first partition. Direct file I/O is solely based on our
  2053.      own file access routines (we do not use the operating system).
  2054.  
  2055.      There are two special partitions. Partition zero corresponds to the
  2056.      hard disk master boot record (MBR) and has a pseudo file-system
  2057.      which let you access the boot code. Partition minus-one (-1)
  2058.      corresponds to the cache filesystem (see below).
  2059.  
  2060.      Under BpBatch/MrBatch, foreign files correspond to remote files on
  2061.      the TFTP server when the BootProm is available:
  2062.  
  2063.              "help.bpb"           is the file help.bpb in the /tftpboot directory
  2064.              "gifs/MyImage.gif"   is a file in /tftpboot/gifs
  2065.  
  2066.  
  2067.      Other TFTP servers can be referenced :
  2068.  
  2069.              "198.76.54.32:help.bpb"
  2070.  
  2071.  
  2072.      If the other server is behind a gateway :
  2073.  
  2074.              "198.70.0.1/198.76.54.31:help.bpb"
  2075.  
  2076.  
  2077.      One can also specify a specific port for the TFTP connection :
  2078.  
  2079.              "198.76.54.32@89:getpasswd/smith"
  2080.  
  2081.  
  2082.      There can be only one open remote file at a time.  If the BootProm
  2083.      is not available, remote files are emulated using the operating
  2084.      system file I/O, but the same restriction apply.
  2085.  
  2086.      Under MrZip, foreign files correspond to files as seen by the
  2087.      operating system. There is no limitation, and foreign files can be
  2088.      used wherever direct disk files can be. Foreign files are usually
  2089.      faster than direct disk files, because the operating system has
  2090.      more buffers. Foreign files can refer to network files if supported
  2091.      by the operating system.
  2092.  
  2093.              "C:\\autoexec.bat"
  2094.              "C:/config.sys"
  2095.              "/mnt/net/usr"
  2096.  
  2097.  
  2098.  
  2099.  
  2100.   5.1.3.  The Cache Filesystem
  2101.  
  2102.   In order to reduce network load and to fasten the boot process, disk
  2103.   archives, linux kernels and possibly other files are cached on the
  2104.   hard disk. This disk cache is located at the end of the hard disk,
  2105.   between the last cylinder allocated in the partition table and the
  2106.   last physical cylinder of the disk (out of any allocated partition).
  2107.   There MUST be room between the last partition and the end of the disk
  2108.   if you want the cache filesystem to work.  The cache filesystem MUST
  2109.   work if you want to restore a disk image.
  2110.  
  2111.   The disk cache is organised in a volatile, CRC-validated filesystem :
  2112.   Each directory entry and each 32 KB data block is validated by a
  2113.   32-bits CRC. Whenever a directory entry or a data block unexpectedly
  2114.   changes, the file is automatically removed from the cache and
  2115.   downloaded again upon the next request.
  2116.  
  2117.   You can freely access the cache filesystem from within BpBatch,
  2118.   MrBatch and MrZip using direct disk access on the special partition
  2119.   "{:-1}".  To see the content of the cache, just type :
  2120.  
  2121.           logdir "{:-1}"
  2122.  
  2123.  
  2124.   If the cache ever gets corrupted and is not automatically cleaned
  2125.   (which should never occurs), you can either type :
  2126.  
  2127.           clean -1
  2128.  
  2129.  
  2130.   (in interactive mode) or hold both shifts down when BpBatch access the
  2131.   cache for the first time.
  2132.  
  2133.  
  2134.   5.1.4.  Special variables
  2135.  
  2136.   Some variable are initially set and/or have special meanings.  Some of
  2137.   them exist within all programs, other are only available under MrZip
  2138.   and other are only available when a BOOTP/DHCP reply has been
  2139.   received.
  2140.  
  2141.  
  2142.      General variables
  2143.  
  2144.      ╖  $Program is set to "BpBatch" within BpBatch, "MrBatch" within
  2145.         MrBatch and "MrZip" within MrZip
  2146.  
  2147.      ╖  $Basename is set to the basename of the script on which the
  2148.         batch interpreter was started
  2149.  
  2150.      ╖  $HelpFile is the name of the file loaded when Help is invoked.
  2151.         Default: "${Basename}.hlp"
  2152.  
  2153.      ╖  $BOOTP-... are variables set from the BOOTP/DHCP reply (see the
  2154.         paragraph on BOOTP/DHCP variables for more details)
  2155.  
  2156.      ╖  $DHCP-... are variables set from the DHCP reply (see the
  2157.         paragraph on BOOTP/DHCP variables for more details)
  2158.  
  2159.      ╖  $Disks is set to the space-separated list of sizes for each
  2160.         disk.  That means, #"$Disks" represent the number of disks and
  2161.         "$Disks"{0} is the size of the first disk
  2162.  
  2163.      ╖  $Keypressed is set to the next ready-to-read key available in
  2164.         the keyboard buffer (if available)
  2165.  
  2166.      ╖  $LBA    controls the use of LBA to access disks > 2Gb.  Default:
  2167.         "ON"
  2168.  
  2169.      ╖  $FDA    controls the use of fast disk access (write accross
  2170.         cylinders).  Default: "ON"
  2171.  
  2172.      ╖  $VESA   controls the use of VESA graphics.  Default: "ON" if
  2173.         available
  2174.  
  2175.      ╖  $VESA-Modes gives the list of all available VESA modes.  The
  2176.         first entry of the list is the default mode, which is used when
  2177.         no parameter is given to InitGraph.  Note: if VESA="OFF", this
  2178.         variable is blank
  2179.      ╖  $APM    is set to "ON" if your computer supports Avanced Power
  2180.         Management. If $APM is "ON", you can use the command PowerOff to
  2181.         turn your computer off.  Default: depends on your hardware
  2182.  
  2183.      ╖  $Trace controls the display of each command before execution. It
  2184.         also controls the display of file names when creating new
  2185.         archives.  Default: "OFF"
  2186.  
  2187.      ╖  $AutoShowLog controls the automatic switch to the text log
  2188.         whenever the ESC key is pressed.  Default: "ON"
  2189.  
  2190.      ╖  $PauseLog controls the pause between each page of log when the
  2191.         log is visible.  Default: "ON"
  2192.  
  2193.      ╖  $CacheDisk is set to the disk used for caching remote files.
  2194.         Default: empty == 0, the first hard disk
  2195.  
  2196.      ╖  $CacheAlways controls the automatic caching of remote files
  2197.         copied, patched or drawn as GIF.  Default: "OFF"
  2198.  
  2199.      ╖  $CacheNever prevents any file from being cached.  Turn this
  2200.         variable on for diskless Linux boot.  Default: "OFF"
  2201.  
  2202.      ╖  $CacheReserve controls the preventive allocation of 25 percent
  2203.         more space than necessary in the cache partition, to let the
  2204.         files grow. Turn this variable off if you are short of disk
  2205.         space.  Default: "ON"
  2206.  
  2207.      ╖  $ExtMemory controls the use of Extended Memory (or XMS).  Once
  2208.         deactivated, extended memory cannot be reactivated.  Default:
  2209.         "ON" if available
  2210.  
  2211.      ╖  $IsoLatin controls the interpretation of upper ASCII codes in
  2212.         included and patched files. The IsoLatin settings are processed
  2213.         at the time the file is loaded, not at the time the file is
  2214.         processed.  Default: "ON"
  2215.  
  2216.      ╖  $ProgressX and $ProgressY controls the position of the progress
  2217.         window displayed in VESA graphics during archive download and
  2218.         decompression.  Default: 200 200
  2219.  
  2220.      ╖  $EXT2-Backup controls the update of superblock backups in Linux
  2221.         ext2 filesystem. Superblock backups take a few seconds to do and
  2222.         are never used by current kernels (only by e2fsck).
  2223.  
  2224.      ╖  $Security-Gateway controls the gateway-server used for user
  2225.         authentication. Our special authentication gateway must be
  2226.         running on the target computer.  Default: "${BOOTP-Server-
  2227.         IP}@89" (ie. the TFTP server, on port 89)
  2228.  
  2229.      ╖  $Security-Check contains the answer of the security server for
  2230.         the last check performed, either PASSED or FAILED.  Default:
  2231.         "FAILED"
  2232.  
  2233.      ╖  $Security-Passwd, $HelpTopic, $OnExit, $OnKey-...  are used
  2234.         internally.
  2235.  
  2236.         See also BOOTP variables and MrZip-specific variables.
  2237.  
  2238.  
  2239.      MrZip-specific variables
  2240.         The following variables are only used within MrZip.
  2241.  
  2242.      ╖  $TempPath controls the directory where temporary files will be
  2243.         stored.  Default: <empty> == current directory
  2244.  
  2245.      ╖  $DumpFormat controls the way archives are dumped to the log when
  2246.         requested.  It is a string containing
  2247.  
  2248.      ╖  "h"/"H" to display the archive header
  2249.  
  2250.      ╖  "b"/"B" to summarize/dump boot sectors
  2251.  
  2252.      ╖  "s"/"S" to display a short/long allocation summary
  2253.  
  2254.      ╖  "d"/"D" to display a short/long directory listing
  2255.  
  2256.      ╖  "f"/"F" to summarize/dump files
  2257.  
  2258.         Default: "hbD"
  2259.  
  2260.      ╖  $FragmentSize controls the size of archive pieces.  If you do
  2261.         not use InCom's extended TFTP server, you should set this to "30
  2262.         MB".  Default: "87 MB"
  2263.  
  2264.      ╖  $SourceArchive, $DestArchive, $Filter... are used internally.
  2265.  
  2266.  
  2267.      BOOTP variables
  2268.         The following BOOTP-... and DHCP-... variables are recognized,
  2269.         as long as a BOOTP/DHCP reply has been received (TCP/IP Bootprom
  2270.         must be reported as detected):
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.                 $BOOTP-Client-ID
  2312.                 $BOOTP-Your-IP
  2313.                 $BOOTP-Server-IP
  2314.                 $BOOTP-Gateway-IP
  2315.                 $BOOTP-Bootfile
  2316.                 $BOOTP-Server-Name
  2317.                 $BOOTP-Subnet-Mask
  2318.                 $BOOTP-Time-Offset
  2319.                 $BOOTP-Routers
  2320.                 $BOOTP-Time-Servers
  2321.                 $BOOTP-Name-Servers
  2322.                 $BOOTP-Domain-name-Servers
  2323.                 $BOOTP-BOOTP-Log-Servers
  2324.                 $BOOTP-Cookie-Servers
  2325.                 $BOOTP-Lpr-Servers
  2326.                 $BOOTP-Impress-Servers
  2327.                 $BOOTP-Resource-Location-Servers
  2328.                 $BOOTP-Host-Name
  2329.                 $BOOTP-Boot-Size
  2330.                 $BOOTP-Merit-Dump
  2331.                 $BOOTP-Domain-Name
  2332.                 $BOOTP-Swap-Servers
  2333.                 $BOOTP-Root-Path
  2334.                 $BOOTP-Extensions-Path
  2335.                 $BOOTP-IP-Forwarding
  2336.                 $BOOTP-Interface-MTU
  2337.                 $BOOTP-All-Subnets-Are-Local
  2338.                 $BOOTP-Broadcast-Address
  2339.                 $BOOTP-NIS-Domain
  2340.                 $BOOTP-NIS-Servers
  2341.                 $BOOTP-NTP-Servers
  2342.                 $BOOTP-Font-Servers
  2343.                 $BOOTP-X-Display-Manager
  2344.                 $DHCP-IP-Address-Lease-Time
  2345.                 $DHCP-Message-Type
  2346.                 $DHCP-Server-Identifier
  2347.                 $DHCP-Message
  2348.                 $DHCP-Renewal-Time
  2349.                 $DHCP-Rebinding-Time
  2350.                 $BOOTP-NIS+-Domain
  2351.                 $BOOTP-NIS+-Servers
  2352.                 $BOOTP-Server-Name
  2353.                 $BOOTP-Bootfile
  2354.                 $BOOTP-Mobile-IP-Agent
  2355.                 $BOOTP-SMTP-Servers
  2356.                 $BOOTP-POP3-Servers
  2357.                 $BOOTP-NNTP-Servers
  2358.                 $BOOTP-WWW-Servers
  2359.                 $BOOTP-Finger-Servers
  2360.                 $BOOTP-IRC-Servers
  2361.                 $BOOTP-StreetTalk-Servers
  2362.                 $BOOTP-STDA-Servers
  2363.  
  2364.  
  2365.  
  2366.      Other BOOTP/DHCP parameters can be used under the name
  2367.  
  2368.              $BOOTP-Option-n
  2369.  
  2370.  
  2371.      where n is the decimal representation of the BOOTP option number.
  2372.  
  2373.      Do not mix-up BOOTP-Gateway-IP, which is the gateway to use for
  2374.      TFTP and should be 0.0.0.0 if the TFTP server is in the same
  2375.      subnet, and BOOTP-Routers, which contains the default IP
  2376.      gateway(s). The TCP/IP Bootprom sometimes seems to set the value of
  2377.      BOOTP-Gateway-IP from the value in BOOTP-Routers, causing each TFTP
  2378.      ack packet to be sent to the router first. To avoid such behaviour,
  2379.      if your TFTP server is in the same subnet as the client, force
  2380.      BOOTP-Gateway-IP to 0.0.0.0 (thanks to Maciek Uhlig for having
  2381.      pointed out this problem).
  2382.  
  2383.  
  2384.   5.1.5.  Monitoring commands
  2385.  
  2386.   This section lists commands for monitoring the system state.  Optional
  2387.   arguments are listed between parenthesis (I would have prefered square
  2388.   brackets, but LaTeX do not like them at this place...)
  2389.  
  2390.      Interact
  2391.         Show the log and turn to interactive mode until QUIT or EXIT is
  2392.         entered.  Type HideLog before quitting if you want to avoid
  2393.         disturbing log messages during batch execution.
  2394.  
  2395.  
  2396.      Help (topic)
  2397.         Load the on-line help file (bpbatch.hlp) and display the
  2398.         description of the given topic. If no topic is provided, or if
  2399.         the topic is unknown, display the help index.
  2400.  
  2401.  
  2402.      Log
  2403.         Display the string on the log. No return/linefeed is implicitely
  2404.         added.
  2405.  
  2406.  
  2407.      Echo
  2408.         Display the string on the log and go to the next line.
  2409.         Equivalent to
  2410.  
  2411.                 Log "text\r\n".
  2412.  
  2413.  
  2414.  
  2415.  
  2416.      LogVars (
  2417.         Log (ie. display on the log) all variables matching the given
  2418.         pattern.  The pattern can contain wildcards (? and *).
  2419.  
  2420.         Example: LogVars "BOOTP-*"              list all BootP variables
  2421.  
  2422.  
  2423.  
  2424.      LogDir
  2425.         Log (ie. display on the log) all files from the given path that
  2426.         match the pattern. The pattern can contain wildcards (? and *).
  2427.  
  2428.         Example: LogDir "/usr/g*p"              list files names like g...p
  2429.  
  2430.  
  2431.  
  2432.      LogTree
  2433.         Log the directory tree starting with the given path as root.
  2434.  
  2435.  
  2436.      LogFile
  2437.         Log the content of the file. The file must be no more than 64 KB
  2438.         big.
  2439.  
  2440.  
  2441.      ShowLog
  2442.         Make the log visible if it was hidden.  Automatically performed
  2443.         when ESC is pressed with "$AutoShowLog" == "ON" and when
  2444.         entering interactive mode.
  2445.  
  2446.  
  2447.      HideLog
  2448.         Prevent log messages to appear on the screen. Default state when
  2449.         BpBatch, MrBatch and MrZip are started on a script file.
  2450.  
  2451.  
  2452.      CaptureLog
  2453.         Record all log output to a 64 KB buffer until EndCapture is
  2454.         issued.  Wrap around buffer if the log output is more than 64 KB
  2455.         big.  This command can be used to create a text file with an
  2456.         arbitrary content.  The EndCapture MUST occurs within the same
  2457.         batch file.
  2458.  
  2459.  
  2460.      EndCapture (
  2461.         End up the capture of the log. If a filename is given, store the
  2462.         captured text to a file. Otherwise, discard it.
  2463.  
  2464.  
  2465.      Beep
  2466.         Make a sound. This command is equivalent to Echo "\007".
  2467.  
  2468.  
  2469.   5.1.6.  Control commands
  2470.  
  2471.   This section lists commands that control the batch execution.
  2472.   Optional arguments are listed between parenthesis.
  2473.  
  2474.      Include
  2475.         Load the given file and start up the parser on it. Go back to
  2476.         the current point when the include file processing is done.  The
  2477.         interpretation of characters above ASCII 127 within the include
  2478.         file depends on the value of $IsoLatin at the time the file is
  2479.         included.
  2480.  
  2481.  
  2482.      OnExit command
  2483.         Setup an exit-handler that will automatically be evaluated at
  2484.         the end of current batch file.
  2485.  
  2486.  
  2487.      Goto label
  2488.         Move the execution cursor to the given label (ie. the line
  2489.         starting with :label)
  2490.  
  2491.  
  2492.      Eval
  2493.         Perform all substitutions on the "command" and run the parser on
  2494.         it.
  2495.  
  2496.  
  2497.      If ...
  2498.  
  2499.           If (not) <expr1> (==|!=|<|>|>=|<=|=>|=<|<>) <expr2> <command>
  2500.           If (not) (ci) "str1" (==|!=|<|>|>=|<=|=>|=<|<>) "str2" <command>
  2501.           If (not) (ci) "str1" Match-Expr "pattern" <command>
  2502.           If (not) (ci) "str1" Match-Passwd "unix-passwd" <command>
  2503.           If (not) (ci) "str1" in "wordlist" <command>
  2504.           If (not) (ci) "str1" in-file "filename" <command>
  2505.           If (not) exist "filename" <command>
  2506.           If (not) valid <disk>:<partition> <command>
  2507.  
  2508.  
  2509.      These commands execute command; if the test succeeds.  The 1st form
  2510.      compares two numerical expressions.  The 2nd form compares two
  2511.      strings, optionally case-insensitive.  The 3rd form tests if "str1"
  2512.      matches the given pattern (wildcards allowed).  The 4th form tests
  2513.      if the clear password "str1" matches the Unix-crypted password.
  2514.      The 5th form tests if "str1" is included in the word list.  The 6th
  2515.      form tests if "str1" is included in the word file.  The 7th form
  2516.      tests if the given file exists.  The 8th form tests if the given
  2517.      partition is valid (i.e. formatted). This form is only supported by
  2518.      BpBatch versions after February 1999.
  2519.  
  2520.  
  2521.      Set ...
  2522.  
  2523.           Set variable = "string-value"
  2524.           Set variable = <expr>
  2525.  
  2526.  
  2527.  
  2528.      Setup a value for the given variable. If the given value is a
  2529.      numerical expresison, it will be implicitely converted to a string.
  2530.      A variable can be used anywhere by refering it as $variable or
  2531.      ${variable}.  If the resulting reference is to be interpreted as a
  2532.      string, it should be enclosed between double quotes: "$variable" or
  2533.      "${variable}".
  2534.  
  2535.  
  2536.      Delay duration
  2537.         Waits until the specified duration (expressed in seconds)
  2538.         expired.  See also the paragraph on the format of durations.
  2539.  
  2540.  
  2541.      GetTime variable, GetDate variable
  2542.         Get the CMOS time and store it into variablein the form
  2543.         HH:MM:SS.  Get the CMOS date and store it into variablein the
  2544.         form YY/MM/DD.  This can be used to customize the behavior of
  2545.         your boot scripts depending on the time of day or on the date.
  2546.  
  2547.  
  2548.      SetTime
  2549.         Set the computer CMOS time or date to the given value.  If you
  2550.         have a security gateway (our special TFTP server) running, you
  2551.         can automatically adjust the CMOS time and date of the client
  2552.         computers at each boot by evaluating the following command:
  2553.  
  2554.                 include "$Security-Gateway:gettime"
  2555.  
  2556.  
  2557.      If you want to understand what this command does, just type:
  2558.  
  2559.              logfile "$Security-Gateway:gettime"
  2560.  
  2561.  
  2562.  
  2563.  
  2564.      Poweroff
  2565.         Turn off the computer.  This command only works if the computer
  2566.         is Advanced Power Management (APM) compatible.
  2567.  
  2568.  
  2569.   5.1.7.  Keyboard-related commands
  2570.  
  2571.   This section lists commands that let you monitor the keyboard input.
  2572.   Optional arguments are listed between parenthesis.  See also under
  2573.   National Language Support.
  2574.  
  2575.      GetKey (variable)
  2576.         Indefinitely wait until a key is pressed and store it in the
  2577.         variable.
  2578.  
  2579.  
  2580.      WaitForKey duration (command)
  2581.         Wait until a key is pressed for no more than duration seconds.
  2582.         If no key has been pressed after the given time, evaluate the
  2583.         command.  Otherwise, leave the key in the keyboard buffer.  See
  2584.         also the paragraph on the format of durations.
  2585.  
  2586.  
  2587.      Input (variable (max-length))
  2588.         Read a return-terminated string from the keyboard and store the
  2589.         result string in variable (without the terminating return). If
  2590.         max-length is given, do not allow the user to enter more than
  2591.         this number of characters.
  2592.  
  2593.         See also GetPasswd under Security-related commands.
  2594.  
  2595.  
  2596.      OnKey
  2597.         Setup a key handler that will automatically evaluate the given
  2598.         command when the key "c" is pressed (except is explicitely
  2599.         waited by a GetChar or an Input command). If the string
  2600.         "default" is used instead of a single character, the command is
  2601.         executed if any other key is pressed.
  2602.  
  2603.  
  2604.   5.1.8.  Text output commands
  2605.  
  2606.   This section lists commands used to perform regular text output.  All
  2607.   these commands can be used in graphic mode also, with the same
  2608.   behaviour (except that text mode provides 80x25 characters while
  2609.   graphic mode provides 100x37, because graphic mode characters are of
  2610.   size 8x16).  Optional arguments are listed between parenthesis.  See
  2611.   also under National Language Support.
  2612.  
  2613.      Print
  2614.         Print the specified string/expression at current cursor position
  2615.         and using current text attributes, then move the cursor.  Add
  2616.         "\r\n" to the end of the string to go to the next line.
  2617.  
  2618.  
  2619.      TextAttr fg-color bg-color
  2620.         Setup the text attributes. One can also put a single numeric
  2621.         value representing both colors and defined as 16*bg-color+fg-
  2622.         color.
  2623.  
  2624.         If you need more fantasy, you can use LoadFont. See under
  2625.         National Language Support.
  2626.  
  2627.  
  2628.      At line,col (command)
  2629.         Move the cursor position to the specified position and evaluate
  2630.         the command if provided.
  2631.  
  2632.         Example: At 10,20 Print "Gnats and rats !"
  2633.  
  2634.  
  2635.  
  2636.      Clear (color (pattern-char (top,left,bottom,right)))
  2637.         Fill the given text area with the given pattern-char (either a
  2638.         string or the decimal ascii code). The area defaults to the full
  2639.         screen, the pattern char defaults to the full block (ASCII dec
  2640.         219) and the color defaults to black (clear screen). Move the
  2641.         cursor to the upper left corner of the cleared area.
  2642.  
  2643.      BpMenu backward compatibility commands
  2644.  
  2645.           .ATT (<attribute>)
  2646.           .CLS (<attribute>)
  2647.           .DEF <key> (<timeout_val>)
  2648.           .KEY <key> <filename>
  2649.           .POS ((<x>) <y>)
  2650.           .PWD <key> <cpasswd>
  2651.           .WLN (<text>)
  2652.           .WRT <text>
  2653.  
  2654.  
  2655.  
  2656.      See InCom's manual for more infos. We wrote some time ago a program
  2657.      program for editing menu files using this syntax, but it is
  2658.      preferable to make your menus using the new explicit syntax.  Note
  2659.      that the .PWD command is not implemented because we do not now the
  2660.      password crypting algorithm used by InCom GmbH.
  2661.  
  2662.  
  2663.   5.1.9.  Graphics output commands
  2664.  
  2665.   This section lists commands used to perform graphic-mode output.  For
  2666.   the functions listed in this section, coordinates are given in pixels.
  2667.   You can also use all text output commands (see above) in graphic mode.
  2668.   Optional arguments are listed between parenthesis.
  2669.  
  2670.   Note that the graphic mode is automatically turned on whenever a
  2671.   graphic command is used, unless the variable VESA is set to "OFF".
  2672.  
  2673.      InitGraph (
  2674.         Turn on VESA graphics.  The origin is on the upper-left corner
  2675.         of the screen (0 0).  VESA graphics may hang some computers
  2676.         under Windows 95. Run MrBatch with the -v option to avoid such
  2677.         problems.
  2678.  
  2679.         You can request a specific video mode if you use the parameter
  2680.         "mode" This parameter is optional: if you do not specify any
  2681.         value, the video mode will be taken from the first field of the
  2682.         VESA-Modes variable.
  2683.  
  2684.         Valid modes are :
  2685.  
  2686.      ╖  640x480    =>  640 by 480 pixels, 256 colors
  2687.  
  2688.      ╖  800x600    =>  800 by 600 pixels, 256 colors (default mode)
  2689.  
  2690.      ╖  1024x768   =>  1024 by 768 pixels, 256 colors
  2691.  
  2692.      ╖  1280x1024  =>  1280 by 1024 pixels, 256 colors
  2693.  
  2694.         The VESA-Modes variable lists the video modes supported by your
  2695.         hardware.
  2696.  
  2697.         Example: InitGraph "640x480"
  2698.  
  2699.  
  2700.      CloseGraph
  2701.         Close VESA graphic mode and go back to text mode.
  2702.  
  2703.  
  2704.      DrawBar x-pos y-pos width height color
  2705.         VESA graphics. Draw a filled bar of the given size and colors.
  2706.  
  2707.      DrawWindow x-pos y-pos width height (bg-color (bar-color)) (
  2708.         VESA graphics. Draw a window of the given size and colors. The
  2709.         background color defaults to LightGray and the title-bar color
  2710.         defaults to Blue.  If you include a title string and a color,
  2711.         this text will be displayed in the title bar.
  2712.  
  2713.  
  2714.      Drawtext x-pos y-pos
  2715.         VESA graphics. Draw the text string at the given position with a
  2716.         transparent background. The color defaults to text foreground
  2717.         color.
  2718.  
  2719.  
  2720.      DrawGif
  2721.         VESA graphics. Load the given GIF-87a file and draw it on the
  2722.         screen.  The file can be interlaced, but must be in GIF-87a (not
  2723.         GIF-89a).  The image size should fit in the selected video mode.
  2724.         You cannot load a 1024x768 GIF file when you selected a 640x480
  2725.         mode.  The GIF position defaults to the top left corner of the
  2726.         screen (0 0).
  2727.  
  2728.         The color-strategy defines the allocation of colors in the
  2729.         palette when more than 256 colors are needed (for instance when
  2730.         two 256 colors GIF files are displayed simultaneously):
  2731.  
  2732.      ╖  Best-Colors  use best possible colors for the most recent GIF
  2733.  
  2734.      ╖  Spare-Colors try to avoid allocating colors, change existing
  2735.         colors
  2736.  
  2737.      ╖  Share-Colors try to avoid allocating colors, use existing colors
  2738.  
  2739.      ╖  Reuse-Colors allocate no new color, only use existing colors
  2740.  
  2741.         The default strategy is Best-Colors.
  2742.  
  2743.  
  2744.   5.1.10.  Security-related commands
  2745.  
  2746.   This section lists commands that help you authenticate a user.
  2747.   Optional arguments are listed between parenthesis.
  2748.  
  2749.   Some of these functions cooperate with a Security gateway, that you
  2750.   should first install. See the section on Special TFTP servers for more
  2751.   infos.
  2752.  
  2753.      GetPasswd (variable (max-length))
  2754.         Same as Input, but echo stars instead of the typed characters.
  2755.  
  2756.  
  2757.      Crypt
  2758.         Apply the Unix crypt function to the given 8-chars text and
  2759.         store the resulting crypted string into variable. The "salt" is
  2760.         usually a two-character string that will be found as the first
  2761.         two characters of the crypted string.
  2762.  
  2763.         Note that Unix crypt is a one-way function. It is not possible
  2764.         to decode the crypted string. One can only try to crypt another
  2765.         string with the same salt and compre the resulting crypted
  2766.         string.
  2767.  
  2768.  
  2769.      DESCrypt
  2770.         Crypt the given text using the given 8-chars key and store the
  2771.         result as an hexadecimal string in variable.
  2772.  
  2773.      DESDecrypt
  2774.         Decrypt the given hexadecimal string using the given 8-chars key
  2775.         and store the result in variable.
  2776.  
  2777.  
  2778.      MD5
  2779.         Compute the MD5 checksum of the given text and store it as an
  2780.         hexadecimal string in variable. Can be used as an alternative to
  2781.         the Unix crypt function to check for passwords bigger than 8
  2782.         characters.
  2783.  
  2784.  
  2785.      CheckUser
  2786.         Connect to the $Security-Gateway and check if the given user
  2787.         exist in the given radius domain and uses the specified
  2788.         password.  If the domain is "Unix", use the Unix user/password
  2789.         definition on the security gateway. For any other domain, use
  2790.         the security gateway domain definition file to determine the
  2791.         real Radius or NT domain to check.
  2792.  
  2793.         Set the value of $Security-Check to "PASSED" or "FAILED".  The
  2794.         password do not transit in clear on the network.
  2795.  
  2796.  
  2797.   5.1.11.  Disk-related commands
  2798.  
  2799.   This section lists commands for preparing the hard-disk.  Optional
  2800.   arguments are listed between parenthesis.
  2801.  
  2802.      GetPartitions variable (disk)
  2803.         Read the partition table(s) for the given disk and store it as a
  2804.         string into the given variable. The result string is a space-
  2805.         separated list of Type:Size, where
  2806.  
  2807.      ╖  Type is FAT16, EXT, BIGDOS, NTFS, FAT32, FAT32-LBA, BIGDOS-LBA,
  2808.         EXT-LBA, LINUX-SWAP, LINUX-EXT2 or the decimal filesystem id for
  2809.         unknown types.
  2810.  
  2811.      ╖  Size is the size of the partition in megabytes.
  2812.  
  2813.         See SetPartitions for more informations about partitions.
  2814.  
  2815.  
  2816.      SetPartitions
  2817.         Setup the partition table(s) to the content of the string. The
  2818.         format used is the same that for GetPartitions. This command
  2819.         also reset all boot flags (hint: use SetBootPart).
  2820.  
  2821.         The main partition table in the master boot record (MBR) has
  2822.         only four entries. Moreover, DOS and Windows accept only ONE FAT
  2823.         partition (called the Primary partition, C:) in the main
  2824.         partition table. Any supplemental FAT partition should be nested
  2825.         in an extended partition (and is thus called a Logical
  2826.         partition). If we give numbers 1-4 to the partitions described
  2827.         in the MBR partition table and numbers 5-8 to the partitions
  2828.         described in the first extended partition, the definition of two
  2829.         FAT partitions would work by defining partition 1 as FAT,
  2830.         partition 2 as EXT and partition 5 as FAT. Partitions 3,4,6,7
  2831.         and 8 should be marked as UNUSED. The same scheme can be used
  2832.         recursively to define more than two FAT partitions: nesting
  2833.         another extended partition in partition 6 and adding a logical
  2834.         FAT partition in partition 9.
  2835.  
  2836.         In the most strict interpretation of DOS specifications, that
  2837.         means that entries 3 and 4 of the partition tables are never
  2838.         used. In practice, some versions of DOS and some other OS are
  2839.         able to use more than two partitions per partition table, but
  2840.         there is no clear rule.  On this side, BpBatch is rather
  2841.         flexible in its interpretation of partition tables, it can often
  2842.         understands things that OSes cannot.
  2843.  
  2844.         One universal rule is that there should never be more than one
  2845.         extended partition per partition table, otherwise the partition
  2846.         numbering scheme breaks down.
  2847.  
  2848.         If you want to try funny configurations, make your own
  2849.         experiments, but don't complain if the OS does not recognize
  2850.         your partitions. The only way it is guarantee to work is to use
  2851.         the primary partition to store the OS boot partition, and to
  2852.         nest all other partitions, one at a time, in extended
  2853.         partitions.
  2854.  
  2855.         Example of extended partitions :
  2856.  
  2857.                 SetPartitions "BIGDOS:100 EXT:400 EMPTY EMPTY BIGDOS:400"
  2858.  
  2859.  
  2860.  
  2861.  
  2862.      GetBootPart variable (disk)
  2863.         Get the partition number with the boot flag turned on (DOS says:
  2864.         the activated primary partition) and store it to the variable.
  2865.         The first partition is numbered 1.  If no partitions has the
  2866.         boot flag turned on, answers zero.
  2867.  
  2868.  
  2869.      SetBootPart partition (disk)
  2870.         Set the boot flag to the given partition. The boot flag let the
  2871.         master boot record (MBR) choose which partition to boot on.  The
  2872.         first partition is numbered 1.
  2873.  
  2874.  
  2875.      Blank partition (disk)
  2876.         Fill the given partitions with zeroes. Can take quite a lot of
  2877.         time for big partitions. Do not format the partition for any
  2878.         operating system. See also Clean.
  2879.  
  2880.  
  2881.      Clean partitions (disk) (
  2882.         Fast-format the given partition(s) according to the type
  2883.         declared in the partition table. If a label is given and the
  2884.         filesystem supports it, setup the partition label. For a
  2885.         paranoiac full format, call Blank on the partition first.
  2886.  
  2887.         Clean is supported for (FAT16) BIGDOS, FAT32, EXT, LINUX-EXT2
  2888.         and LINUX-SWAP partitions. To clean the master boot record
  2889.         (MBR), use Clean 0.
  2890.  
  2891.         Clean should be used on data partitions and on MBR/EXT
  2892.         partitions.  It is totally useless to clean a partition before
  2893.         unzipping a filesystem on it using FullUnzip.
  2894.  
  2895.  
  2896.      FullUnzip
  2897.         Decompress a full disk archive to the given partition,
  2898.         overwriting any existing file (clean-up on the fly).
  2899.  
  2900.         FullUnzip is supported for (FAT16) BIGDOS, FAT32 and LINUX-EXT2.
  2901.  
  2902.         This commands turn on VESA graphics to display a progress
  2903.         banner, unless VESA has been turned OFF.
  2904.  
  2905.      IncrUnzip
  2906.         Decompress an incremental disk archive to the given path. Files
  2907.         in the archive replace those with the same name on the target
  2908.         path, but other files are not deleted.
  2909.  
  2910.         IncrUnzip is supported for (FAT16) BIGDOS, FAT32 and LINUX-EXT2.
  2911.         This command is far less efficient than FullUnzip since the
  2912.         existing filesystem structure must be preserved. However, it
  2913.         avoids multiplying the number of different disk images by
  2914.         storing the differences only.
  2915.  
  2916.  
  2917.      FileUnzip
  2918.         Uncompress a file previously compressed with MrZip FileZip
  2919.         command.  The file is validated by a 32-bits CRC.
  2920.  
  2921.  
  2922.      Copy
  2923.         Copy the source file to the destinaton file, byte-to-byte.  Can
  2924.         be used after a FullUnzip for instance to update configuration
  2925.         files from the server without rebuilding the image.  Better to
  2926.         use FileUnzip for big and easy-to-compress files.
  2927.  
  2928.  
  2929.      Append
  2930.         Copy the first, then the second file to the destination file,
  2931.         byte-to-byte.  Can be used on arbitrary large files.  The
  2932.         destination file cannot be one of the two source files.
  2933.  
  2934.  
  2935.      Patch
  2936.         Read the source file and perform variable substitution before
  2937.         writing it to the destination file. The interpretation of
  2938.         characters above ASCII 127 depends on the value of $IsoLatin.
  2939.  
  2940.         By default, variables are recognized when prefixed by "${" and
  2941.         postfixed by "}". This can be changed to any other non-empty
  2942.         string.  remember that if you want to use a dollar sign within
  2943.         the prefix or suffix, you must escape it or it will get macro-
  2944.         evaluated. For instance, if you want to explicitely use the
  2945.         default prefix and postfix, use:
  2946.  
  2947.                 Patch "source-file" "dest-file" "\${" "}"
  2948.  
  2949.  
  2950.  
  2951.  
  2952.      MkDir
  2953.         Recursively create directories from the root to the given full
  2954.         path.  If the path already exists, this command has no effect.
  2955.  
  2956.  
  2957.      Delete
  2958.         Remove the given file. The file must exist.
  2959.  
  2960.  
  2961.      DelTree
  2962.         Recursively remove all files and directories under the given
  2963.         path, and remove the directory itself.
  2964.  
  2965.  
  2966.   5.1.12.  Boot commands
  2967.  
  2968.   This section lists commands for continuing the boot process.  Optional
  2969.   arguments are listed between parenthesis.
  2970.  
  2971.      HideBootProm
  2972.         Restore the memory and the interrupt vectors allocated by the
  2973.         bootprom.  All attempts to make TFTP transfers will fail after
  2974.         calling this command.  It is usually a good idea to call this
  2975.         command before HdBoot, or you might run short of memory under
  2976.         DOS/Windows. This command is implicitely called by FloppyBoot.
  2977.  
  2978.         Note that although this function restore all vectors
  2979.         "officially" rerouted by the BootProm, it does not seems to
  2980.         restore everything.  But it works well enough for DOS and
  2981.         Windows.
  2982.  
  2983.  
  2984.      LoadRamDisk
  2985.         Load a floppy disk image into the extended memory and redirect
  2986.         the BIOS Disk Services to make floppy disk calls use this image
  2987.         instead. This command implicitely calls HideBootProm. Call
  2988.         FloppyBoot to boot on the ramdisk you just loaded.
  2989.  
  2990.         This kind of ramdisk may not be as robust as what you get when
  2991.         you use the TFTPBoot command. The only advantage is that it only
  2992.         steals a few hundred bytes of conventional memory instead of the
  2993.         >64 KB reserved by the TCP/IP BootPROM. Warning, nothing secures
  2994.         the extended memory in which the ramdisk resides.  There is no
  2995.         way to uninstall such a ramdisk.
  2996.  
  2997.  
  2998.      LoadZRamDisk
  2999.         Do the same as LoadRamDisk, but for an image that has been
  3000.         compressed using MrZip FileZip command. Compressed ramdisks are
  3001.         protected against data corruption (and uncomplete download) by a
  3002.         byte count and a 32-bits CRC.
  3003.  
  3004.  
  3005.      TFTPBoot
  3006.         Chain to another boot file (for instance a floppy image made
  3007.         with InCom's BpShell program). See the file referencing
  3008.         conventions for accessing a file on another TFTP server.
  3009.  
  3010.  
  3011.      FloppyBoot
  3012.         Hide the Boot ROM, load the floppy disk boot sector and boot on
  3013.         it.
  3014.  
  3015.  
  3016.      HdBoot (disk)(:partition)
  3017.         Load the given boot sector and boot from it. The disk default to
  3018.         zero, the first hard disk, and the partition defaults to zero,
  3019.         ie. the master boot record. You can boot from any partition, but
  3020.         be warned that Windows 95 may not let you boot a partition that
  3021.         has not been set as the boot partition (hint: use SetBootPart).
  3022.  
  3023.         This command does not implicitely call HideBootProm, so you
  3024.         might want to call it before.
  3025.  
  3026.  
  3027.      LinuxBoot
  3028.         Load the given kernel and ramdisk into the high memory, setup
  3029.         the command line and boot the kernel. It is a good idea to put
  3030.         at least a minimal command line with the location of the root
  3031.         filesystem (like "root=dev/hda1"/). If you are using a linux
  3032.         system that heavily relies on lilo (like RedHat Linux 5.1), it
  3033.         may be necessary to add to the command line something like
  3034.         BOOT_IMAGE=linux. Note that the kernel can be loaded by TFTP
  3035.         (automatically cached on the hard disk) or directly from the
  3036.         target root partition.
  3037.         This command works for small and big kernels (zImage and
  3038.         bzImage).
  3039.  
  3040.  
  3041.   5.1.13.  National language support
  3042.  
  3043.   This section lists commands related not national language support.
  3044.   Optional arguments are listed between parenthesis.
  3045.  
  3046.      RemapKeys
  3047.         National keyboard support. Remap given keys to other characters.
  3048.         For instance, to swap the Y and Z keys, use
  3049.  
  3050.                 Remapkeys "yzYZ" "zyZY"
  3051.  
  3052.  
  3053.      It is a good idea to use the quoted octal notation when using char¡
  3054.      acters not included in the minimal ASCII character set, in order to
  3055.      avoid a dependency to the iso-latin modal settings.
  3056.  
  3057.      For international keyboards, there are two keys that produce a
  3058.      backslash in non-remapped (US) mode. Each of them can be
  3059.      independantly remapped, thanks to the fact that BpBatch sees one of
  3060.      them as a key answering ASCII code 252 (octal) or ASCII code 335
  3061.      (octal) when shifted.
  3062.  
  3063.      If you send me a sample script that does keyboard mapping for your
  3064.      national keyboard, I will make it available under
  3065.      http://cuiwww.unige.ch/info/pc/remote-boot/soft/sample-scripts To
  3066.      help you make your own keyboard mapping, I suggest pressing all
  3067.      special keys without remapping the keyboard and writing down the
  3068.      character they produce.  These will be the original-keys. The
  3069.      remapped-keys simply are the key you would have liked to see, in
  3070.      the same order. If some keys (either original or remapped) produce
  3071.      characters above ASCII dec 127, use the quoted octal notation. You
  3072.      can easily get the octal code for any given character by looking in
  3073.      the ASCII table of HelpPC for instance (HelpPC is a shareware
  3074.      hypertext on-line help program by David Jurgens).
  3075.  
  3076.  
  3077.      RemapAltkeys
  3078.         National keyboard support. Remap the given keys when ALT is
  3079.         depressed For instance, to map Alt-2 to the ampersand sign, use
  3080.  
  3081.                 RemapAltKeys "2" "@"
  3082.  
  3083.  
  3084.      Note that dead keys are not supported.
  3085.  
  3086.  
  3087.      LoadCodePage
  3088.         Load and activate the given binary Codepage file.  Codepages are
  3089.         used for the translation of Unicode characters (present on VFAT
  3090.         valumes for instance) into 8-bits characters.  If you do not
  3091.         have the right Codepage loaded, you will get FAT warnings while
  3092.         accessing the filesystem when special characters are encountred.
  3093.  
  3094.         All binary codepage files are available at
  3095.         http://cuiwww.unige.ch/info/pc/remote-boot/soft/codepage.zip
  3096.  
  3097.         The default codepage is 850, a reordered superset of ISO-
  3098.         Latin-1.  If you load a more exotic codepage, you should usually
  3099.         turn the variable $IsoLatin to "off" or you might get
  3100.         meaningless implicit conversions. Moreover, if you want to
  3101.         display exotic characters, you should also load the proper
  3102.         screen font (use "LoadFont").
  3103.      LoadFont
  3104.         Load and activate a VGA/VESA font, both in text and graphic
  3105.         mode.  The font file must be a binary file of 16
  3106.         bztes/characters (8x16 bitmap). This command can be used for
  3107.         National Language Support as well as for Fantasy support.
  3108.  
  3109.         An archive with several fantasy fonts is available at
  3110.         http://cuiwww.unige.ch/info/pc/remote-boot/soft/fonts.zip.  This
  3111.         archive also contains a program to extract fonts for your
  3112.         codepage from the DOS .CPI file.
  3113.  
  3114.  
  3115.   5.1.14.  Commands specific to MrZip
  3116.  
  3117.  
  3118.      Source...
  3119.  
  3120.           Source (i)archive "filename"
  3121.           Source path "path"
  3122.  
  3123.  
  3124.  
  3125.      Set the source for the archive manipulation to the given
  3126.      (incremental) archive file or disk path.
  3127.  
  3128.  
  3129.      Dest...
  3130.  
  3131.           Dest (i)archive "filename"
  3132.           Dest (i)dump
  3133.           Dest path "path"
  3134.  
  3135.  
  3136.  
  3137.      Set the destination for the archive manipulation to the given
  3138.      (incremental) archive file, dump or disk path. To control the
  3139.      quantity of data displayed during dump, use the $DumpFormat special
  3140.      variable.
  3141.  
  3142.  
  3143.      FileZip
  3144.         Compress a file for further decompression with FileUnzip or for
  3145.         using as ZRamDisk. The file is validated by a 32-bits CRC.
  3146.  
  3147.  
  3148.      Filter...
  3149.  
  3150.           Filter -"pattern"
  3151.           Filter +"pattern"
  3152.  
  3153.  
  3154.  
  3155.      Avoid/allow files and directories matching the given pattern
  3156.      (wildcards allowed) to be included in the archive. The pattern is
  3157.      matched agains the full pathname. By default, all files are
  3158.      included in the image.  You only need to explicitely allow files
  3159.      that where cancelled by a filter.  Each negative filter has its own
  3160.      positive filter (allowed) sublist.
  3161.  
  3162.      For DOS/Windows images, you will typically use
  3163.  
  3164.              Filter -"*.swp"
  3165.              Filter -"temp/*"
  3166.  
  3167.  
  3168.  
  3169.      and for Unix images, you will typically use
  3170.  
  3171.              Filter -"var/log/*"
  3172.              Filter -"tmp/*"
  3173.  
  3174.  
  3175.  
  3176.  
  3177.      CopyArchive
  3178.         Start the archive manipulation operation, according to source,
  3179.         destination and filter settings. Except in a few circumstances,
  3180.         you will probably use the shortcut below instead of explicitely
  3181.         calling CopyArchive.  One circumstance in which you will use
  3182.         CopyArchive explicitely is when you want to change the
  3183.         fragmentation of an image, as follow:
  3184.  
  3185.                 set FragmentSize="30 MB"
  3186.                 Source archive "original.imz"
  3187.                 Dest archive "refragmented.imz"
  3188.                 CopyArchive
  3189.  
  3190.  
  3191.  
  3192.  
  3193.      FullZip
  3194.         Shortcut for
  3195.  
  3196.                         Source path "path"
  3197.                         Dest archive "full-archive"
  3198.                         CopyArchive
  3199.  
  3200.  
  3201.      You should usually first setup filters.
  3202.  
  3203.  
  3204.      IncrZip
  3205.         Shortcut for
  3206.  
  3207.                         Source path "path"
  3208.                         Dest iarchive "incr-archive"
  3209.                         CopyArchive
  3210.  
  3211.  
  3212.  
  3213.  
  3214.      FullDump
  3215.         Shortcut for
  3216.  
  3217.                         Source archive "full-archive"
  3218.                         Dest dump
  3219.                         CopyArchive
  3220.  
  3221.  
  3222.  
  3223.  
  3224.      IncrDump
  3225.         Shortcut for
  3226.  
  3227.                         Source iarchive "incr-archive"
  3228.                         Dest dump
  3229.                         CopyArchive
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.      XCopy
  3236.         Shortcut for
  3237.  
  3238.                         Source path "srcpath"
  3239.                         Dest path "dstpath"
  3240.                         CopyArchive
  3241.  
  3242.  
  3243.  
  3244.  
  3245.   5.2.  NoBreak.sys
  3246.  
  3247.   Nobreak.sys is a very small (about 350 bytes only) driver that you
  3248.   include at the beginning of your config.sys. Its goal is to secure the
  3249.   boot process, until the user is logged in.  DOS provides a setting for
  3250.   this (namely BREAK=OFF), but it is not drastic enough, and has almost
  3251.   no effect in the autoexec.bat.  Our driver works by modifying the
  3252.   scan-code of the key pressed when a break is requested, directly at
  3253.   the BIOS level.  This way, no program at all can receive a break until
  3254.   break is enabled again.
  3255.  
  3256.   The driver must be loaded from the config.sys (or using the devlod
  3257.   program from Undocumented DOS). Afterwards, break can be enabled by
  3258.   sending Yes to the NOBRK pseudo-device, and disabled again by sending
  3259.   No (in fact, only the first character, Y or N is significant).
  3260.  
  3261.   As this driver relies on the BIOS, it does only work for DOS and
  3262.   Windows 3.1.  Windows 95 has its own low-level keyboard handling
  3263.   routines.
  3264.  
  3265.   Assembler source code is available.
  3266.  
  3267.  
  3268.   6.  Special TFTP Servers
  3269.  
  3270.   As the only network support available in the TCP/IP BootPROM is TFTP,
  3271.   there is a special interest in enhancing TFTP servers for providing
  3272.   new capabilities.
  3273.  
  3274.  
  3275.   6.1.  Incom Enhanced TFTP Server
  3276.  
  3277.   InCom GmbH distributes with the TCP/IP BootPROM an enhanced TFTP
  3278.   server that can send packets of up to 1408 bytes instead of the
  3279.   standard 512 bytes.  This is a great enhancement that you should use.
  3280.   This server is available on the TCP/IP Bootprom Utility disk for
  3281.   Solaris, Windows and as Netware NLM.
  3282.  
  3283.  
  3284.   6.2.  Linux Enhanced TFTP Server
  3285.  
  3286.   We built a modified version of Linux TFTP server that acts as InCom
  3287.   enhanced TFTP server. Basically, we simply changed the packet size
  3288.   from 512 to 1408 bytes and the port from 69 to 59.  It is available
  3289.   from http://cuiwww.unige.ch/info/pc/remote-boot/soft/etdtpd.tar.gz.
  3290.  
  3291.  
  3292.   6.3.  The Security Gateway
  3293.  
  3294.   We wrote a special TFTP server that serves as security gateway for
  3295.   authenticating users. This server runs under Linux or Solaris, and can
  3296.   authenticate users according to a Unix password database (NIS and
  3297.   shadow passwords are supported), a Windows NT (or Samba) server or a
  3298.   Radius server.  It is available from
  3299.   http://cuiwww.unige.ch/info/pc/remote-boot/soft/stdtpd.tar.gz, with
  3300.   source and precompiled binaries.  The precompiled binaries do not
  3301.   include NT password encryption as we cannot distribute libdes but
  3302.   compilation is straightforward.
  3303.  
  3304.   In order to use the security gateway, you just have to setup a trivial
  3305.   security domains configuration file that describes to which
  3306.   authentication server each logical security domains maps (the Unix
  3307.   domain implicitely maps to the server Unix password database). This is
  3308.   a sample configuration file:
  3309.  
  3310.  
  3311.        ______________________________________________________________________
  3312.        #
  3313.        # STFTPD configuration file
  3314.        #
  3315.        # This file specify the server of the "security domains". Two types of
  3316.        # authentication servers are supported : radius or winnt (winnt includes
  3317.        # NT Server and Samba)
  3318.        #
  3319.        # Format of radius servers
  3320.        # radius        <domain>        <serveraddress>         <secret>
  3321.        #
  3322.        # secret is the secret word as specified in your /etc/raddb/clients file
  3323.        #
  3324.        # Format of SMB servers
  3325.        # winnt         <domain>        <serveraddress>         <netbiosname>
  3326.        #
  3327.        # netbiosname is the NETBIOS name of your server
  3328.        #
  3329.        # Examples
  3330.        radius         sec-dom-rad     radiusserver    testing123
  3331.        winnt          sec-dom-nt1     192.168.1.1     NTSERVER1
  3332.        winnt          sec-dom-smb     samba           SAMBA1
  3333.        ______________________________________________________________________
  3334.  
  3335.  
  3336.  
  3337.  
  3338.   Note that if you are using Samba, you must set security = user.
  3339.  
  3340.   You can also provide to the security server a file containing a list
  3341.   of users which are not allowed to log on (for which the check will
  3342.   fail anyways).
  3343.  
  3344.  
  3345.   6.4.  The Broadcast TFTP Server
  3346.  
  3347.   We wrote a special TFTP server that implements a home-made Broadcast
  3348.   variant of TFTP. Using this server, we were able to download images to
  3349.   25 clients on a heavily loaded 10 Mb ethernet network at 6 Mb/s (it is
  3350.   more efficient than the regular TFTP because it does not need to
  3351.   acknowledge each packets).  This server runs under Linux or Solaris.
  3352.   It is available from http://cuiwww.unige.ch/info/pc/remote-
  3353.   boot/soft/btdtpd.tar.gz, with source and precompiled binaries.
  3354.  
  3355.   As the TCP/IP bootprom does not support this protocol, our solution
  3356.   consist in booting a tiny ramdisk-based linux system using the tools
  3357.   described in this document, and running the Linux version of MrBatch
  3358.   which has built-in support for Broadcast TFTP. A simple batch file can
  3359.   the download all files to the cache in a few minutes, simultaneously
  3360.   on all client computers.  You do not need to install Linux yourself to
  3361.   use this package, except if you have exotic hardware and cannot
  3362.   directly use the kernel provided in the package.
  3363.  
  3364.   The process works as follow. First, you startup the broadcast server
  3365.   manually, giving the number of expected client computers as argument
  3366.   (remember, this procedure is not to be used every day but only when
  3367.   you changed an image and want to ensure it is immediately uploaded to
  3368.   all your client computers). Then, you turn on all client computers,
  3369.   which will run the following BpBatch script:
  3370.  
  3371.  
  3372.        ______________________________________________________________________
  3373.        #
  3374.        # This batch is run by bpbatch to launch a mini-linux using an initial
  3375.        # ramdisk, which will then run mrbatch under linux.
  3376.        #
  3377.        # The broadcast TFTP protocol only works with the Linux implementation of
  3378.        # mrbatch, because of the lack of broadcast support in the bootprom itself.
  3379.        #
  3380.        # 1. Setup a tiny partition, to let a lot of space for the cache
  3381.        setpartitions "BIGDOS:50"
  3382.        # 2. Clean the MBR
  3383.        clean 0
  3384.        # 3. Run a Linux Kernel with initrd (Initial Ramdisk) supprt, and use
  3385.        #    bcastrd.gz as the initial ramdisk (will be mounted root and then
  3386.        #    executed via /linuxrc). See initrd.txt for more details about
  3387.        #    initial ramdisks. You don't have to specify a root device (second
  3388.        #    parameter is null) to the kernel, it will use the initial ramdisk.
  3389.        linuxboot "linux.krn" "" "bcastrd.gz"
  3390.        # 4. The initial ramdisk will run dhcpcd to setup networking using DHCP.
  3391.        #    It will then run mrbatch -w bcastlx
  3392.        ______________________________________________________________________
  3393.  
  3394.  
  3395.  
  3396.  
  3397.   The initial ramdisk contains:
  3398.  
  3399.   ╖  dhcpcd, a DHCP client used to setup networking
  3400.  
  3401.   ╖  mrbatch
  3402.  
  3403.   ╖  linuxrc, a little wrapper automatically started by initrd and that
  3404.      starts dhcpcd then mrbatch.
  3405.  
  3406.   ╖  usr/lib/terminfo/l/linux, used by MrBatch
  3407.  
  3408.   ╖  dev/*, devices needed to run Linux and mrbatch
  3409.  
  3410.      All programs are statically linked and stripped, to avoid libc.so
  3411.      which is really huge. The resulting ramdisk is Gzipped and takes
  3412.      less than 300 KB. The kernel itself takes 450 KB (with many network
  3413.      cards and initrd support).  When Linux is up and running, MrBatch
  3414.      is called with the following script (that you should edit for your
  3415.      needs):
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.   ______________________________________________________________________
  3434.   # This file is executed when mrbatch is launched by the initial ramdisk
  3435.   # bcastrd.gz
  3436.   # It's main purpose is to "broacast copy" files to the cache
  3437.   #
  3438.   # 1. Be verbose
  3439.   showlog
  3440.   # 2. Don't want a "press a key"
  3441.   set pauselog="OFF"
  3442.   # 3. Set partitions at their final values.
  3443.   #    Important: Since you will copy files into the cache to be used in future
  3444.   #    boot, you need to specify the same partitions as in the future boots.
  3445.   setpartitions "BIGDOS:1024"
  3446.   # 4. Clean the CACHE partition
  3447.   clean -1
  3448.   # 5. And the copy files into the cache, using the Broadcast TFTP protocol
  3449.   #    (port 99)
  3450.   #
  3451.   # You can use the script "as is", but you surely need to modify the following
  3452.   # line ! In our example, we download the file mblinux.imz, which is the image
  3453.   # file for our installation of Linux.
  3454.   copy "$BOOTP-Server-IP@99:mblinux.imz" "{:-1}mblinux.imz"
  3455.   ______________________________________________________________________
  3456.  
  3457.  
  3458.  
  3459.  
  3460.   When the transfer is done, you can simply turn off all client comput¡
  3461.   ers and change their initial boot script to your favorite menu.
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.