Next Previous Contents

2. How to do it

  1. Prepare a floppy containing a bootable DOS. I used Caldera's DR-DOS, which is free for personal and charitable uses. You might also try FreeDOS but I have not tested it. Since the RAM available for ramdisk may be limited, in the case of a 286 with 1 MB memory: 384k less the 64 kB High Memory Area, giving 320 kB, you probably want to create a 360 kB floppy. The commands are usually: format b:, then sys b:. (I assume your floppy is B: in all that follows.) You can also use mtools to manipulate a floppy image in a file but you have to get the boot block from DR-DOS or FreeDOS to pass to mformat.
  2. Copy all the programs you need to run from the ramdisk onto the floppy. Don't forget any configuration files needed. Also include an autoexec.bat (and perhaps config.sys) to start everything up. Don't worry about getting the configuration file contents right at this point; I will show you how to edit them from the host system.
  3. Take the floppy to a Linux system and using dd, copy the floppy image into a file. The command is: dd if=dev/fd1h360 of=floppyimage/.
  4. On the Linux system, set up mtools so that floppyimage can be manipulated as a DOS drive. The file you want to edit is probably /etc/mtools.conf. Alternatively, if you know how, you could set up the loopback device and mount the floppyimage as a DOS filesystem. Using mtools, you can copy configuration files between the "floppy" and your host system and edit them until you are happy with them.
  5. Get the Etherboot distribution, version 3.2 or higher, and make a boot PROM for the card of your choice. You may want to enable the ASK_BOOT option with a short timeout and ANS_DEFAULT=ANS_NETWORK. This will enable you to boot the 286 normally if you need to fix anything. All network cards, even the very old ones, should accept a 8 kB boot PROM. The compressed 16 bit images in Etherboot are under 8 kB. Burn it into a PROM or find someone to do it for you. If you are using a larger PROM, make sure you have burnt it in the right portion of the PROM, or burn multiple copies in the address space to be sure. See here for some things to watch out for.
  6. Set up bootp and tftp services on the server if you haven't already.
  7. In the same Etherboot distribution, compile the mknbi-dos program. Use the program to create a tagged image in the directory that tftpd fetches from, typically /tftpboot. The command is probably: mknbi -x -x -r floppyimage -o /tftpboot/286boot. (The two -x flags print out verbose information.) Check that the /etc/bootptab entry for the 286 specifies 286boot as the file to load.
  8. On your 286, disable any floppies or hard disks in the CMOS configuration. Also set it to not require a keyboard, if you intend to run keyless. If the CMOS setup doesn't allow you to disable the keyboard, you have a problem. One way out might be to attach an unloved keyboard, one that is just good enough to pass the probe from the BIOS.
  9. Now hit the reset switch and watch the boot PROM take over. It should find the bootp server and then the tftp server and load the floppyimage. Then DOS will start reading autoexec.bat and execute the commands there. Hopefully the last command there is the program you want to run all the time.
  10. Enjoy.

Tip: You can do a mdir directly on the netboot image if you use the offset parameter of mtools. In $HOME/.mtoolsrc, put



drive t: file="/tftpboot/dos.nb" offset=4096

Then you can do



mdir t:

4096 is the sum of the header size (512) and the startup segment size (3584). It may be different for other versions of mknbi-dos.

Caveat: For this trick, access other than reading only may not work. You may be able to rewrite things on the "disk" with mcopy, etc. but the declared size in the header will not get updated. If you wish to modify things you should work on the "disk" image, then rebuild with mknbi-dos.

Caveat: If you do your arithmetic you will see that the amount of XMS memory in the typical 1 MB 286 is not quite enough to hold the whole of the 360 kB floppy. After deducting the HMA, one is left with 320 kB of XMS. Provided you don't fill the "floppy" to the brim and use up the last "sectors", you should be ok. One way to be safe is to make a 320 kB "floppy" using 8 sectors per track instead of 9. And of course you could add more XMS and download larger "floppies".

Hint: Using an executable compressor like lzexe or pklite might allow you to squeeze more programs onto the "floppy". See a site like Simtel.Net for such programs.

Note: Of course, this technique works for 386s and higher. However you may want to consider netbooting Linux with an initial ramdisk instead of DOG.


Next Previous Contents