Philips Special - STARTUP
-------------------------

This is a version of M68KSYS (STARTUP source) that can automatically
execute "*HFSCK" on a detected-bad HFS disk, running in "N"ormal mode,
using the default superblock number (8).

The Version command will report

  Philips Workstations   Rev. 3.22PX 15-Jun-89

How to Use It
-------------

Replace the STARTUP file on your boot disk with this version of startup.
We also recommend using the special Philips version of HFSCK (Rev 3.22P,
dated 6/1/89) hand-carried to Philips by Glen Robinson in June 1989,
with this STARTUP.

NOTE - this version of STARTUP is a special and as such has not been put
through Hewlett-Packard's usual Quality Assurance testing.  We have
tested it in many circumstances, and have attempted to explore many of
the "corner case" situations, but cannot warrant that it will or can be
made to run correctly in all circumstances.

Hewlett-Packard retains all rights to source and object code and
documentation supplied with this shipment.

This code is not to be distributed outside the Philips corporation.

Hewlett-Packard makes no commitment to include this version of STARTUP in
any future released version of Pascal Language System.

Operation
---------

This version of STARTUP checks for "corrupt" HFS disks at two times:

1) During boot, it will attempt to find and fix (using *HFSCK) "corrupt"
HFS disks, using the "N"ormal mode of HFSCK, and the default superblock
(block 8).  If an HFS disk is "corrupt", you will briefly see the
message

  Automatically executing file *HFSCK

  Loading '*HFSCK.CODE'

followed by HFSCK's normal messages.  If the disk can be corrected under
Normal mode without user interaction, it will be fixed, and control
returned to the keyboard when it is finished.  If the damage to the file
system is more serious, HFSCK may ask for input.  The keyboard will be
"live" at this point, and the user should respond to the questions,
referencing the HFSCK documentation if necessary.

All "corrupt" HFS disks will be fixed in ascending unit number order,
with the keyboard "waking up" as necessary to allow the user to respond
to questions generated by HFSCK.  After all disks are cleaned up,
AUTOSTART will execute normally, unless the boot disk was an unfixable
HFS disk.

If no disks required repair, the user will notice no difference from
ordinary boot sequence.

While HFSCK is running, the keyboard is completely locked out, including
the STOP key, except when the user is being asked for input.  This
prevents users from interfering with HFSCK at critical times.

2) Each time the Command Interpreter (CI) puts up its menu, except while
streaming.  This means that after any application is executed from the
keyboard, automatic checks will be made for "corrupt" HFS disks.  If any
are found, operation will be the same as for case 1) above, except that
AUTOSTART will not be run.  When all disks are determined to be in good
condition, control will be returned to the keyboard for user input, and
after all disks have been fixed.

Unusual Conditions
------------------

1) If an HFS needs fixing, and the file *HFSCK cannot be found or loaded
for some reason, the Command Interpreter will write a message to the
screen and give control to the user.  This will happen each time through
the Command Interpreter loop, reminding the user that an HFS needs
attention, and providing some idea of what to do.

What to do:  Put a copy of the file HFSCK.CODE in your "*" directory,
ensuring that it has appropriate read permissions, etc.  As soon as the
file *HFSCK becomes available, the automatic fixing will occur, unless
condition 2) below applies.

2) If an HFS cannot be fixed for some reason, it may not be noticed that
it is "corrupt" for some time afterwards (i.e.  the CI will not attempt
to automatically load *HFSCK and fix it.)

What to do:  go into the FILER and press the V key (Volumes command).
As soon as you exit the FILER, the bad file system will be noticed and
fixed.

3) The HFS disk cannot be fixed.  Possible causes are head crashes, some
application writing over critical file system information, etc.

*HFSCK will be continually reexecuted, and the keyboard activated, with
a prompt for some kind of input.

What to do:  If you are sure the disk is unfixable, having tried
unsuccessfully to let HFSCK fix it, take the disk off-line (pop out a
micro-floppy, or power dwon and disconnect a hard disk), and abort HFSCK
(usually by responding "no" to the prompt).  HFSCK will now stop being
automatically executed for that disk.

Now do whatever you would normally do with an unrecoverable file system.
It is wise to have backups of all critical files for this eventuality.

Note that if you reinsert the bad micro-floppy, or power on the hard
disc, HFSCK will not be automatically executed for it, until it is
"noticed" again (e.g.  by the FILER's Volumes command), so that you have
a chance to perform your own recovery procedures on it.


