t3x.org / bits / fva0inst.html

Installing Coherent from 3.5" disks

Copyright (C) 2001 Nils M Holm <nmh@t3x.org>

Coherent is a V7 Unix clone that was created and sold by the Mark Williams Company (now defunct). It ran on PDP-11's, IBM PC compatibles, and some other platforms. It used to be popular in the 1980's.

This document describes how to convert a set of 5.25" Coherent installation disks into a set of 3.5" installation disks. I have tested this method using my own 4.01 install disks and it works fine. It may work on Coherent 3.x, too.

What you need

  1. A set of 5.25" installation disks (obviously)
  2. A valid serial number
  3. A running Coherent system with both a 5.25" drive and a 3.5" drive
  4. Six 3.5" HD floppy disks
  5. About 6M bytes of free space on your Coherent partition

What you have to do

Before doing anything else,

DO write-protect your original installation disks.

Some of the steps in this procedure require superuser permissions, so you should type

su root

now.

Of course, as a superuser, you can do a lot of damage to your system. I assume that you know what you are doing and will not take any responsibility for lost data or any other damages.

Find out the proper device names

The below examples assume that your system has two floppy drives, where the 3.5" drive is drive 0 (DOS drive A:) and the 5.25" drive is drive 1 (DOS drive B:). On such a system, Coherent will use these device names:

Drive ID Drive size Coherent Device
0 3.5", 1440KB /dev/fva0
1 5.25", 1200KB /dev/fha1

If your system has the drives connected the other way around, you should substitute the highlighted device names (and only those) in the remainder of this text as follows:

Device Substitute with
/dev/fva0 /dev/fva1
/dev/fha1 /dev/fha0

Format the floppies

First, you will have to format all the six 3.5" floppies. Do not use factory-formatted floppies without re-formatting them. It will only cause trouble. Do use the -v flag to verify the disks. Floppies with bad sectors should be dumped. Use only error-free floppies. Run the following command on each floppy:

/etc/fdformat -v /dev/fva0

Create empty file systems

The next step is to create a bootable root disk. This disk will be disk#1 of your new 3.5" installation set. You should label it, since it must be the first disk of your set. To create a bootable disk, type

/etc/mkfs -b /conf/boot.fva /dev/fva0 2880

The disks #2 through #6 do not have to be bootable and may be prepared using the command

/etc/mkfs /dev/fva0 2880

Extract the files from the original disks

The files on the original installation disks are in Coherent file system format. You can mount them and use cpio(1) to extract the files on it. Run the following commands on each floppy, where N is the number printed on the disk:

cd /tmp
/etc/mount /dev/fha1 /mnt
cd /mnt
find . | cpio -cov >/tmp/diskN.cpio
/etc/umount /dev/fha1

After this step, you should have these archives in /tmp:

disk1.cpio this one must go to disk#1
disk2.cpio
disk3.cpio
disk4.cpio
disk5.cpio
disk6.cpio

Copy the files to the new disks

Number the floppies 1 through 6. The content of disk1.cpio must be copied to the bootable root disk, which should be disk #1. Run the following commands on each of the new floppies (N is the number of the disk):

/etc/mount /dev/fva0 /mnt
cd /mnt
cpio -div </tmp/diskN.cpio
# wait until the disk stops spinning, otherwise you may ge a device busy error
cd /tmp
/etc/umount /dev/fva0

Modify the new root floppy

In order to modify files on the root disk, mount your disk #1 again:

# insert the root disk (disk#1), then type
/etc/mount /dev/fva0 /mnt

Change the device names in the install/update scripts:

sed -e 's/\/dev\/fha0/\/dev\/fva0/g' </mnt/etc/brc.install >/tmp/brc.install
mv /tmp/brc.install /mnt/etc/brc.install
sed -e 's/\/dev\/fha0/\/dev\/fva0/g' </mnt/etc/brc.update >/tmp/brc.update
mv /tmp/brc.update /mnt/etc/brc.update

You may prefer to do the above step manually: just use your favorite text editor and replace all occurences of /dev/fha0 in the files /mnt/etc/brc.install and /mnt/etc/brc.update with /dev/fva0.

Next, you will have to patch the installation kernel. The patched kernel will attempt to mount /dev/fva0 (4,15) instead of /dev/fha0 (4,14) on root. This command works only on 4.x systems:

# This command should be used on Coherent 4.x
/conf/patch /mnt/coherent 'rootdev=makedev(4,15):s'

On Coherent 3.x, the pipe device must be changed, too. Use the following commands to do so (notice the trailing underscore characters on kernel variable names):

# These commands should be used on Coherent 3.x
/conf/patch /mnt/coherent 'rootdev_=makedev(4,15)'
/conf/patch /mnt/coherent 'pipedev_=makedev(4,15)'

Finally, unmount the root floppy again:

/etc/umount /dev/fva0

That's it. The new disks may now be used to install Coherent using a 3.5" drive.

Booting the new disks

The 3.5" installation disks created during the above steps may be used in the same way as the original 5.25" disks. For details on the Coherent installation, refer to the manual.

The magic words

Some newer (>386) machines may hang in the middle of the boot process. In many cases, the problem is related to incorrect cache initialization. I do not remember the details, but there are two ways around this problem. The obvious solution is, of course, to disable the processor cache. Before doing so, however, you may try typing the following commands at the boot prompt (after pressing RESET):

info
info
begin

It is important to type info exactly twice. This method worked well on many of my 'modern' 486 systems.

Starting the installation manually

On some machines, you may get the following message when booting the installation disk:

Installation/Update kit booted incorrectly.
When booting, you must boot via "begin" or "update".
Please reboot and try again...

Do not reboot, if you see this message. To finish the installation, just type

/etc/build

To run an update, type

/etc/build -u