Creating OS/2 2.11 boot diskettes with a bare but functional TCP/IP

From OS2World.Com Wiki
Jump to navigation Jump to search
Article Info
Author Charles R. Oldham
Date
OS Version IBM OS/2 2.11
Companion File N/A
Source tcpbtdsk.zip

I posted an article to Usenet's comp.os.os2.misc on August 11, 1994 that contained some instructions describing how to create an OS/2 boot diskette set with TCP/IP enabled. By the following morning I had received such favorable feedback that I edited the original article and packaged it for upload to ftp.cdrom.com and ftp-os2.nmsu.edu.

The boot disk set contains a very limited subset of the TCP/IP utilities - namely arp, rexec, ifconfig, route, and ping. This was all I needed. Other utilities (namely telnet) will probably need other DLLs from the TCP/IP kit. If you have the Developer's Toolkit you can run EXEHDR /V on the desired TCP/IP utilities and see what DLLs are required. Then add those DLLs to the third diskette of this set along with the TCP executables.


I have a laptop computer with OS/2 on it. Recently I moved the Windows stuff off the boot partition onto the second partition (for

  • &#%^@ Microsoft Office which wants to dump 345932435 gigabytes of

utilities in \windows\msapps and nowhere else). Since space is at a premium I wanted to decrease the size of the boot partition (since all the Windows stuff is on D: now) and increase the size of the second partition.

My problem was how the heck to backup and restore this machine without reinstalling OS/2. Right now I use TCP/IP, rexec, and gtak to back up to a 5GB tape drive attached to my Sun server, so I thought I'd try to build a boot diskette set that would enable me to restore everything from a tape.

I was successful!

Disk 1 of the set is just a copy of disk 1 from the 2.11 service pak.

Disk 2 is a copy of disk 2 from the SP with the following files. You may need other files if you have SCSI peripherals or if your machine is a MicroChannel machine.

ansicall.dll      438   1-29-94   0:45 
bkscalls.dll      401   1-29-94   0:46 
bmscalls.dll      398   1-29-94   0:47 
bvhinit.dll      9443   1-29-94   0:07 
bvscalls.dll      454   1-29-94   0:49 
clock01.sys      3619   1-29-94   2:18 
cmd.exe         91136   1-29-94   2:29 
config.sys        843   8-10-94  14:46 
country.sys     25610   1-29-94   2:52 
doscall1.dll    91402   2-02-94  23:01 
harderr.exe     14824   1-29-94   0:53 
hpfs.ifs       133698   1-28-94  23:23 
ibm1flpy.add    28526   1-29-94   1:11 
ibm1s506.add    22781   1-29-94   1:13 
ibmint13.i13     9728   1-29-94   1:18 
kbd01.sys       29525   1-29-94   2:49 
kbdcalls.dll      858   1-29-94   1:00 
keyboard.dcp     5177   1-29-94   2:45 
moucalls.dll     1010   1-29-94   1:00 
msg.dll           508   1-29-94   1:40 
nampipes.dll     1024   1-29-94   1:40 
nls.dll           466   1-29-94   1:39 
npxemltr.dll    25280   1-29-94   3:12 
os2char.dll     56080   1-29-94   0:52 
os2dasd.dmd     33610   1-29-94   1:06 
print01.sys      9134   1-29-94   3:17 
quecalls.dll    15282   1-29-94   1:42 
screen01.sys     6124   1-29-94   3:21 
sesmgr.dll      32806   1-29-94   0:53 
viocalls.dll     1825   1-29-94   0:52 
vtbl850.dcp     10478   1-29-94   1:59 

Also, to make this work, you need to get TSHELL from an EWS site (ftp.cdrom.com will do). Put that on diskette 2, also.

tshell.exe      17547  12-13-93  17:33

I then took selected files from my TCP/IP installation and put them on the diskette. If you keep the same directory structure it makes things a lot clearer:

\ibmcom\protman.os2
\ibmcom\protocol.ini              <--- If you are running multiple requesters
                                      edit this file to contain only 
                                      references to your network adapter and
                                      to TCP/IP.
\ibmcom\macs\pe3ndis.os2          <--- This is my ethernet adapter driver.
\ibmcom\macs\pe3os2v2.nif         <--- This is the NIF file for my
                                      ethernet adapter.  I don't know if
                                      it's required.
\ibmcom\protocol\lanpdd.os2
\ibmcom\protocol\lanvdd.os2
\ibmcom\protocol\netbind.exe
\ibmcom\protocol\tcpip.nif

\tcpip\bin\arp.exe
\tcpip\bin\cntrl.exe
\tcpip\bin\ifconfig.exe
\tcpip\bin\ifndis.sys
\tcpip\bin\inet.sys
\tcpip\bin\ping.exe
\tcpip\bin\rexec.exe
\tcpip\bin\route.exe

\tcpip\dll\so32dll.dll
\tcpip\dll\tcp32dll.dll
\tcpip\dll\tcpipdll.dll
 
\tcpip\etc\hosts                  <--- To make things easier, edit this file
                                      and put IP->hostname mappings for the
                                      host from which you'll be restoring.
\tcpip\etc\protocol               /__ These files are absolutely necessary.
\tcpip\etc\services               \

Replace config.sys on disk 2 of the boot set with the following. Note if you are doing this for a microchannel machine or a machine with SCSI-based boot drive this is probably not correct - you will need to add the proper statements to get your machine to boot and make sure the proper files are on the diskette. Space is very tight and there's not much to delete. This is actually a hacked version of config.sys from SP disk 2, so if you have extra devices in your machine that's probably a good place to start.

buffers=32
iopl=yes
memman=noswap
protshell=a:\tshell.exe
set os2_shell=cmd.exe
diskcache=64,LW
protectonly=yes
libpath=.;a:\;a:\os2\dll;a:\tcpip\dll;
ifs=hpfs.ifs /c:64
pauseonerror=no
codepage=850
devinfo=kbd,us,keyboard.dcp
devinfo=scr,ega,vtbl850.dcp
set path=.;a:\;a:\os2;a:\os2\system;a:\os2\install;a:\tcpip\bin;
set dpath=.;a:\;a:\os2;a:\os2\system;a:\os2\install
set keys=on
basedev=print01.sys                     \   
basedev=ibm1flpy.add                     >--- These files are different
basedev=ibm1s506.add                    /     for a MicroChannel machine.
basedev=ibmint13.i13
basedev=os2dasd.dmd
device=a:\ibmcom\protman.os2 /i:a:\ibmcom
SET ETC=a:\TCPIP\ETC
SET TMP=a:\TCPIP\TMP
DEVICE=a:\IBMCOM\PROTOCOL\LANPDD.OS2
DEVICE=a:\IBMCOM\PROTOCOL\LANVDD.OS2
RUN=A:\IBMCOM\PROTOCOL\NETBIND.EXE
DEVICE=A:\tcpip\bin\INET.SYS              <-- Make sure the pathnames match
DEVICE=A:\tcpip\bin\IFNDIS.SYS                the locations of ifndis and inet
DEVICE=A:\IBMCOM\MACS\PE3NDIS.OS2         <-- Put your ethernet driver here.
RUN=a:\TCPIP\BIN\CNTRL.EXE
SET TZ=mst7                               <-- Put your timezone here.

Now you should be able to boot your computer with disk 1 and disk 2, issue an 'ifconfig lan0 <tcp/ip parameters>' and a 'route add default <route host> 1'. Then you can issue a 'ping' to test to make sure networking is working.

The problem I ran into was that at this point there was no more room left on the diskette for 'tar.exe' from the gtak package, or for that matter format, fdisk, an editor, or anything else I would deem essential for an emergency boot diskette.

After a bit of thought I theorized that except for the TCP/IP DLLs, all of the system DLLs probably had been loaded into memory (since MEMMAN is NOSWAP), and would not need to be reloaded at any time. This meant that I could create a third diskette with all the necessary TCP utilities and DLLs as well as important stuff like 'sysinstx.com' and 'fdisk.com'.

So that's what I did, and here is the result. I duplicated the contents of the TCP/IP directories from disk 2, so they are only listed as a directory entry here.

TCPIP        <DIR>      8-10-94   7:59 
chkdsk.com      68656   1-29-94   2:16 
cmd.exe         91136   1-29-94   2:29 <-- for TSHELL so you can start
                                           another session.
fdisk.com      108196   2-11-94  17:27
format.com      66832   1-29-94   2:42 
sysinstx.com    39472   1-28-94  22:02 
t2.exe          10542  12-01-93  22:10 
tar.exe        167476   2-24-93  20:30 
tcpstart.cmd      130   8-11-94   7:51 <-- contains 'ifconfig' and 'route'
                                           commands to set up TCP/IP.
thelp.hlp       14596  12-01-93  22:10 
uhpfs.dll      181408   1-28-94  23:59 
     450,560 bytes free
    • Note well** that for sysinstx.com to work and enable the system to

be bootable, OS/2 system files OS2BOOT, OS2KRNL, OS2LDR, OS2LDR.MSG, and (probably) OS2VER *must* be on the drive that is being designated bootable. Also UHPFS.DLL *must* be present on the floppy in drive A: if the future boot drive is HPFS. If either of these conditions are not satisfied, sysinstx just says "The format of the disk is HPFS. An internal error occurred." How's that for heart failure?

This means you should probably wait to make the partition bootable until after you have restored the data onto it.

Now all it takes is to change the current drive to the newly formatted partition and execute

rexec -b hostname "dd if=/dev/tapedrive" | tar -p -pp -xvf -

(you can include the proper blocksizes on the command line if you're not using the defaults)

An hour or so and one "sysinstx bootdrive:" later, you're up and running again, Desktop and all!

In some feedback to my original posting, Albert Crosby <acrosby@comp.uark.edu> observed

> I wonder if the SYSINSTX is necessary - I can format a new drive with
> a FAT and a HPFS partition, get an archived os/2 install on the fat
> partition, and unzip it on to the HPFS partition and have a working
> system.  Since your TAR is a backup of your boot drive on the same
> format drive with the same letter, I expect you could skip the SYSINSTX.

You're mileage may vary, but I had the same experience he did. The first time I tested this process I was totally unable to get sysinstx to function, yet I could still boot my machine even after a repartition and reformat.

On one other occasion with a different machine, however, I was not able to boot without running sysinstx.

One more item: when using GTAK, make sure that you specify "-p -pp" on the command line both when backing up and restoring. This will make sure that all hidden and system files as well as extended attributes for all files are saved in the archive, and then restored properly.

I hope this helps some people. I had a lot of trouble with it, but trial and error and a good bit of banging my head against the wall prevailed.

If you have any questions about this procedure, feel free to email me at the address below.

| Charles R. (C. R.) Oldham | North Central Association               |
| cro@socrates.ed.asu.edu or| Commission on Schools                   |
| aocro@acvax.inre.asu.edu  | Arizona State University, Box 873011, _ |
| Voice: 602/965-8700       | Tempe, AZ 85287-3011                 X_>|
| Fax:   602/965-9423       | #include "disclaimer.h"    <<TeamOS/2>> |