Technical article 110650

How can I generate a BTLD from a driver installed on an existing system?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

Problem

I need to install OpenServer on a system with an outdated SCSI
controller.  I do not have a Boot Time Loadable Driver (BTLD) for
the controller, and cannot obtain one from the manufacturer for
the installation.  However, I do have another system with the same
brand and model of controller.  How can I use the installed system
to generate a BTLD for the new installation?

Solution

In this example, the Adaptec driver "alad" will be used. It is recommended that this, or any other official BTLD be mounted and reviewed, to help with understanding this procedure. A good source would be the AHS BTLD, which is downloadable from ftp.sco.com/AHS.

Although alad is used below, substitute the appropriate driver
name wherever alad is used.  If there is any doubt about the
correct driver name, then the output of hwconfig may be used
as a guide.  There should also be a matching line for the
driver in /etc/conf/cf.d/mdevice and /etc/conf/cf.d/sdevice.

(1) Relink the kernel on the existing system with the -p option to preserve the space.o files:

# cd /etc/conf/cf.d
# ./link_unix -p
(2) Format a high density floppy:
# mkdev fd - Choose option 1 to make a filesystem floppy.

Say yes to format it first. Use EAFS or S51K filesystem type. One of these types will be needed because Boot does not understand the HTFS filesystem type.

(3) Mount the floppy to /mnt and change directories to it:

# mount /dev/fd0 /mnt
# cd /mnt

(4) Make the BTLD directory structure on the floppy:

# mkdir alad alad/driver alad/driver/alad alad/install
(5) Populate the driver directory.  First, copy the driver files:
# cp /etc/conf/pack.d/alad/Driver.o alad/driver/alad/Driver.o
# cp /etc/conf/pack.d/alad/space.c alad/driver/alad/Space.c
# cp /etc/conf/pack.d/alad/space.o alad/driver/alad/Space.o
(note that Space.c and Space.o have capital S in the btld disk)

Then, make new files with mdevice and sdevice entries:

# grep alad /etc/conf/cf.d/mdevice > alad/driver/alad/Master
# grep alad /etc/conf/cf.d/sdevice > alad/driver/alad/System
Edit the Master file, to set the Block major device number and
Character major device number to zero.  These are the fifth and
sixth fields.
(6) Populate the install directory.
It contains three important files: <drivername>.name, btld, and
drivers.  In the case of alad, these contain the following:
alad.name contains only one line:
Adaptec AIC-7870 chipset Host Adapter Driver

Make up a suitable one line description for the driver and enter it in <drivername>.name

The btld file for alad contains only one line:

/alad/driver/alad
Substitute the appropriate driver name here.

The drivers file for alad contains only one line:

/alad/driver/alad

Again, substitute the actual driver name here.

In summary, at the end of this process, you should have the following contents on the BTLD floppy:

/<drivername>
/<drivername>/driver/<drivername>
(contains Driver.o, Master, System, Space.c, Space.o)
/<drivername>/install
(contains <drivername>.name, btld, drivers)
(7) Test the BTLD.
Use the BTLD for installation by typing "link" at the Boot prompt,
when booted from the N1 disk for OpenServer Installation.  You will
be prompted to enter a driver name to link; enter the name for the
BTLD. You will then need to insert the BTLD floppy so that the
driver will be linked for installation.  If the link is successful,
then the installation will continue without error.
Or, if the BTLD was not detected, then you will be informed of this
by an error message, and the installation will fail because the
controller will not be detected.  If the link was not successful,
then you may check your work by using the "btldinstall" command on
the already installed system.

Mount the disk and run btldinstall on the mount point:

# btldinstall /mnt
This utility should recognize the BTLD as being on the disk,
and ask if you want to install it. Do _not_ choose to install
the driver on the existing system!  This will overwrite and
potentially disable a driver that you probably need to operate
the system.
If btldinstall does not recognize the driver, then review the
procedure and directory structure outlined above. Also, mount
and review the contents of an existing BTLD for additional hints.
You may observe that there are post-install and pre-install scripts
in the alad/install directory, if you choose the alad BTLD for
review.  However, a successful BTLD creation for alad did not
require either of these scripts.
NOTES:    This document describes a procedure that should only be used when
          all reasonable efforts to locate the BTLD in question have failed.
          In limited testing, it has been seen to work, but there may be
          circumstances under which it will not.  The BTLD officially
          provided by the hardware manufacturer may invoke scripted pre-
          and post-install procedures, for the purpose of configuring the
          driver properly.  Since these scripts would be unavailable to the
          newly created BTLD, SCO cannot fully guarantee the total operability
          of the driver installed by the extracted BTLD.
The disk created by this procedure may also be used to add the
driver to the link kit of another system.  To do so, mount the
floppy (on the new system) and run idinstall -ak from the driver                 directory as follows (assuming a mount point of /mnt):
# mount /dev/fd0 /mnt
# cd /mnt/alad/driver/alad (assuming alad as above)
# idinstall -ak alad
A completely new driver may be created by the customer or vendor,
and added to the link kit in this fashion.  However, SCO cannot
guarantee the operation of a new driver added to the link kit this
way. The customer or vendor is responsible for creating the driver
and supporting the newly created BTLD.

See also

Manual pages mdevice(F), sdevice(F), btld(F), btldinstall(F) link_unix

From the Xinuos technical article database, record 110650. Reproduced with permission. The original is at www.sco.com/ta/110650, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.